instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public String toString() { return ServerCookieEncoder.encode(toNettyCookie()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/gribbit/auth/Cookie.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
toString
src/gribbit/auth/Cookie.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
protected static TomlFactory newTomlFactory() { return TomlFactory.builder() .enable(TomlReadFeature.VALIDATE_NESTING_DEPTH) .build(); }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2023-3894 - Severity: HIGH - CVSS Score: 7.5 Description: remove toml feature Function: newTomlFactory File: toml/src/test/java/com/fasterxml/jackson/dataformat/toml/TomlMapperTestBase.java Repository: FasterXML/jackson-dataformats-text Fixed Code: protected static TomlFactory newTomlFactory() { return TomlFactory.builder().build(); }
[ "CWE-787" ]
CVE-2023-3894
HIGH
7.5
FasterXML/jackson-dataformats-text
newTomlFactory
toml/src/test/java/com/fasterxml/jackson/dataformat/toml/TomlMapperTestBase.java
a05e4f3485d878153747b82937536e0b4b0f0579
1
Analyze the following code function for security vulnerabilities
private void unbind() { if (mAuthenticator != null) { mAuthenticator = null; mContext.unbindService(this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unbind File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
unbind
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@Nullable public Icon getBigPicture() { if (mPictureIcon != null) { return mPictureIcon; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBigPicture File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getBigPicture
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public int getPreExpandValueSetsDefaultOffset() { return myPreExpandValueSetsDefaultOffset; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPreExpandValueSetsDefaultOffset File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getPreExpandValueSetsDefaultOffset
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
private void finishLoadProfile(String profileName) { if (getActivity() == null) return; mMePreference.setTitle(getString(R.string.user_you, profileName)); int myUserId = UserHandle.myUserId(); Bitmap b = mUserManager.getUserIcon(myUserId); if (b != null) { mMePreference.setIcon(encircle(b)); mUserIcons.put(myUserId, b); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishLoadProfile File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
finishLoadProfile
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
public FormValidation doCheckLocal(@QueryParameter String value) throws IOException, ServletException { String v = Util.nullify(value); if (v == null) // local directory is optional so this is ok return FormValidation.ok(); v = v.trim(); // check if a absolute path has been supplied // (the last check with the regex will match windows drives) if (v.startsWith("/") || v.startsWith("\\") || v.startsWith("..") || v.matches("^[A-Za-z]:.*")) return FormValidation.error("absolute path is not allowed"); // all tests passed so far return FormValidation.ok(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doCheckLocal File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
doCheckLocal
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
protected String getName() { return this.componentDescriptor.getRoleHint(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-35157
MEDIUM
4.8
xwiki/xwiki-platform
getName
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
35e9073ffec567861e0abeea072bd97921a3decf
0
Analyze the following code function for security vulnerabilities
public List<ServerConfiguration> getServers() { return servers; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getServers File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getServers
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@GET @Operation(summary = "Get attachment", description = "Retrieves the attachment of the message.") @Path("posts/{messageKey}/attachments/{filename}") @ApiResponse(responseCode = "200", description = "Ok.") @ApiResponse(responseCode = "404", description = " The identity or the portrait not found") @Produces({"*/*", MediaType.APPLICATION_OCTET_STREAM}) public Response getAttachment(@PathParam("messageKey") Long messageKey, @PathParam("filename") String filename, @Context Request request) { //load message Message mess = fom.loadMessage(messageKey); if(mess == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } if(!forum.equalsByPersistableKey(mess.getForum())) { return Response.serverError().status(Status.CONFLICT).build(); } VFSContainer container = fom.getMessageContainer(mess.getForum().getKey(), mess.getKey()); VFSItem item = container.resolve(filename); if(item instanceof LocalFileImpl) { //local file -> the length is given to the client which is good Date lastModified = new Date(item.getLastModified()); Response.ResponseBuilder response = request.evaluatePreconditions(lastModified); if(response == null) { File attachment = ((LocalFileImpl)item).getBasefile(); String mimeType = WebappHelper.getMimeType(attachment.getName()); if (mimeType == null) mimeType = "application/octet-stream"; response = Response.ok(attachment).lastModified(lastModified).type(mimeType).cacheControl(cc); } return response.build(); } else if (item instanceof VFSLeaf) { //stream -> the length is not given to the client which is not nice Date lastModified = new Date(item.getLastModified()); Response.ResponseBuilder response = request.evaluatePreconditions(lastModified); if(response == null) { StreamingOutput attachment = new VFSStreamingOutput((VFSLeaf)item); String mimeType = WebappHelper.getMimeType(item.getName()); if (mimeType == null) mimeType = "application/octet-stream"; response = Response.ok(attachment).lastModified(lastModified).type(mimeType).cacheControl(cc); } return response.build(); } return Response.serverError().status(Status.NOT_FOUND).build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttachment File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
getAttachment
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
public String getCurrentWiki() { return this.currentWiki; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentWiki File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getCurrentWiki
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
@Override public void setSmsAppPackagesProvider(PackagesProvider provider) { synchronized (mPackages) { mDefaultPermissionPolicy.setSmsAppPackagesProviderLPw(provider); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSmsAppPackagesProvider File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
setSmsAppPackagesProvider
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public Object notifyStatusBar(String tickerText, String contentTitle, String contentBody, boolean vibrate, boolean flashLights, Hashtable args) { int id = getContext().getResources().getIdentifier("icon", "drawable", getContext().getApplicationInfo().packageName); NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Activity.NOTIFICATION_SERVICE); Intent notificationIntent = new Intent(); notificationIntent.setComponent(activityComponentName); PendingIntent contentIntent = PendingIntent.getActivity(getContext(), 0, notificationIntent, 0); NotificationCompat.Builder builder = new NotificationCompat.Builder(getContext()) .setContentIntent(contentIntent) .setSmallIcon(id) .setContentTitle(contentTitle) .setTicker(tickerText); if(flashLights){ builder.setLights(0, 1000, 1000); } if(vibrate){ builder.setVibrate(new long[]{0, 100, 1000}); } if(args != null) { Boolean b = (Boolean)args.get("persist"); if(b != null && b.booleanValue()) { builder.setAutoCancel(false); builder.setOngoing(true); } else { builder.setAutoCancel(false); } } else { builder.setAutoCancel(true); } Notification notification = builder.build(); int notifyId = 10001; notificationManager.notify("CN1", notifyId, notification); return new Integer(notifyId); }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2022-4903 - Severity: MEDIUM - CVSS Score: 5.1 Description: Fixed #3583 Pending Intent vulnerability Function: notifyStatusBar File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne Fixed Code: public Object notifyStatusBar(String tickerText, String contentTitle, String contentBody, boolean vibrate, boolean flashLights, Hashtable args) { int id = getContext().getResources().getIdentifier("icon", "drawable", getContext().getApplicationInfo().packageName); NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Activity.NOTIFICATION_SERVICE); Intent notificationIntent = new Intent(); notificationIntent.setComponent(activityComponentName); PendingIntent contentIntent = createPendingIntent(getContext(), 0, notificationIntent); NotificationCompat.Builder builder = new NotificationCompat.Builder(getContext()) .setContentIntent(contentIntent) .setSmallIcon(id) .setContentTitle(contentTitle) .setTicker(tickerText); if(flashLights){ builder.setLights(0, 1000, 1000); } if(vibrate){ builder.setVibrate(new long[]{0, 100, 1000}); } if(args != null) { Boolean b = (Boolean)args.get("persist"); if(b != null && b.booleanValue()) { builder.setAutoCancel(false); builder.setOngoing(true); } else { builder.setAutoCancel(false); } } else { builder.setAutoCancel(true); } Notification notification = builder.build(); int notifyId = 10001; notificationManager.notify("CN1", notifyId, notification); return new Integer(notifyId); }
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
notifyStatusBar
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
1
Analyze the following code function for security vulnerabilities
public static String sanitizeString(String raw) { return sanitizeString(raw, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sanitizeString File: core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-6555
MEDIUM
4.3
OpenNMS/opennms
sanitizeString
core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
29007e7aeeb792aa73d45fafb16ae9ef19e78a18
0
Analyze the following code function for security vulnerabilities
public void clearSortOrder() { setSortOrder(Collections.emptyList()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearSortOrder File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
clearSortOrder
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
@Deprecated public WearableExtender setGravity(int gravity) { mGravity = gravity; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setGravity File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setGravity
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { if (settingsService.isLdapEnabled()) { auth.ldapAuthentication() .contextSource() .managerDn(settingsService.getLdapManagerDn()) .managerPassword(settingsService.getLdapManagerPassword()) .url(settingsService.getLdapUrl()) .and() .userSearchFilter(settingsService.getLdapSearchFilter()) .userDetailsContextMapper(customUserDetailsContextMapper); } auth.userDetailsService(securityService); String jwtKey = settingsService.getJWTKey(); if(StringUtils.isBlank(jwtKey)) { logger.warn("Generating new jwt key"); jwtKey = JWTSecurityService.generateKey(); settingsService.setJWTKey(jwtKey); settingsService.save(); } auth.authenticationProvider(new JWTAuthenticationProvider(jwtKey)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: configureGlobal File: airsonic-main/src/main/java/org/airsonic/player/security/GlobalSecurityConfig.java Repository: airsonic The code follows secure coding practices.
[ "CWE-326" ]
CVE-2019-10907
MEDIUM
5
airsonic
configureGlobal
airsonic-main/src/main/java/org/airsonic/player/security/GlobalSecurityConfig.java
3e07ea52885f88d3fbec444dfd592f27bfb65647
0
Analyze the following code function for security vulnerabilities
@Deprecated public Form<T> bind(Lang lang, TypedMap attrs, JsonNode data, String... allowedFields) { logger.warn( "Binding json field from form with a hardcoded max size of {} bytes. This is deprecated. Use bind(Lang, TypedMap, JsonNode, Int, String...) instead.", maxJsonChars()); return bind(lang, attrs, data, maxJsonChars(), allowedFields); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bind File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
bind
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
private boolean isStatusBarKeyguard() { return mStatusBar != null && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_KEYGUARD) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isStatusBarKeyguard File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
isStatusBarKeyguard
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
public static final native int setGid(int uid);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setGid File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
setGid
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
@PostMapping("/update/selenium-server") @MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, title = "selenium-server地址") public int updateSeleniumServer(@RequestBody EditSeleniumServerRequest request) { return baseUserService.updateUserSeleniumServer(request); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateSeleniumServer File: framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java Repository: metersphere The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-38494
HIGH
7.5
metersphere
updateSeleniumServer
framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java
a23f75d93b666901fd148d834df9384f6f24cf28
0
Analyze the following code function for security vulnerabilities
private void logOutgoing(String msg, Object... params) { Log.d(this, "TC -> CS[" + Log.getPackageAbbreviation(mComponentName) + "]: " + msg, params); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logOutgoing File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
logOutgoing
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getVersionList() { return VERSION_LIST; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getVersionList File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-20914
CRITICAL
9.8
sanluan/PublicCMS
getVersionList
publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
0
Analyze the following code function for security vulnerabilities
@Override public Debug.MemoryInfo[] getProcessMemoryInfo(int[] pids) { enforceNotIsolatedCaller("getProcessMemoryInfo"); final long now = SystemClock.uptimeMillis(); final long lastNow = now - mConstants.MEMORY_INFO_THROTTLE_TIME; final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final int callingUserId = UserHandle.getUserId(callingUid); final boolean allUsers = ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL, callingUid) == PackageManager.PERMISSION_GRANTED; // Check REAL_GET_TASKS to see if they are allowed to access other uids final boolean allUids = mAtmInternal.isGetTasksAllowed( "getProcessMemoryInfo", callingPid, callingUid); // Check if the caller is actually instrumented and from shell, if it's true, we may lift // the throttle of PSS info sampling. boolean isCallerInstrumentedFromShell = false; synchronized (mProcLock) { synchronized (mPidsSelfLocked) { ProcessRecord caller = mPidsSelfLocked.get(callingPid); if (caller != null) { final ActiveInstrumentation instr = caller.getActiveInstrumentation(); isCallerInstrumentedFromShell = instr != null && (instr.mSourceUid == SHELL_UID || instr.mSourceUid == ROOT_UID); } } } final Debug.MemoryInfo[] infos = new Debug.MemoryInfo[pids.length]; for (int i=pids.length-1; i>=0; i--) { final Debug.MemoryInfo mi = infos[i] = new Debug.MemoryInfo(); final ProcessRecord proc; final int oomAdj; final ProcessProfileRecord profile; synchronized (mAppProfiler.mProfilerLock) { synchronized (mPidsSelfLocked) { proc = mPidsSelfLocked.get(pids[i]); if (proc != null) { profile = proc.mProfile; oomAdj = profile.getSetAdj(); } else { profile = null; oomAdj = 0; } } } final int targetUid = (proc != null) ? proc.uid : -1; final int targetUserId = (proc != null) ? UserHandle.getUserId(targetUid) : -1; if (callingUid != targetUid) { if (!allUids) { continue; // Not allowed to see other UIDs. } if (!allUsers && (targetUserId != callingUserId)) { continue; // Not allowed to see other users. } } if (proc != null) { synchronized (mAppProfiler.mProfilerLock) { if (profile.getLastMemInfoTime() >= lastNow && profile.getLastMemInfo() != null && !isCallerInstrumentedFromShell) { // It hasn't been long enough that we want to take another sample; return // the last one. mi.set(profile.getLastMemInfo()); continue; } } } final long startTime = SystemClock.currentThreadTimeMillis(); final Debug.MemoryInfo memInfo = new Debug.MemoryInfo(); Debug.getMemoryInfo(pids[i], memInfo); final long duration = SystemClock.currentThreadTimeMillis() - startTime; mi.set(memInfo); if (proc != null) { synchronized (mAppProfiler.mProfilerLock) { profile.setLastMemInfo(memInfo); profile.setLastMemInfoTime(SystemClock.uptimeMillis()); if (profile.getThread() != null && profile.getSetAdj() == oomAdj) { // Record this for posterity if the process has been stable. profile.addPss(mi.getTotalPss(), mi.getTotalUss(), mi.getTotalRss(), false, ProcessStats.ADD_PSS_EXTERNAL_SLOW, duration); proc.getPkgList().forEachPackageProcessStats(holder -> { final ProcessState state = holder.state; FrameworkStatsLog.write(FrameworkStatsLog.PROCESS_MEMORY_STAT_REPORTED, proc.info.uid, state != null ? state.getName() : proc.processName, state != null ? state.getPackage() : proc.info.packageName, mi.getTotalPss(), mi.getTotalUss(), mi.getTotalRss(), ProcessStats.ADD_PSS_EXTERNAL_SLOW, duration, holder.appVersion, profile.getCurrentHostingComponentTypes(), profile.getHistoricalHostingComponentTypes()); }); } } } } return infos; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProcessMemoryInfo File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
getProcessMemoryInfo
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public static boolean isMaster() { return master; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMaster File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/constants/CmsVersion.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-29784
MEDIUM
5
sanluan/PublicCMS
isMaster
publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/constants/CmsVersion.java
d8d7626cf51e4968fb384e1637a3c0c9921f33e9
0
Analyze the following code function for security vulnerabilities
private AuthenticationInfo attemptLoginWithAllExistingIdProviders() { final IdProviders idProviders = runAsAuthenticated( this::getSortedIdProviders ); for ( IdProvider idProvider : idProviders ) { final AuthenticationInfo authInfo = authenticate( idProvider.getKey() ); if ( ( authInfo != null ) && authInfo.isAuthenticated() ) { return authInfo; } } return AuthenticationInfo.unAuthenticated(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attemptLoginWithAllExistingIdProviders File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp The code follows secure coding practices.
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
attemptLoginWithAllExistingIdProviders
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
0189975691e9e6407a9fee87006f730e84f734ff
0
Analyze the following code function for security vulnerabilities
protected List<CustomFieldItemDTO> syncIssueCustomFieldList(String customFieldsStr, Map issue) { List<CustomFieldItemDTO> customFields = BaseCustomFieldService.getCustomFields(customFieldsStr); Set<String> names = issue.keySet(); customFields.forEach(item -> { String fieldName = item.getCustomData(); Object value = issue.get(fieldName); if (value != null) { if (value instanceof Map) { item.setValue(getSyncJsonParamValue(value)); if (StringUtils.equals(fieldName, "assignee")) { item.setValue(((Map) value).get("displayName")); } else { item.setValue(getSyncJsonParamValue(value)); } } else if (value instanceof List) { // Sprint 是单选 同步回来是 JSONArray if (StringUtils.equals(item.getType(), "select")) { if (((List) value).size() > 0) { Object o = ((List) value).get(0); if (o instanceof Map) { item.setValue(getSyncJsonParamValue(o)); } } } else { List<Object> values = new ArrayList<>(); ((List) value).forEach(attr -> { if (attr instanceof Map) { values.add(getSyncJsonParamValue(attr)); } else { values.add(attr); } }); item.setValue(values); } } else { item.setValue(value); } } else if (names.contains(fieldName)) { if (item.getType().equals(CustomFieldType.CHECKBOX.getValue())) { item.setValue(new ArrayList<>()); } else { item.setValue(null); } } else { try { if (item.getValue() != null) { item.setValue(JSON.parseObject(item.getValue().toString())); } } catch (Exception e) { LogUtil.error(e); } } }); return customFields; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: syncIssueCustomFieldList File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
syncIssueCustomFieldList
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
protected String createStringToBeSaved() { DocumentBuilder db = null; String returnString = null; try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); Element root = doc.createElement("diagram"); root.setAttribute("program", Program.getInstance().getProgramName().toLowerCase()); root.setAttribute("version", String.valueOf(Program.getInstance().getVersion())); doc.appendChild(root); // save helptext String helptext = handler.getHelpText(); if (!helptext.equals(Constants.getDefaultHelptext())) { Element help = doc.createElement("help_text"); help.appendChild(doc.createTextNode(helptext)); root.appendChild(help); } // save zoom Element zoom = doc.createElement("zoom_level"); zoom.appendChild(doc.createTextNode(String.valueOf(handler.getGridSize()))); root.appendChild(zoom); createXMLOutputDoc(doc, handler.getDrawPanel().getGridElements(), root); // output the stuff... DOMSource source = new DOMSource(doc); StringWriter stringWriter = new StringWriter(); StreamResult result = new StreamResult(stringWriter); TransformerFactory transFactory = TransformerFactory.newInstance(); Transformer transformer = transFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); transformer.transform(source, result); returnString = stringWriter.toString(); } catch (Exception e) { log.error("Error saving XML.", e); } return returnString; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStringToBeSaved File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java Repository: umlet The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000548
MEDIUM
6.8
umlet
createStringToBeSaved
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting boolean isSnapshotCompatible(TaskSnapshot snapshot) { if (snapshot == null) { return false; } if (!snapshot.getTopActivityComponent().equals(mActivityComponent)) { // Obsoleted snapshot. return false; } final int rotation = mDisplayContent.rotationForActivityInDifferentOrientation(this); final int currentRotation = task.getWindowConfiguration().getRotation(); final int targetRotation = rotation != ROTATION_UNDEFINED // The display may rotate according to the orientation of this activity. ? rotation // The activity won't change display orientation. : currentRotation; if (snapshot.getRotation() != targetRotation) { return false; } final Rect taskBounds = task.getBounds(); int w = taskBounds.width(); int h = taskBounds.height(); final Point taskSize = snapshot.getTaskSize(); if ((Math.abs(currentRotation - targetRotation) % 2) == 1) { // Flip the size if the activity will show in 90 degree difference. final int t = w; w = h; h = t; } // Task size might be changed with the same rotation such as on a foldable device. return Math.abs(((float) taskSize.x / Math.max(taskSize.y, 1)) - ((float) w / Math.max(h, 1))) <= 0.01f; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSnapshotCompatible File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
isSnapshotCompatible
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public String getLabelForJS() throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationException { String label = getTitleBarLabel(); if (label != null) { return StringEscapeUtils.escapeEcmaScript(label); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLabelForJS File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
getLabelForJS
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
public byte[] engineDoFinal( byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException { if (inputLen != 0) { buffer.write(input, inputOffset, inputLen); } byte[] in = buffer.toByteArray(); buffer.reset(); // Convert parameters for use in IESEngine CipherParameters params = new IESWithCipherParameters(engineSpec.getDerivationV(), engineSpec.getEncodingV(), engineSpec.getMacKeySize(), engineSpec.getCipherKeySize()); if (engineSpec.getNonce() != null) { params = new ParametersWithIV(params, engineSpec.getNonce()); } DHParameters dhParams = ((DHKeyParameters)key).getParameters(); byte[] V; if (otherKeyParameter != null) { try { if (state == Cipher.ENCRYPT_MODE || state == Cipher.WRAP_MODE) { engine.init(true, otherKeyParameter, key, params); } else { engine.init(false, key, otherKeyParameter, params); } return engine.processBlock(in, 0, in.length); } catch (Exception e) { throw new BadPaddingException(e.getMessage()); } } if (state == Cipher.ENCRYPT_MODE || state == Cipher.WRAP_MODE) { // Generate the ephemeral key pair DHKeyPairGenerator gen = new DHKeyPairGenerator(); gen.init(new DHKeyGenerationParameters(random, dhParams)); EphemeralKeyPairGenerator kGen = new EphemeralKeyPairGenerator(gen, new KeyEncoder() { public byte[] getEncoded(AsymmetricKeyParameter keyParameter) { byte[] Vloc = new byte[(((DHKeyParameters)keyParameter).getParameters().getP().bitLength() + 7) / 8]; byte[] Vtmp = BigIntegers.asUnsignedByteArray(((DHPublicKeyParameters)keyParameter).getY()); if (Vtmp.length > Vloc.length) { throw new IllegalArgumentException("Senders's public key longer than expected."); } else { System.arraycopy(Vtmp, 0, Vloc, Vloc.length - Vtmp.length, Vtmp.length); } return Vloc; } }); // Encrypt the buffer try { engine.init(key, params, kGen); return engine.processBlock(in, 0, in.length); } catch (Exception e) { throw new BadPaddingException(e.getMessage()); } } else if (state == Cipher.DECRYPT_MODE || state == Cipher.UNWRAP_MODE) { // Decrypt the buffer try { engine.init(key, params, new DHIESPublicKeyParser(((DHKeyParameters)key).getParameters())); return engine.processBlock(in, 0, in.length); } catch (InvalidCipherTextException e) { throw new BadPaddingException(e.getMessage()); } } else { throw new IllegalStateException("IESCipher not initialised"); } }
Vulnerability Classification: - CWE: CWE-361 - CVE: CVE-2016-1000345 - Severity: MEDIUM - CVSS Score: 4.3 Description: modified IESEngine so that MAC check is the primary one added general BadBlockException class for asymmetric ciphers. Function: engineDoFinal File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java Repository: bcgit/bc-java Fixed Code: public byte[] engineDoFinal( byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException { if (inputLen != 0) { buffer.write(input, inputOffset, inputLen); } byte[] in = buffer.toByteArray(); buffer.reset(); // Convert parameters for use in IESEngine CipherParameters params = new IESWithCipherParameters(engineSpec.getDerivationV(), engineSpec.getEncodingV(), engineSpec.getMacKeySize(), engineSpec.getCipherKeySize()); if (engineSpec.getNonce() != null) { params = new ParametersWithIV(params, engineSpec.getNonce()); } DHParameters dhParams = ((DHKeyParameters)key).getParameters(); byte[] V; if (otherKeyParameter != null) { try { if (state == Cipher.ENCRYPT_MODE || state == Cipher.WRAP_MODE) { engine.init(true, otherKeyParameter, key, params); } else { engine.init(false, key, otherKeyParameter, params); } return engine.processBlock(in, 0, in.length); } catch (Exception e) { throw new BadBlockException("unable to process block", e); } } if (state == Cipher.ENCRYPT_MODE || state == Cipher.WRAP_MODE) { // Generate the ephemeral key pair DHKeyPairGenerator gen = new DHKeyPairGenerator(); gen.init(new DHKeyGenerationParameters(random, dhParams)); EphemeralKeyPairGenerator kGen = new EphemeralKeyPairGenerator(gen, new KeyEncoder() { public byte[] getEncoded(AsymmetricKeyParameter keyParameter) { byte[] Vloc = new byte[(((DHKeyParameters)keyParameter).getParameters().getP().bitLength() + 7) / 8]; byte[] Vtmp = BigIntegers.asUnsignedByteArray(((DHPublicKeyParameters)keyParameter).getY()); if (Vtmp.length > Vloc.length) { throw new IllegalArgumentException("Senders's public key longer than expected."); } else { System.arraycopy(Vtmp, 0, Vloc, Vloc.length - Vtmp.length, Vtmp.length); } return Vloc; } }); // Encrypt the buffer try { engine.init(key, params, kGen); return engine.processBlock(in, 0, in.length); } catch (Exception e) { throw new BadBlockException("unable to process block", e); } } else if (state == Cipher.DECRYPT_MODE || state == Cipher.UNWRAP_MODE) { // Decrypt the buffer try { engine.init(key, params, new DHIESPublicKeyParser(((DHKeyParameters)key).getParameters())); return engine.processBlock(in, 0, in.length); } catch (InvalidCipherTextException e) { throw new BadBlockException("unable to process block", e); } } else { throw new IllegalStateException("IESCipher not initialised"); } }
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineDoFinal
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
1
Analyze the following code function for security vulnerabilities
static Bundle createBundleFromNotification(LocalNotification notif){ Bundle b = new Bundle(); b.putString("NOTIF_ID", notif.getId()); b.putString("NOTIF_TITLE", notif.getAlertTitle()); b.putString("NOTIF_BODY", notif.getAlertBody()); b.putString("NOTIF_SOUND", notif.getAlertSound()); b.putString("NOTIF_IMAGE", notif.getAlertImage()); b.putInt("NOTIF_NUMBER", notif.getBadgeNumber()); return b; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createBundleFromNotification File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
createBundleFromNotification
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void setScreenCaptureDisabled( ComponentName who, String callerPackage, boolean disabled, boolean parent) { if (!mHasFeature) { return; } CallerIdentity caller; if (isPolicyEngineForFinanceFlagEnabled()) { caller = getCallerIdentity(who, callerPackage); } else { Objects.requireNonNull(who, "ComponentName is null"); caller = getCallerIdentity(who); if (parent) { Preconditions.checkCallAuthorization( isProfileOwnerOfOrganizationOwnedDevice(caller)); } else { Preconditions.checkCallAuthorization(isProfileOwner(caller) || isDefaultDeviceOwner(caller)); } } if (isPolicyEngineForFinanceFlagEnabled()) { int callerUserId = Binder.getCallingUserHandle().getIdentifier(); int targetUserId = parent ? getProfileParentId(callerUserId) : callerUserId; EnforcingAdmin admin = enforcePermissionAndGetEnforcingAdmin( who, MANAGE_DEVICE_POLICY_SCREEN_CAPTURE, caller.getPackageName(), targetUserId); if ((parent && isProfileOwnerOfOrganizationOwnedDevice(caller)) || isDefaultDeviceOwner(caller)) { if (disabled) { mDevicePolicyEngine.setGlobalPolicy( PolicyDefinition.SCREEN_CAPTURE_DISABLED, admin, new BooleanPolicyValue(disabled)); } else { mDevicePolicyEngine.removeGlobalPolicy( PolicyDefinition.SCREEN_CAPTURE_DISABLED, admin); } } else { if (disabled) { mDevicePolicyEngine.setLocalPolicy( PolicyDefinition.SCREEN_CAPTURE_DISABLED, admin, new BooleanPolicyValue(disabled), callerUserId); } else { mDevicePolicyEngine.removeLocalPolicy( PolicyDefinition.SCREEN_CAPTURE_DISABLED, admin, callerUserId); } } } else { synchronized (getLockObject()) { ActiveAdmin ap = getParentOfAdminIfRequired( getProfileOwnerOrDefaultDeviceOwnerLocked(caller.getUserId()), parent); if (ap.disableScreenCapture != disabled) { ap.disableScreenCapture = disabled; saveSettingsLocked(caller.getUserId()); pushScreenCapturePolicy(caller.getUserId()); } } } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_SCREEN_CAPTURE_DISABLED) .setAdmin(caller.getPackageName()) .setBoolean(disabled) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setScreenCaptureDisabled File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setScreenCaptureDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
protected String getColor(InstanceEvent event) { if (event instanceof InstanceStatusChangedEvent) { return StatusInfo.STATUS_UP.equals(((InstanceStatusChangedEvent) event).getStatusInfo().getStatus()) ? "good" : "danger"; } else { return "#439FE0"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getColor File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getColor
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
private void migratePermissionGrantStatePolicies() { Slogf.i(LOG_TAG, "Migrating PERMISSION_GRANT policy to device policy engine."); for (UserInfo userInfo : mUserManager.getUsers()) { ActiveAdmin admin = getMostProbableDPCAdminForLocalPolicy(userInfo.id); if (admin == null) { Slogf.i(LOG_TAG, "No admin found that can set permission grant state on user " + userInfo.id); continue; } for (PackageInfo packageInfo : getInstalledPackagesOnUser(userInfo.id)) { if (packageInfo.requestedPermissions == null) { continue; } for (String permission : packageInfo.requestedPermissions) { if (!isRuntimePermission(permission)) { continue; } int grantState = DevicePolicyManager.PERMISSION_GRANT_STATE_DEFAULT; try { grantState = getPermissionGrantStateForUser( packageInfo.packageName, permission, new CallerIdentity( mInjector.binderGetCallingUid(), admin.info.getComponent().getPackageName(), admin.info.getComponent()), userInfo.id); } catch (RemoteException e) { Slogf.e(LOG_TAG, e, "Error retrieving permission grant state for %s " + "and %s", packageInfo.packageName, permission); } if (grantState == DevicePolicyManager.PERMISSION_GRANT_STATE_DEFAULT) { // Not Controlled by a policy continue; } mDevicePolicyEngine.setLocalPolicy( PolicyDefinition.PERMISSION_GRANT(packageInfo.packageName, permission), EnforcingAdmin.createEnterpriseEnforcingAdmin( admin.info.getComponent(), admin.getUserHandle().getIdentifier()), new IntegerPolicyValue(grantState), userInfo.id, /* skipEnforcePolicy= */ true); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migratePermissionGrantStatePolicies File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
migratePermissionGrantStatePolicies
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void logStream(InputStream input, Pattern success, Pattern failure) { Thread thread = new Thread(() -> { InputStreamReader reader = new InputStreamReader(input, StandardCharsets.UTF_8); try { readLinesLoop(success, failure, reader); } catch (IOException e) { if ("Stream closed".equals(e.getMessage())) { console(GREEN, END); getLogger().debug("Exception when reading webpack output.", e); } else { getLogger().error("Exception when reading webpack output.", e); } } // Process closed stream, means that it exited, notify // DevModeHandler to continue doNotify(); }); thread.setDaemon(true); thread.setName("webpack"); thread.start(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logStream File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
logStream
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection put(final String path1, final String path2, final String path3, final Route.Filter filter) { return new Route.Collection( new Route.Definition[]{put(path1, filter), put(path2, filter), put(path3, filter)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
put
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public int acceptServerAuthentication(SVNURL url, String realm, Object certificate, boolean resultMayBeStored) { return ACCEPTED_TEMPORARY; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: acceptServerAuthentication File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
acceptServerAuthentication
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Get the exception that occurred, if any Throwable t = (Throwable) request .getAttribute("javax.servlet.error.exception"); String logInfo = UIUtil.getRequestLogInfo(request); // Log the error. Since we don't have a context, we need to // build the info "by hand" String logMessage = ":session_id=" + request.getSession().getId() + ":internal_error:" + logInfo; log.warn(logMessage, t); // Now we try and mail the designated user, if any UIUtil.sendAlert(request, (Exception) t); JSPManager.showJSP(request, response, "/error/internal.jsp"); }
Vulnerability Classification: - CWE: CWE-209 - CVE: CVE-2022-31189 - Severity: MEDIUM - CVSS Score: 5.3 Description: [DS-4449] Sanitise stacktrace output and default to NOT output stacktraces Function: doGet File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/InternalErrorServlet.java Repository: DSpace Fixed Code: protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { UUID errorCode = UUID.randomUUID(); // Get the exception that occurred, if any Throwable t = (Throwable) request .getAttribute("javax.servlet.error.exception"); String logInfo = UIUtil.getRequestLogInfo(request); // Log the error. Since we don't have a context, we need to // build the info "by hand" String logMessage = ":error_code=" + errorCode + ":session_id=" + request.getSession().getId() + ":internal_error:" + logInfo; log.warn(logMessage, t); // Now we try and mail the designated user, if any UIUtil.sendAlert(request, (Exception) t); request.setAttribute("javax.servlet.error.code", errorCode.toString()); JSPManager.showJSP(request, response, "/error/internal.jsp"); }
[ "CWE-209" ]
CVE-2022-31189
MEDIUM
5.3
DSpace
doGet
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/InternalErrorServlet.java
afcc6c3389729b85d5c7b0230cbf9aaf7452f31a
1
Analyze the following code function for security vulnerabilities
protected Grid getParentGrid() { if (getParent() instanceof Grid) { Grid grid = (Grid) getParent(); return grid; } else if (getParent() == null) { throw new IllegalStateException( "Renderer is not attached to any parent"); } else { throw new IllegalStateException( "Renderers can be used only with Grid. Extended " + getParent().getClass().getSimpleName() + " instead"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParentGrid File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
getParentGrid
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public static List<Structure> getStructures(String orderBy,int limit,String direction) { List<Structure> list = new ArrayList<Structure>(); String condition = ""; list = InodeFactory.getInodesOfClassByConditionAndOrderBy(Structure.class,condition,orderBy,limit,0,direction); return list; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStructures File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
getStructures
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public EnvPredicate on(final String env, final Consumer<Config> callback) { requireNonNull(env, "Env is required."); return on(envpredicate(env), callback); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: on File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
on
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
@Override public void setUserSelectionAllowed(boolean userSelectionAllowed) { getState().userSelectionAllowed = userSelectionAllowed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserSelectionAllowed File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
setUserSelectionAllowed
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void checkCaller() { if (mCallingUid != Binder.getCallingUid()) { throw new SecurityException("Caller " + mCallingUid + " does not match caller of getAppTasks(): " + Binder.getCallingUid()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkCaller File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
checkCaller
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
void checkForMain(List<JARDesc> jars) throws LaunchException { // Check launch info if (mainClass == null) { final EntryPoint entryPoint = file.getEntryPointDesc(); if (entryPoint != null) { mainClass = entryPoint.getMainClass(); } } // The main class may be specified in the manifest if (mainClass == null) { mainClass = file.getManifestAttributesReader().getAttributeFromJars(Attributes.Name.MAIN_CLASS, jars, tracker); } final String desiredJarEntryName = mainClass + ".class"; for (JARDesc jar : jars) { try { final File localFile = tracker.getCacheFile(jar.getLocation()); if (localFile == null) { LOG.warn("JAR {} not found. Continuing.", jar.getLocation()); continue; // JAR not found. Keep going. } final JarFile jarFile = new JarFile(localFile); for (JarEntry entry : Collections.list(jarFile.entries())) { String jeName = entry.getName().replaceAll("/", "."); if (jeName.equals(desiredJarEntryName)) { foundMainJar = true; verifySignedJNLP(jar, jarFile); break; } } jarFile.close(); } catch (IOException e) { /* * After this exception is caught, it is escaped. This will skip * the jarFile that may have thrown this exception and move on * to the next jarFile (if there are any) */ } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkForMain File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
checkForMain
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Override public void listNamedQueries(String projectName, AsyncMethodCallback resultHandler) { unimplemented(resultHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listNamedQueries File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
listNamedQueries
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
@Override protected boolean doInvokeUnimplementedMessageHandler(int cmd, Buffer buffer) throws Exception { /* * SSHD-968 Some servers respond to global requests with SSH_MSG_UNIMPLEMENTED instead of * SSH_MSG_REQUEST_FAILURE (as mandated by https://tools.ietf.org/html/rfc4254#section-4) so deal with it. */ if (!pendingGlobalRequests.isEmpty() && cmd == SshConstants.SSH_MSG_UNIMPLEMENTED) { // We do have ongoing global requests. long msgSeqNo = buffer.rawUInt(buffer.rpos()); // Find the global request this applies to GlobalRequestFuture future = pendingGlobalRequests.stream().filter(f -> f.getSequenceNumber() == msgSeqNo).findAny() .orElse(null); if (future != null && pendingGlobalRequests.removeFirstOccurrence(future)) { // This SSH_MSG_UNIMPLEMENTED was the reply to a global request. if (log.isDebugEnabled()) { log.debug("doInvokeUnimplementedMessageHandler({}) report global request={} failure for seqNo={}", this, future.getId(), msgSeqNo); } GlobalRequestFuture.ReplyHandler handler = future.getHandler(); if (handler != null) { Buffer resultBuf = ByteArrayBuffer.getCompactClone(buffer.array(), buffer.rpos(), buffer.available()); handler.accept(cmd, resultBuf); } else { future.setValue(new GlobalRequestException(cmd)); } return true; // message handled internally } else if (future != null) { // The SSH_MSG_UNIMPLEMENTED was for a global request, but that request is no longer in the list: it // got terminated otherwise. return true; } if (log.isTraceEnabled()) { log.trace( "doInvokeUnimplementedMessageHandler({}) SSH_MSG_UNIMPLEMENTED with message seqNo={} not for a global request", this, msgSeqNo); } } return super.doInvokeUnimplementedMessageHandler(cmd, buffer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doInvokeUnimplementedMessageHandler File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
doInvokeUnimplementedMessageHandler
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
public MyViewsTabBar getMyViewsTabBar() { return myViewsTabBar; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMyViewsTabBar File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getMyViewsTabBar
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public void finishToken() throws IOException { if (_tokenIncomplete) { _finishToken(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishToken File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
finishToken
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (!mAllowTouches) { return false; } if (mAllowMenuTimeout) { repostDelayedHide(POST_INTERACTION_DISMISS_DELAY); } return super.dispatchTouchEvent(ev); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchTouchEvent File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40123
MEDIUM
5.5
android
dispatchTouchEvent
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
0
Analyze the following code function for security vulnerabilities
private void initializeFeedbackInfo( final ExpandableNotificationRow row, FeedbackInfo feedbackInfo) { if (mAssistantFeedbackController.getFeedbackIcon(row.getEntry()) == null) { return; } StatusBarNotification sbn = row.getEntry().getSbn(); UserHandle userHandle = sbn.getUser(); PackageManager pmUser = CentralSurfaces.getPackageManagerForUser(mContext, userHandle.getIdentifier()); feedbackInfo.bindGuts(pmUser, sbn, row.getEntry(), row, mAssistantFeedbackController); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeFeedbackInfo File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
initializeFeedbackInfo
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
public Future<Void> accessSession(VaadinSession session, Command command) { FutureAccess future = new FutureAccess(session, command); session.getPendingAccessQueue().add(future); ensureAccessQueuePurged(session); return future; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: accessSession File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
accessSession
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
Rect getParentFrame() { return mWindowFrames.mParentFrame; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParentFrame File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getParentFrame
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private final void verifyStatesForce() { verifyStatesInner(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyStatesForce File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
verifyStatesForce
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
private void fillObjectSummary(ObjectSummary objectSummary, Document doc, BaseObject xwikiObject, Boolean withPrettyNames) { objectSummary.setId(String.format("%s:%s", doc.getPrefixedFullName(), xwikiObject.getGuid())); objectSummary.setGuid(xwikiObject.getGuid()); objectSummary.setPageId(doc.getPrefixedFullName()); objectSummary.setPageVersion(doc.getVersion()); objectSummary.setPageAuthor(doc.getAuthor()); if (withPrettyNames) { XWikiContext xwikiContext = this.xcontextProvider.get(); objectSummary .setPageAuthorName(xwikiContext.getWiki().getUserName(doc.getAuthor(), null, false, xwikiContext)); } objectSummary.setWiki(doc.getWiki()); objectSummary.setSpace(doc.getSpace()); objectSummary.setPageName(doc.getDocumentReference().getName()); objectSummary.setClassName(xwikiObject.getClassName()); objectSummary.setNumber(xwikiObject.getNumber()); String[] propertyNames = xwikiObject.getPropertyNames(); if (propertyNames.length > 0) { try { objectSummary.setHeadline(serializePropertyValue(xwikiObject.get(propertyNames[0]))); } catch (XWikiException e) { // Should never happen } } }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2023-35151 - Severity: HIGH - CVSS Score: 7.5 Description: XWIKI-16138: Improved REST properties cleanup Function: fillObjectSummary File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java Repository: xwiki/xwiki-platform Fixed Code: private void fillObjectSummary(ObjectSummary objectSummary, Document doc, BaseObject xwikiObject, Boolean withPrettyNames) { objectSummary.setId(String.format("%s:%s", doc.getPrefixedFullName(), xwikiObject.getGuid())); objectSummary.setGuid(xwikiObject.getGuid()); objectSummary.setPageId(doc.getPrefixedFullName()); objectSummary.setPageVersion(doc.getVersion()); objectSummary.setPageAuthor(doc.getAuthor()); if (withPrettyNames) { XWikiContext xwikiContext = this.xcontextProvider.get(); objectSummary .setPageAuthorName(xwikiContext.getWiki().getUserName(doc.getAuthor(), null, false, xwikiContext)); } objectSummary.setWiki(doc.getWiki()); objectSummary.setSpace(doc.getSpace()); objectSummary.setPageName(doc.getDocumentReference().getName()); objectSummary.setClassName(xwikiObject.getClassName()); objectSummary.setNumber(xwikiObject.getNumber()); String[] propertyNames = xwikiObject.getPropertyNames(); if (propertyNames.length > 0) { try { String firstPropertyName = propertyNames[0]; BaseClass baseClass = xwikiObject.getXClass(this.xcontextProvider.get()); PropertyInterface field = baseClass.getField(firstPropertyName); // The property might not exist in the class. But if it does, it will be a PropertyClass. if (field != null) { String classType = ((com.xpn.xwiki.objects.classes.PropertyClass) field).getClassType(); objectSummary.setHeadline(cleanupBeforeMakingPublic(classType, xwikiObject.get(firstPropertyName))); } else { objectSummary.setHeadline(serializePropertyValue(xwikiObject.get(firstPropertyName))); } } catch (XWikiException e) { // Should never happen } } }
[ "CWE-668" ]
CVE-2023-35151
HIGH
7.5
xwiki/xwiki-platform
fillObjectSummary
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
824cd742ecf5439971247da11bfe7e0ad2b10ede
1
Analyze the following code function for security vulnerabilities
private void sendPackageChangedBroadcast(String packageName, boolean killFlag, ArrayList<String> componentNames, int packageUid) { if (DEBUG_INSTALL) Log.v(TAG, "Sending package changed: package=" + packageName + " components=" + componentNames); Bundle extras = new Bundle(4); extras.putString(Intent.EXTRA_CHANGED_COMPONENT_NAME, componentNames.get(0)); String nameList[] = new String[componentNames.size()]; componentNames.toArray(nameList); extras.putStringArray(Intent.EXTRA_CHANGED_COMPONENT_NAME_LIST, nameList); extras.putBoolean(Intent.EXTRA_DONT_KILL_APP, killFlag); extras.putInt(Intent.EXTRA_UID, packageUid); sendPackageBroadcast(Intent.ACTION_PACKAGE_CHANGED, packageName, extras, null, null, new int[] {UserHandle.getUserId(packageUid)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendPackageChangedBroadcast File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
sendPackageChangedBroadcast
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public boolean shouldUseNonPersistentRandomization(WifiConfiguration config) { // If this is the secondary STA for multi internet for DBS AP, use non persistent mac // randomization, as the primary and secondary STAs could connect to the same SSID. if (isMacRandomizationSupported() && config.dbsSecondaryInternet) { return true; } if (!isMacRandomizationSupported() || config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_NONE) { return false; } // Use non-persistent randomization if it's forced on by dev option if (mFrameworkFacade.getIntegerSetting(mContext, NON_PERSISTENT_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0) == 1) { return true; } // use non-persistent or persistent randomization if configured to do so. if (config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_NON_PERSISTENT) { return true; } if (config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_PERSISTENT) { return false; } // otherwise the wifi frameworks should decide automatically if (config.getIpConfiguration().getIpAssignment() == IpConfiguration.IpAssignment.STATIC) { return false; } if (config.isOpenNetwork() && shouldEnableNonPersistentRandomizationOnOpenNetwork(config)) { return true; } if (config.isPasspoint()) { return isNetworkOptInForNonPersistentRandomization(config.FQDN); } else { return isNetworkOptInForNonPersistentRandomization(config.SSID); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldUseNonPersistentRandomization File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
shouldUseNonPersistentRandomization
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void validateName(Object name) { checkNotNull(name, "name"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateName File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
validateName
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
private static native int nativeThemeGetAttributeValue(long ptr, long themePtr, @AttrRes int resId, @NonNull TypedValue outValue, boolean resolve);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeThemeGetAttributeValue File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeThemeGetAttributeValue
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
protected void sendDataToClient(boolean initial) { if (getDataProvider() == null) { return; } if (initial || reset) { if (reset) { handler.dropAllActiveData(); } rpc.reset(getDataProviderSize()); } if (!updatedData.isEmpty()) { JsonArray dataArray = Json.createArray(); int i = 0; for (T data : updatedData) { dataArray.set(i++, getDataObject(data)); } rpc.updateData(dataArray); } Range requestedRows = getPushRows(); boolean triggerReset = false; if (!requestedRows.isEmpty()) { int offset = requestedRows.getStart(); int limit = requestedRows.length(); List<T> rowsToPush = fetchItemsWithRange(offset, limit); if (!initial && !reset && rowsToPush.isEmpty()) { triggerReset = true; } pushData(offset, rowsToPush); } setPushRows(Range.withLength(0, 0)); reset = triggerReset; updatedData.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendDataToClient File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-20" ]
CVE-2021-33609
MEDIUM
4
vaadin/framework
sendDataToClient
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
0
Analyze the following code function for security vulnerabilities
@Override public void pushRegistrationError(String error, int errorCode) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pushRegistrationError File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
pushRegistrationError
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public static void deleteAllHosts() { try { sService.deleteAllHosts(); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAllHosts File: core/java/android/appwidget/AppWidgetHost.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
deleteAllHosts
core/java/android/appwidget/AppWidgetHost.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
private Externalizable readGzipped(InputStream in, String className, ClassLoader classLoader) throws Exception { ExtendedGZipInputStream gzip = new ExtendedGZipInputStream(in); try { Externalizable external = read(gzip, className, classLoader); gzip.pushBackUnconsumedBytes(); return external; } finally { gzip.closeInflater(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readGzipped File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
readGzipped
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@GetMapping("nav-settings") public RespBody gets(HttpServletRequest request) { final ID user = getRequestUser(request); final String cfgid = request.getParameter("id"); // 管理员才可以新建(多个) if ("NEW".equalsIgnoreCase(cfgid)) { return RespBody.ok(); } else if (ID.isId(cfgid)) { return RespBody.ok(NavManager.instance.getNavLayoutById(ID.valueOf(cfgid))); } else { return RespBody.ok(NavManager.instance.getNavLayout(user)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gets File: src/main/java/com/rebuild/web/configuration/NavSettings.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
gets
src/main/java/com/rebuild/web/configuration/NavSettings.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
public static TreeType toBukkitTreeType(TreeGenerator.TreeType type) { return treeTypeMapping.get(type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toBukkitTreeType File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
toBukkitTreeType
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
@SoftKeyboardShowMode public int getShowMode() { try { return Settings.Secure.getInt(mService.getContentResolver(), Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE); } catch (Settings.SettingNotFoundException e) { Log.v(LOG_TAG, "Failed to obtain the soft keyboard mode", e); // The settings hasn't been changed yet, so it's value is null. Return the default. return 0; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShowMode File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
getShowMode
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
public Path getEditorTreeModelPath() { return editorTreeModelPath; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEditorTreeModelPath File: src/main/java/org/olat/fileresource/types/ImsCPFileResource.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
getEditorTreeModelPath
src/main/java/org/olat/fileresource/types/ImsCPFileResource.java
699490be8e931af0ef1f135c55384db1f4232637
0
Analyze the following code function for security vulnerabilities
private void initRandomizedMacForInternalConfig(WifiConfiguration internalConfig) { MacAddress randomizedMac = shouldUseNonPersistentRandomization(internalConfig) ? MacAddressUtils.createRandomUnicastAddress() : getPersistentMacAddress(internalConfig); if (randomizedMac != null) { setRandomizedMacAddress(internalConfig, randomizedMac); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initRandomizedMacForInternalConfig File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
initRandomizedMacForInternalConfig
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private static String[] concat(String[]... arrays) { int resultLength = 0; for (String[] array : arrays) { resultLength += array.length; } String[] result = new String[resultLength]; int resultOffset = 0; for (String[] array : arrays) { System.arraycopy(array, 0, result, resultOffset, array.length); resultOffset += array.length; } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: concat File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
concat
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
@Column(name = "ip", nullable = false, length = 64) public String getIp() { return this.ip; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2020-21333 - Severity: LOW - CVSS Score: 3.5 Description: https://github.com/sanluan/PublicCMS/issues/26 https://github.com/sanluan/PublicCMS/issues/27 Function: getIp File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java Repository: sanluan/PublicCMS Fixed Code: @Column(name = "ip", nullable = false, length = 130) public String getIp() { return this.ip; }
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getIp
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
b4d5956e65b14347b162424abb197a180229b3db
1
Analyze the following code function for security vulnerabilities
@Override public void rescheduleAnrDialog(Object data) { Message msg = Message.obtain(); msg.what = SHOW_NOT_RESPONDING_UI_MSG; msg.obj = (AppNotRespondingDialog.Data) data; mUiHandler.sendMessageDelayed(msg, InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rescheduleAnrDialog File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
rescheduleAnrDialog
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public void onUidStateChanged(int uid, int procState, long procStateSeq, int capability) { injectPostToHandler(() -> handleOnUidStateChanged(uid, procState)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUidStateChanged File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
onUidStateChanged
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public Object read(final InputStream inputStream) throws SAXException, IOException { return read( new InputSource( inputStream ) ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java Repository: apache/incubator-kie-drools The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2014-8125
HIGH
7.5
apache/incubator-kie-drools
read
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
0
Analyze the following code function for security vulnerabilities
public String getContainerStructureGroup() { return containerStructureGroup; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContainerStructureGroup File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
getContainerStructureGroup
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public String getUnresolvedIndexPattern(User user) { return replaceProperties(indexPattern, user); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUnresolvedIndexPattern File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
getUnresolvedIndexPattern
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0
Analyze the following code function for security vulnerabilities
public Pipeline checkinRevisionsToBuild(ManualBuild build, PipelineConfig pipelineConfig, List<MaterialRevision> revisions) { return pipelineService.save( instanceFactory.createPipelineInstance(pipelineConfig, build.onModifications(new MaterialRevisions(revisions), false, null), new DefaultSchedulingContext(), "md5-test", new TimeProvider())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkinRevisionsToBuild File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
checkinRevisionsToBuild
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
private void serveStaticFile(String reqURI, String hashKey, File staticResourceFile, long lastModifiedEpochSeconds, ChannelHandlerContext ctx) throws Exception { RandomAccessFile fileToServe = null; try { // Create new RandomAccessFile (which allows us to find file length etc.) fileToServe = new RandomAccessFile(staticResourceFile, "r"); // ----------------------------------------- // Serve a static file (not authenticated) // ----------------------------------------- DefaultHttpResponse httpRes = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK); httpRes.headers().add("Server", GribbitServer.SERVER_IDENTIFIER); long fileLength = fileToServe.length(); httpRes.headers().set(CONTENT_LENGTH, Long.toString(fileLength)); WebUtils.setContentTypeHeaders(httpRes.headers(), staticResourceFile.getPath()); // If the file contents have changed since the last time the file was hashed, // schedule the file to be hashed in the background so that future references to the // file's URI in a src/href attribute of served HTML templates will include a hash // URI rather than the original URI for the file, allowing the browser to cache the // file indefinitely until it changes. CacheExtension.updateHashURI(reqURI, staticResourceFile); // If file was already cached, and the request URI included the hash key, then this is // the first time this client has fetched this file since the browser cache was last // cleared. Mark this resource as indefinitely cached. If the file is not being served // on a hash URI, then at least set the Last-Modified header, so that if the client // requests the same unmodified resource again on the same non-hash URI, the server can // return Not Modified instead of serving the contents of the file. setDateAndCacheHeaders(httpRes.headers(), ZonedDateTime.now(), lastModifiedEpochSeconds, // hashKey != null ? /* cache indefinitely: */-1 : /* ignored if hashKey == null: */0, hashKey); if (addKeepAliveHeader) { httpRes.headers().add(CONNECTION, KEEP_ALIVE); } // Write HTTP headers to channel ctx.write(httpRes); // Write file content to channel. // Can add ChannelProgressiveFutureListener to sendFileFuture if we need to track // progress (e.g. to update user's UI over a web socket to show download progress.) ChannelFuture sendFileFuture; ChannelFuture lastContentFuture; if (ctx.pipeline().get(SslHandler.class) == null) { // Use FileRegions if possible, which supports zero-copy / mmio sendFileFuture = ctx.write(new DefaultFileRegion(fileToServe.getChannel(), 0, fileLength), ctx.newProgressivePromise()); // Write the end marker lastContentFuture = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); } else { // Can't use FileRegions / zero-copy with SSL sendFileFuture = ctx.write(new HttpChunkedInput(new ChunkedFile(fileToServe, 0, fileLength, 1)), ctx.newProgressivePromise()); // HttpChunkedInput will write the end marker (LastHttpContent) for us. // See https://github.com/netty/netty/commit/4ba2ce3cbbc55391520cfc98a7d4227630fbf978 lastContentFuture = sendFileFuture; } // sendFileFuture.addListener(new ChannelProgressiveFutureListener() { // @Override // public void operationProgressed(ChannelProgressiveFuture future, long progress, long total) { // if (total < 0) { // total unknown // System.err.println(future.channel() + " Transfer progress: " + progress); // } else { // System.err.println(future.channel() + " Transfer progress: " + progress + " / " + total); // } // } // // @Override // public void operationComplete(ChannelProgressiveFuture future) { // System.err.println(future.channel() + " Transfer complete."); // } // }); // Close connection after flush if needed, and close file after flush final RandomAccessFile fileToClose = fileToServe; lastContentFuture.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) { if (closeAfterWrite) { future.channel().close(); } try { fileToClose.close(); } catch (IOException e) { } } }); } catch (Exception e) { if (fileToServe != null) { try { fileToServe.close(); } catch (IOException e1) { } } throw new RuntimeException("Exception serving static file", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: serveStaticFile File: src/gribbit/request/HttpRequestHandler.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
serveStaticFile
src/gribbit/request/HttpRequestHandler.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
private void revokePermissions(String topicUri, String role) { Policies policies; try { policies = namespaceResources().get(path(POLICIES, namespaceName.toString())) .orElseThrow(() -> new RestException(Status.NOT_FOUND, "Namespace does not exist")); } catch (Exception e) { log.error("[{}] Failed to revoke permissions for topic {}", clientAppId(), topicUri, e); throw new RestException(e); } if (!policies.auth_policies.getTopicAuthentication().containsKey(topicUri) || !policies.auth_policies.getTopicAuthentication().get(topicUri).containsKey(role)) { log.warn("[{}] Failed to revoke permission from role {} on topic: Not set at topic level {}", clientAppId(), role, topicUri); throw new RestException(Status.PRECONDITION_FAILED, "Permissions are not set at the topic level"); } try { // Write the new policies to zookeeper String namespacePath = path(POLICIES, namespaceName.toString()); namespaceResources().set(namespacePath, (p) -> { p.auth_policies.getTopicAuthentication().get(topicUri).remove(role); return p; }); log.info("[{}] Successfully revoke access for role {} - topic {}", clientAppId(), role, topicUri); } catch (Exception e) { log.error("[{}] Failed to revoke permissions for topic {}", clientAppId(), topicUri, e); throw new RestException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: revokePermissions File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
revokePermissions
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
private BookmarkDialog redraw() { clearContent(); final AbstractSecuredPage page = (AbstractSecuredPage) NavTopPanel.this.getPage(); { final FieldsetPanel fs = gridBuilder.newFieldset(getString("bookmark.directPageLink")).setLabelSide(false); final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), new Model<String>(page.getPageAsLink())); fs.add(textArea); textArea.add(AttributeModifier.replace("onClick", "$(this).select();")); } final PageParameters params = page.getBookmarkableInitialParameters(); if (params.isEmpty() == false) { final FieldsetPanel fs = gridBuilder.newFieldset(getString(page.getTitleKey4BookmarkableInitialParameters())).setLabelSide(false); final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), new Model<String>(page.getPageAsLink(params))); fs.add(textArea); textArea.add(AttributeModifier.replace("onClick", "$(this).select();")); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: redraw File: src/main/java/org/projectforge/web/core/NavTopPanel.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
redraw
src/main/java/org/projectforge/web/core/NavTopPanel.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
public void initUrlFileConfig() { logger.info("init url file module"); urlFileButton.addActionListener(e -> { urlField.setText(null); rawFileField.setText(null); JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); int option = fileChooser.showOpenDialog(new JFrame()); if (option == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); String absPath = file.getAbsolutePath(); urlFileField.setText(absPath); xrayCmd.setInputPrefix("--url-file"); xrayCmd.setInput(String.format("%s", absPath)); } else { if (LANG == CHINESE) { rawFileField.setText("你取消了选择"); } else { rawFileField.setText("Cancel"); } } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initUrlFileConfig File: src/main/java/com/chaitin/xray/form/MainForm.java Repository: 4ra1n/super-xray The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-41958
HIGH
7.8
4ra1n/super-xray
initUrlFileConfig
src/main/java/com/chaitin/xray/form/MainForm.java
4d0d59663596db03f39d7edd2be251d48b52dcfc
0
Analyze the following code function for security vulnerabilities
private boolean shouldSleepLocked() { // Resume applications while running a voice interactor. if (mRunningVoice) { return false; } switch (mWakefulness) { case PowerManagerInternal.WAKEFULNESS_AWAKE: case PowerManagerInternal.WAKEFULNESS_DREAMING: // If we're interactive but applications are already paused then defer // resuming them until the lock screen is hidden. return mSleeping && mLockScreenShown != LOCK_SCREEN_HIDDEN; case PowerManagerInternal.WAKEFULNESS_DOZING: // If we're dozing then pause applications whenever the lock screen is shown. return mLockScreenShown != LOCK_SCREEN_HIDDEN; case PowerManagerInternal.WAKEFULNESS_ASLEEP: default: // If we're asleep then pause applications unconditionally. return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldSleepLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
shouldSleepLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public void sendResponse(TransportResponse response, TransportResponseOptions options) throws IOException { BytesStreamOutput bStream = new BytesStreamOutput(); StreamOutput stream = new HandlesStreamOutput(bStream); stream.setVersion(version); stream.writeLong(requestId); byte status = 0; status = TransportStatus.setResponse(status); stream.writeByte(status); // 0 for request, 1 for response. response.writeTo(stream); stream.close(); final byte[] data = bStream.bytes().toBytes(); targetTransport.workers().execute(new Runnable() { @Override public void run() { targetTransport.messageReceived(data, action, sourceTransport, version, null); } }); sourceTransportServiceAdapter.onResponseSent(requestId, action, response, options); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendResponse File: src/main/java/org/elasticsearch/transport/local/LocalTransportChannel.java Repository: elastic/elasticsearch The code follows secure coding practices.
[ "CWE-74" ]
CVE-2015-5377
HIGH
7.5
elastic/elasticsearch
sendResponse
src/main/java/org/elasticsearch/transport/local/LocalTransportChannel.java
bf3052d14c874aead7da8855c5fcadf5428a43f2
0
Analyze the following code function for security vulnerabilities
public static boolean matches(StartElement startElement, String tag) { String elementTag = getStartElementName(startElement); return tag.equals(elementTag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: matches File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java Repository: keycloak The code follows secure coding practices.
[ "CWE-200" ]
CVE-2017-2582
MEDIUM
4
keycloak
matches
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
0cb5ba0f6e83162d221681f47b470c3042eef237
0
Analyze the following code function for security vulnerabilities
private Class<?> getModelType() { return grid.getContainerDataSource() .getType(grid.getPropertyIdByColumnId(state.id)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModelType File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
getModelType
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") public String getxWikiClassXML() { return getXClassXML(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getxWikiClassXML File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getxWikiClassXML
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
public Page<E> setReasonable(Boolean reasonable) { if (reasonable == null) { return this; } this.reasonable = reasonable; //分页合理化,针对不合理的页码自动处理 if (this.reasonable && this.pageNum <= 0) { this.pageNum = 1; calculateStartAndEndRow(); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setReasonable File: src/main/java/com/github/pagehelper/Page.java Repository: pagehelper/Mybatis-PageHelper The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-28111
HIGH
7.5
pagehelper/Mybatis-PageHelper
setReasonable
src/main/java/com/github/pagehelper/Page.java
554a524af2d2b30d09505516adc412468a84d8fa
0
Analyze the following code function for security vulnerabilities
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Dump of WifiConfigManager"); pw.println("WifiConfigManager - Log Begin ----"); mLocalLog.dump(fd, pw, args); pw.println("WifiConfigManager - Log End ----"); pw.println("WifiConfigManager - Configured networks Begin ----"); for (WifiConfiguration network : getInternalConfiguredNetworks()) { pw.println(network); } pw.println("WifiConfigManager - Configured networks End ----"); pw.println("WifiConfigManager - ConfigurationMap Begin ----"); mConfiguredNetworks.dump(fd, pw, args); pw.println("WifiConfigManager - ConfigurationMap End ----"); pw.println("WifiConfigManager - Next network ID to be allocated " + mNextNetworkId); pw.println("WifiConfigManager - Last selected network ID " + mLastSelectedNetworkId); pw.println("WifiConfigManager - PNO scan frequency culling enabled = " + mContext.getResources().getBoolean(R.bool.config_wifiPnoFrequencyCullingEnabled)); pw.println("WifiConfigManager - PNO scan recency sorting enabled = " + mContext.getResources().getBoolean(R.bool.config_wifiPnoRecencySortingEnabled)); mWifiConfigStore.dump(fd, pw, args); mWifiCarrierInfoManager.dump(fd, pw, args); mNonCarrierMergedNetworksStatusTracker.dump(fd, pw, args); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
dump
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public Sysprop getCustomTheme() { String id = "theme" + Para.getConfig().separator() + "custom"; if (customTheme == null) { customTheme = (Sysprop) Optional.ofNullable(pc.read(id)).orElseGet(this::getDefaultThemeObject); } return customTheme; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCustomTheme File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getCustomTheme
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override protected void addDefaults(ClientModel client) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDefaults File: services/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java Repository: keycloak The code follows secure coding practices.
[ "CWE-287" ]
CVE-2021-3827
MEDIUM
6.8
keycloak
addDefaults
services/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java
44000caaf5051d7f218d1ad79573bd3d175cad0d
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") @Deprecated // since 2.12 protected T _deserializeFromEmpty(JsonParser p, DeserializationContext ctxt) throws IOException { if (p.hasToken(JsonToken.START_ARRAY)) { if (ctxt.isEnabled(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT)) { JsonToken t = p.nextToken(); if (t == JsonToken.END_ARRAY) { return null; } return (T) ctxt.handleUnexpectedToken(getValueType(ctxt), p); } } return (T) ctxt.handleUnexpectedToken(getValueType(ctxt), p); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _deserializeFromEmpty File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42003
HIGH
7.5
FasterXML/jackson-databind
_deserializeFromEmpty
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
d78d00ee7b5245b93103fef3187f70543d67ca33
0
Analyze the following code function for security vulnerabilities
public int getInt(String key) throws JSONException { return doGetInt(key, get(key)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInt File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getInt
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
private String getContentOfSection10(int sectionNumber) throws XWikiException { List<DocumentSection> splitSections = getSections(); int indexEnd = 0; // get current section DocumentSection section = splitSections.get(sectionNumber - 1); int indexStart = section.getSectionIndex(); String sectionLevel = section.getSectionLevel(); // Determine where this section ends, which is at the start of the next section of the // same or a higher level. for (int i = sectionNumber; i < splitSections.size(); i++) { DocumentSection nextSection = splitSections.get(i); String nextLevel = nextSection.getSectionLevel(); if (sectionLevel.equals(nextLevel) || sectionLevel.length() > nextLevel.length()) { indexEnd = nextSection.getSectionIndex(); break; } } String sectionContent = null; if (indexStart < 0) { indexStart = 0; } if (indexEnd == 0) { sectionContent = getContent().substring(indexStart); } else { sectionContent = getContent().substring(indexStart, indexEnd); } return sectionContent; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentOfSection10 File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
getContentOfSection10
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Override public boolean addPermission(PermissionInfo info) { synchronized (mPackages) { return addPermissionLocked(info, false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPermission File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
addPermission
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
RemoteTransition takeRemoteTransition() { RemoteTransition out = mPendingRemoteTransition; mPendingRemoteTransition = null; return out; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: takeRemoteTransition File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
takeRemoteTransition
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void commitRouting() { mHandler.sendEmptyMessage(MSG_COMMIT_ROUTING); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: commitRouting File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
commitRouting
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
@Override public void setTaskDescription(IBinder token, ActivityManager.TaskDescription values) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); values.writeToParcel(data, 0); mRemote.transact(SET_TASK_DESCRIPTION_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTaskDescription File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
setTaskDescription
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public static <T> T unmarshal(final Class<T> clazz, final InputSource inputSource) { return unmarshal(clazz, inputSource, VALIDATE_IF_POSSIBLE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unmarshal File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-0871
MEDIUM
6.1
OpenNMS/opennms
unmarshal
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
3c17231714e3d55809efc580a05734ed530f9ad4
0
Analyze the following code function for security vulnerabilities
public void setAlwaysOnVpnPackage(@NonNull ComponentName admin, @Nullable String vpnPackage, boolean lockdownEnabled) throws NameNotFoundException { setAlwaysOnVpnPackage(admin, vpnPackage, lockdownEnabled, Collections.emptySet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAlwaysOnVpnPackage File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setAlwaysOnVpnPackage
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public int[] getEnabledGroupProfileIds(int userId) { final int parentId = getGroupParent(userId); final List<UserInfo> profiles; final long identity = Binder.clearCallingIdentity(); try { profiles = mUserManager.getProfiles(parentId); } finally { Binder.restoreCallingIdentity(identity); } int enabledProfileCount = 0; final int profileCount = profiles.size(); for (int i = 0; i < profileCount; i++) { if (profiles.get(i).isEnabled()) { enabledProfileCount++; } } int enabledProfileIndex = 0; final int[] profileIds = new int[enabledProfileCount]; for (int i = 0; i < profileCount; i++) { UserInfo profile = profiles.get(i); if (profile.isEnabled()) { profileIds[enabledProfileIndex] = profile.getUserHandle().getIdentifier(); enabledProfileIndex++; } } return profileIds; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnabledGroupProfileIds File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
getEnabledGroupProfileIds
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public SerializationConfig setDataSerializableFactoryClasses(Map<Integer, String> dataSerializableFactoryClasses) { this.dataSerializableFactoryClasses = dataSerializableFactoryClasses; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDataSerializableFactoryClasses File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
setDataSerializableFactoryClasses
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0