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
public void revokeUriPermissionFromOwner(IBinder owner, Uri uri, int mode, int userId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(owner); if (uri != null) { data.writeInt(1); uri.writeToParcel(data, 0); } else { data.writeInt(0); } data.writeInt(mode); data.writeInt(userId); mRemote.transact(REVOKE_URI_PERMISSION_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: revokeUriPermissionFromOwner File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
revokeUriPermissionFromOwner
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public Map<String, Object> getAttributes() { return this.attributes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributes File: cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java Repository: apereo/java-cas-client The code follows secure coding practices.
[ "CWE-74" ]
CVE-2014-4172
HIGH
7.5
apereo/java-cas-client
getAttributes
cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
ae37092100c8eaec610dab6d83e5e05a8ee58814
0
Analyze the following code function for security vulnerabilities
@Override public String version() { // TODO Auto-generated method stub return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: version File: src/main/java/custom/application/search.java Repository: m0ver/bible-online The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-4454
CRITICAL
9.8
m0ver/bible-online
version
src/main/java/custom/application/search.java
6ef0aabfb2d4ccd53fcaa9707781303af357410e
0
Analyze the following code function for security vulnerabilities
public boolean isPasswordProtected() throws RarException { if (isEncrypted()) return true; return getFileHeaders().stream().anyMatch(FileHeader::isEncrypted); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPasswordProtected File: src/main/java/com/github/junrar/Archive.java Repository: junrar The code follows secure coding practices.
[ "CWE-835" ]
CVE-2022-23596
MEDIUM
5
junrar
isPasswordProtected
src/main/java/com/github/junrar/Archive.java
7b16b3d90b91445fd6af0adfed22c07413d4fab7
0
Analyze the following code function for security vulnerabilities
private void gotServerPong(String pongID) { long latency = System.currentTimeMillis() - mPingTimestamp; if (pongID != null && pongID.equals(mPingID)) Log.i(TAG, String.format("Ping: server latency %1.3fs", latency/1000.)); else Log.i(TAG, String.format("Ping: server latency %1.3fs (estimated)", latency/1000.)); mPingID = null; mAlarmManager.cancel(mPongTimeoutAlarmPendIntent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gotServerPong File: src/org/yaxim/androidclient/service/SmackableImp.java Repository: ge0rg/yaxim The code follows secure coding practices.
[ "CWE-20", "CWE-346" ]
CVE-2017-5589
MEDIUM
4.3
ge0rg/yaxim
gotServerPong
src/org/yaxim/androidclient/service/SmackableImp.java
65a38dc77545d9568732189e86089390f0ceaf9f
0
Analyze the following code function for security vulnerabilities
public String toQueryString(Map<String, ?> queryParameters) { StringBuilder builder = new StringBuilder(); for (Map.Entry<String, ?> entry : queryParameters.entrySet()) { addQueryStringEntry(builder, entry.getKey(), entry.getValue()); builder.append('&'); } return builder.toString(); }
Vulnerability Classification: - CWE: CWE-863 - CVE: CVE-2023-35166 - Severity: HIGH - CVSS Score: 8.8 Description: XWIKI-20281: Improve tips rendering Function: toQueryString File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform Fixed Code: public String toQueryString(Map<String, ?> queryParameters) { StringBuilder builder = new StringBuilder(); if (queryParameters != null) { for (Map.Entry<String, ?> entry : queryParameters.entrySet()) { addQueryStringEntry(builder, entry.getKey(), entry.getValue()); builder.append('&'); } } return builder.toString(); }
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
toQueryString
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
1
Analyze the following code function for security vulnerabilities
public Field field(final String key) { return field(key, this.lang); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: field 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
field
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
void removeFromHistory(String reason) { finishActivityResults(Activity.RESULT_CANCELED, null /* resultData */, null /* resultGrants */); makeFinishingLocked(); ProtoLog.i(WM_DEBUG_ADD_REMOVE, "Removing activity %s, reason= %s " + "callers=%s", this, reason, Debug.getCallers(5)); takeFromHistory(); removeTimeouts(); ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s (removed from history)", this); setState(DESTROYED, "removeFromHistory"); if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during remove for activity " + this); detachFromProcess(); // Resume key dispatching if it is currently paused before we remove the container. resumeKeyDispatchingLocked(); mDisplayContent.removeAppToken(token); cleanUpActivityServices(); removeUriPermissionsLocked(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeFromHistory 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
removeFromHistory
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private boolean checkWaitingForWindowsLocked() { boolean haveBootMsg = false; boolean haveApp = false; // if the wallpaper service is disabled on the device, we're never going to have // wallpaper, don't bother waiting for it boolean haveWallpaper = false; boolean wallpaperEnabled = mContext.getResources().getBoolean( com.android.internal.R.bool.config_enableWallpaperService) && !mOnlyCore; boolean haveKeyguard = true; // TODO(multidisplay): Expand to all displays? final WindowList windows = getDefaultWindowListLocked(); final int N = windows.size(); for (int i=0; i<N; i++) { WindowState w = windows.get(i); if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) { return true; } if (w.isDrawnLw()) { if (w.mAttrs.type == TYPE_BOOT_PROGRESS) { haveBootMsg = true; } else if (w.mAttrs.type == TYPE_APPLICATION) { haveApp = true; } else if (w.mAttrs.type == TYPE_WALLPAPER) { haveWallpaper = true; } else if (w.mAttrs.type == TYPE_STATUS_BAR) { haveKeyguard = mPolicy.isKeyguardDrawnLw(); } } } if (DEBUG_SCREEN_ON || DEBUG_BOOT) { Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled + " haveKeyguard=" + haveKeyguard); } // If we are turning on the screen to show the boot message, // don't do it until the boot message is actually displayed. if (!mSystemBooted && !haveBootMsg) { return true; } // If we are turning on the screen after the boot is completed // normally, don't do so until we have the application and // wallpaper. if (mSystemBooted && ((!haveApp && !haveKeyguard) || (wallpaperEnabled && !haveWallpaper))) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkWaitingForWindowsLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
checkWaitingForWindowsLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public void pauseKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } synchronized (mWindowMap) { WindowToken token = mTokenMap.get(_token); if (token != null) { mInputMonitor.pauseDispatchingLw(token); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pauseKeyDispatching File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
pauseKeyDispatching
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public void onNotificationClear(int callingUid, int callingPid, String pkg, String tag, int id, int userId) { cancelNotification(callingUid, callingPid, pkg, tag, id, 0, Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE, true, userId, REASON_DELEGATE_CANCEL, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNotificationClear File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onNotificationClear
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Exported public String getIncludedRegions() { return includedRegions; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIncludedRegions 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
getIncludedRegions
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
public TvExtender setContentIntent(PendingIntent intent) { mContentIntent = intent; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContentIntent File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setContentIntent
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void releaseGestureWakeLock() { if (mGestureWakeLock.isHeld()) { mGestureWakeLock.release(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: releaseGestureWakeLock File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
releaseGestureWakeLock
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public ReplyFromAccount getReplyFromAccount(Account account, Message refMessage) { // First see if we are supposed to use the default address or // the address it was sentTo. if (mCachedSettings.forceReplyFromDefault) { return getDefaultReplyFromAccount(account); } else { // If we aren't explicitly told which account to look for, look at // all the message recipients and find one that matches // a custom from or account. List<String> allRecipients = new ArrayList<String>(); allRecipients.addAll(Arrays.asList(refMessage.getToAddressesUnescaped())); allRecipients.addAll(Arrays.asList(refMessage.getCcAddressesUnescaped())); return getMatchingRecipient(account, allRecipients); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReplyFromAccount File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
getReplyFromAccount
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public boolean isRenewal() { return renewal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRenewal File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
isRenewal
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public final long getTimeMillis(CharSequence name, long defaultValue) { final Long v = getTimeMillis(name); return v != null ? v : defaultValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimeMillis File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
getTimeMillis
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public Object getResourceDataForKey(String key) { Object data = null; String dataString = null; Matcher matcher = DATA_SEPARATOR_PATTERN.matcher(key); if (matcher.find()) { if (log.isDebugEnabled()) { log.debug(Messages.getMessage( Messages.RESTORE_DATA_FROM_RESOURCE_URI_INFO, key, dataString)); } int dataStart = matcher.end(); dataString = key.substring(dataStart); byte[] objectArray = null; byte[] dataArray; try { dataArray = dataString.getBytes("ISO-8859-1"); objectArray = decrypt(dataArray); } catch (UnsupportedEncodingException e1) { // default encoding always presented. } if ("B".equals(matcher.group(1))) { data = objectArray; } else { try { ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(objectArray)); data = in.readObject(); } catch (StreamCorruptedException e) { log.error(Messages .getMessage(Messages.STREAM_CORRUPTED_ERROR), e); } catch (IOException e) { log.error(Messages .getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR), e); } catch (ClassNotFoundException e) { log .error( Messages .getMessage(Messages.DATA_CLASS_NOT_FOUND_ERROR), e); } } } return data; }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2013-4521 - Severity: HIGH - CVSS Score: 7.5 Description: NXBT-661: apply patch for CVE-2013-4521 flaw Function: getResourceDataForKey File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 Fixed Code: public Object getResourceDataForKey(String key) { Object data = null; String dataString = null; Matcher matcher = DATA_SEPARATOR_PATTERN.matcher(key); if (matcher.find()) { if (log.isDebugEnabled()) { log.debug(Messages.getMessage( Messages.RESTORE_DATA_FROM_RESOURCE_URI_INFO, key, dataString)); } int dataStart = matcher.end(); dataString = key.substring(dataStart); byte[] objectArray = null; byte[] dataArray; try { dataArray = dataString.getBytes("ISO-8859-1"); objectArray = decrypt(dataArray); } catch (UnsupportedEncodingException e1) { // default encoding always presented. } if ("B".equals(matcher.group(1))) { data = objectArray; } else { try { ObjectInputStream in = new LookAheadObjectInputStream(new ByteArrayInputStream(objectArray)); data = in.readObject(); } catch (StreamCorruptedException e) { log.error(Messages .getMessage(Messages.STREAM_CORRUPTED_ERROR), e); } catch (IOException e) { log.error(Messages .getMessage(Messages.DESERIALIZE_DATA_INPUT_ERROR), e); } catch (ClassNotFoundException e) { log .error( Messages .getMessage(Messages.DATA_CLASS_NOT_FOUND_ERROR), e); } } } return data; }
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
getResourceDataForKey
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
1
Analyze the following code function for security vulnerabilities
@Override public CustomResourceType getResourceType() { return CustomResourceType.PyTorchJob; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourceType File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java Repository: apache/submarine The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-46302
CRITICAL
9.8
apache/submarine
getResourceType
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
0
Analyze the following code function for security vulnerabilities
@Override protected IntentFilter getIntentFilter(@NonNull BroadcastFilter input) { return input; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIntentFilter 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
getIntentFilter
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public boolean switchToDefaultCluster() { return transportFactory.switchToCluster(TcpTransportFactory.DEFAULT_CLUSTER_NAME); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: switchToDefaultCluster File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
switchToDefaultCluster
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
efc44b7b0a5dd4f44773808840dd9785cabcf21c
0
Analyze the following code function for security vulnerabilities
public void activityStopped(IBinder token, Bundle state, PersistableBundle persistentState, CharSequence description) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: activityStopped File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
activityStopped
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@GET @Deprecated @Path("{username}") @ApiOperation(value = "Get user details", notes = "The user's permissions are only included if a user asks for his " + "own account or for users with the necessary permissions to edit permissions.") @ApiResponses({ @ApiResponse(code = 404, message = "The user could not be found.") }) public UserSummary get(@ApiParam(name = "username", value = "The username to return information for.", required = true) @PathParam("username") String username, @Context UserContext userContext) { // If a user has permissions to edit another user's profile, it should be able to see it. // Reader users always have permissions to edit their own profile. if (!isPermitted(USERS_EDIT, username)) { throw new ForbiddenException("Not allowed to view user " + username); } final User user = userManagementService.load(username); if (user == null) { throw new NotFoundException("Couldn't find user " + username); } return returnSummary(userContext, user); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-613" ]
CVE-2023-41041
LOW
3.1
Graylog2/graylog2-server
get
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
0
Analyze the following code function for security vulnerabilities
@Override public void onSplashScreenViewCopyFinished(int taskId, SplashScreenViewParcelable parcelable) throws RemoteException { mAmInternal.enforceCallingPermission(MANAGE_ACTIVITY_TASKS, "copySplashScreenViewFinish()"); synchronized (mGlobalLock) { final Task task = mRootWindowContainer.anyTaskForId(taskId, MATCH_ATTACHED_TASK_ONLY); if (task != null) { final ActivityRecord r = task.getTopWaitSplashScreenActivity(); if (r != null) { r.onCopySplashScreenFinish(parcelable); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSplashScreenViewCopyFinished File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
onSplashScreenViewCopyFinished
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void deleteBatchUpload(Context c, String uploadId) throws Exception { String uploadDir = null; String mapFilePath = null; uploadDir = getImportUploadableDirectory(c.getCurrentUser()) + File.separator + uploadId; mapFilePath = uploadDir + File.separator + "mapfile"; this.deleteItems(c, mapFilePath); FileDeleteStrategy.FORCE.delete(new File(uploadDir)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteBatchUpload File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
deleteBatchUpload
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
0
Analyze the following code function for security vulnerabilities
public static List<String> readLines(Path path, boolean ignoreComments) throws IOException { File file = path.toFile(); if (!file.isFile()) { return new ArrayList<>(); } List<String> lines = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new FileReader(file))) { String line; while ((line = reader.readLine()) != null) { if (!(ignoreComments && line.startsWith("#")) && !lines.contains(line)) { lines.add(line); } } } return lines; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readLines File: pf4j/src/main/java/org/pf4j/util/FileUtils.java Repository: pf4j The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-40827
HIGH
7.5
pf4j
readLines
pf4j/src/main/java/org/pf4j/util/FileUtils.java
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
0
Analyze the following code function for security vulnerabilities
@Override public boolean showAssistFromActivity(IBinder token, Bundle args) { long ident = Binder.clearCallingIdentity(); try { synchronized (this) { ActivityRecord caller = ActivityRecord.forTokenLocked(token); ActivityRecord top = getFocusedStack().getTopActivity(); if (top != caller) { Slog.w(TAG, "showAssistFromActivity failed: caller " + caller + " is not current top " + top); return false; } if (!top.nowVisible) { Slog.w(TAG, "showAssistFromActivity failed: caller " + caller + " is not visible"); return false; } } return mAssistUtils.showSessionForActiveService(args, SHOW_SOURCE_APPLICATION, null, token); } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showAssistFromActivity File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
showAssistFromActivity
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void stopSystemLockTaskMode() throws RemoteException { enforceTaskPermission("stopSystemLockTaskMode"); stopLockTaskModeInternal(null, true /* isSystemCaller */); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopSystemLockTaskMode File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
stopSystemLockTaskMode
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public void setMappedClaims(Map<String, String> mappedClaims) { this.mappedClaims = mappedClaims; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMappedClaims File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setMappedClaims
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
final boolean hasTitle() { return !TextUtils.isEmpty(title) && !mHideTitle; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasTitle File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
hasTitle
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void installApexPackagesTraced(List<InstallRequest> requests) { try { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "installApexPackages"); installApexPackages(requests); } finally { Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: installApexPackagesTraced File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
installApexPackagesTraced
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
public static void sortToGlobalAndLocal(@Nullable Bundle in, @NonNull Bundle global, @NonNull Bundle local) { if (in == null || in.size() == 0) { return; } for (String key : in.keySet()) { if (!in.getBoolean(key)) { continue; } if (DEVICE_OWNER_ONLY_RESTRICTIONS.contains(key) || GLOBAL_RESTRICTIONS.contains(key)) { global.putBoolean(key, true); } else { local.putBoolean(key, true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sortToGlobalAndLocal File: services/core/java/com/android/server/pm/UserRestrictionsUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
sortToGlobalAndLocal
services/core/java/com/android/server/pm/UserRestrictionsUtils.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
private int runSetInstaller() throws RemoteException { final String targetPackage = nextArg(); final String installerPackageName = nextArg(); if (targetPackage == null || installerPackageName == null) { throw new IllegalArgumentException( "must provide both target and installer package names"); } mPm.setInstallerPackageName(targetPackage, installerPackageName); System.out.println("Success"); return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runSetInstaller File: cmds/pm/src/com/android/commands/pm/Pm.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3833
HIGH
9.3
android
runSetInstaller
cmds/pm/src/com/android/commands/pm/Pm.java
4e4743a354e26467318b437892a9980eb9b8328a
0
Analyze the following code function for security vulnerabilities
@Test public void executeParamGetConnectionFails(TestContext context) throws Exception { postgresClientGetConnectionFails().execute("SELECT 1", new JsonArray(), context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeParamGetConnectionFails File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
executeParamGetConnectionFails
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Message(id = 713, value = "Unable to inject ServletContext. None is associated with {0}, {1}", format = Format.MESSAGE_FORMAT) IllegalStateException cannotInjectServletContext(ClassLoader classLoader, ServletContextService service);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cannotInjectServletContext File: impl/src/main/java/org/jboss/weld/logging/ServletLogger.java Repository: weld/core The code follows secure coding practices.
[ "CWE-362" ]
CVE-2014-8122
MEDIUM
4.3
weld/core
cannotInjectServletContext
impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
8e413202fa1af08c09c580f444e4fd16874f9c65
0
Analyze the following code function for security vulnerabilities
@Override public void finishBooting() { ActivityManagerService.this.finishBooting(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishBooting 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
finishBooting
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@GetMapping(value = "/derby") public RestResult<Object> derbyOps(@RequestParam(value = "sql") String sql) { String selectSign = "select"; String limitSign = "ROWS FETCH NEXT"; String limit = " OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY"; try { if (PropertyUtil.isEmbeddedStorage()) { LocalDataSourceServiceImpl dataSourceService = (LocalDataSourceServiceImpl) DynamicDataSource .getInstance().getDataSource(); if (StringUtils.startsWithIgnoreCase(sql, selectSign)) { if (!StringUtils.containsIgnoreCase(sql, limitSign)) { sql += limit; } JdbcTemplate template = dataSourceService.getJdbcTemplate(); List<Map<String, Object>> result = template.queryForList(sql); return RestResultUtils.success(result); } return RestResultUtils.failed("Only query statements are allowed to be executed"); } return RestResultUtils.failed("The current storage mode is not Derby"); } catch (Exception e) { return RestResultUtils.failed(e.getMessage()); } }
Vulnerability Classification: - CWE: CWE-306 - CVE: CVE-2021-29442 - Severity: MEDIUM - CVSS Score: 5.0 Description: fix derbyOps interface security problem Function: derbyOps File: config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigOpsController.java Repository: alibaba/nacos Fixed Code: @GetMapping(value = "/derby") @Secured(action = ActionTypes.READ, resource = "nacos/admin") public RestResult<Object> derbyOps(@RequestParam(value = "sql") String sql) { String selectSign = "select"; String limitSign = "ROWS FETCH NEXT"; String limit = " OFFSET 0 ROWS FETCH NEXT 1000 ROWS ONLY"; try { if (PropertyUtil.isEmbeddedStorage()) { LocalDataSourceServiceImpl dataSourceService = (LocalDataSourceServiceImpl) DynamicDataSource .getInstance().getDataSource(); if (StringUtils.startsWithIgnoreCase(sql, selectSign)) { if (!StringUtils.containsIgnoreCase(sql, limitSign)) { sql += limit; } JdbcTemplate template = dataSourceService.getJdbcTemplate(); List<Map<String, Object>> result = template.queryForList(sql); return RestResultUtils.success(result); } return RestResultUtils.failed("Only query statements are allowed to be executed"); } return RestResultUtils.failed("The current storage mode is not Derby"); } catch (Exception e) { return RestResultUtils.failed(e.getMessage()); } }
[ "CWE-306" ]
CVE-2021-29442
MEDIUM
5
alibaba/nacos
derbyOps
config/src/main/java/com/alibaba/nacos/config/server/controller/ConfigOpsController.java
bffd440297618d189a7c8cac26191147d763cc6f
1
Analyze the following code function for security vulnerabilities
@Override public void stop() throws Exception { // do not stop task the task runner factories (taskRunnerFactory, stopTaskRunnerFactory) // as their lifecycle is handled elsewhere stopAsync(); while (!stopped.await(5, TimeUnit.SECONDS)) { LOG.info("The connection to '{}' is taking a long time to shutdown.", transport.getRemoteAddress()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stop File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
stop
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
static URI normalize(String uri, ClickHouseProtocol defaultProtocol) { int index = ClickHouseChecker.nonEmpty(uri, "URI").indexOf(SCHEME_DELIMITER); String normalized; if (index < 0) { normalized = new StringBuilder() .append((defaultProtocol != null ? defaultProtocol : ClickHouseProtocol.ANY).name() .toLowerCase(Locale.ROOT)) .append(SCHEME_DELIMITER) .append(uri.trim()).toString(); } else { normalized = uri.trim(); } return cache.computeIfAbsent(normalized, k -> { try { return new URI(k); } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid URI", e); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: normalize File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
normalize
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
public Form<T> discardingErrors() { return new Form<T>( this.rootName, this.backedType, this.rawData, this.files, new ArrayList<>(), this.value, this.groups, this.messagesApi, this.formatters, this.validatorFactory, this.config, this.lang, this.directFieldAccess); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: discardingErrors 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
discardingErrors
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((attributes == null) ? 0 : attributes.hashCode()); result = prime * result + ((classId == null) ? 0 : classId.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((params == null) ? 0 : params.hashCode()); result = prime * result + ((text == null) ? 0 : text.hashCode()); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
hashCode
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public String getStyle(CellReference cell);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStyle 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
getStyle
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void handleGroupedNotificationLocked(NotificationRecord r, NotificationRecord old, int callingUid, int callingPid) { StatusBarNotification sbn = r.sbn; Notification n = sbn.getNotification(); if (n.isGroupSummary() && !sbn.isAppGroup()) { // notifications without a group shouldn't be a summary, otherwise autobundling can // lead to bugs n.flags &= ~Notification.FLAG_GROUP_SUMMARY; } String group = sbn.getGroupKey(); boolean isSummary = n.isGroupSummary(); Notification oldN = old != null ? old.sbn.getNotification() : null; String oldGroup = old != null ? old.sbn.getGroupKey() : null; boolean oldIsSummary = old != null && oldN.isGroupSummary(); if (oldIsSummary) { NotificationRecord removedSummary = mSummaryByGroupKey.remove(oldGroup); if (removedSummary != old) { String removedKey = removedSummary != null ? removedSummary.getKey() : "<null>"; Slog.w(TAG, "Removed summary didn't match old notification: old=" + old.getKey() + ", removed=" + removedKey); } } if (isSummary) { mSummaryByGroupKey.put(group, r); } // Clear out group children of the old notification if the update // causes the group summary to go away. This happens when the old // notification was a summary and the new one isn't, or when the old // notification was a summary and its group key changed. if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) { cancelGroupChildrenLocked(old, callingUid, callingPid, null, REASON_GROUP_SUMMARY_CANCELED, false /* sendDelete */); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleGroupedNotificationLocked File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
handleGroupedNotificationLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public String getTitleBarLabel(Locale locale) throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationException { return getTitleBarLabel(locale.getLanguage()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitleBarLabel 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
getTitleBarLabel
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
private void migrate68(File dataDir, Stack<Integer> versions) { Map<String, String> projectIds = new HashMap<>(); for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Projects.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) projectIds.put(element.elementTextTrim("name"), element.elementTextTrim("id")); } } for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Projects.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) element.addElement("codeManagementEnabled").setText("true"); dom.writeToFile(file, false); } else if (file.getName().startsWith("Issues.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("description"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("IssueComments.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("content"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("PullRequests.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("description"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("PullRequestComments.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("content"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("CodeComments.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("content"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("CodeCommentReplys.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("content"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("PullRequestChanges.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("data").element("comment"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("IssueChanges.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) migrateAttachmentLinks(element.element("data").element("comment"), projectIds); dom.writeToFile(file, false); } else if (file.getName().startsWith("Groups.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) element.addElement("createRootProjects").setText("false"); dom.writeToFile(file, false); } else if (file.getName().startsWith("Roles.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) element.addElement("createChildren").setText("false"); dom.writeToFile(file, false); } else if (file.getName().startsWith("Settings.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { if (element.elementTextTrim("key").equals("JOB_EXECUTORS")) { Element valueElement = element.element("value"); for (Element executorElement: valueElement.elements()) { Element jobMatchElement = executorElement.element("jobMatch"); if (jobMatchElement.getTextTrim().equals("all")) jobMatchElement.detach(); else jobMatchElement.setName("jobRequirement"); } } } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate68 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrate68
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
@Deprecated public int getGravity() { return mGravity; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGravity File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getGravity
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String getDefaultEditURL(XWikiContext context) throws XWikiException { String editMode = getDefaultEditMode(context); if ("inline".equals(editMode)) { return getEditURL("inline", "", context); } else { com.xpn.xwiki.XWiki xwiki = context.getWiki(); String editor = xwiki.getEditorPreference(context); return getEditURL("edit", editor, context); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultEditURL 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
getDefaultEditURL
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
private void reloadColors() { mSecurityViewFlipperController.reloadColors(); mView.reloadColors(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reloadColors File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21245
HIGH
7.8
android
reloadColors
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
a33159e8cb297b9eee6fa5c63c0e343d05fad622
0
Analyze the following code function for security vulnerabilities
public void checkInvalidEmails(final String[] to, final List<String> wrongEmailsOut) { if (mValidator == null) { return; } for (final String email : to) { if (!mValidator.isValid(email)) { wrongEmailsOut.add(email); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkInvalidEmails File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
checkInvalidEmails
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public void setAttrs(List<ProfileAttribute> attrs) { this.attrs = attrs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAttrs File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setAttrs
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public List<IssuesStatusCountDao> getCountByStatus(IssuesCountRequest request) { request.setCreator(SessionUtils.getUserId()); List<IssuesStatusCountDao> countByStatus = extIssuesMapper.getCountByStatus(request); countByStatus.forEach(item -> { if (StringUtils.isBlank(item.getStatusValue())) { item.setStatusValue(IssuesStatus.NEW.toString()); } else { item.setStatusValue(item.getStatusValue().replace("\"", StringUtils.EMPTY)); } }); return countByStatus; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCountByStatus File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getCountByStatus
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public boolean isApiEnabled() { return CONF.apiEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isApiEnabled 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
isApiEnabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 r(String name) { return reference(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: r File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
r
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public NotificationGroupManager getGroupManager() { return mGroupManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGroupManager File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
getGroupManager
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public void onChange() { final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, Build.IS_ENG ? 1 : 0) != 0; mContext.getPackageManager().setComponentEnabledSetting(mBugreportStorageProvider, enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onChange File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
onChange
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void doCreateAccountByAdmin(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { checkPermission(Jenkins.ADMINISTER); if(createAccount(req, rsp, false, "addUser.jelly")!=null) { rsp.sendRedirect("."); // send the user back to the listing page } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doCreateAccountByAdmin File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-200" ]
CVE-2014-2064
MEDIUM
5
jenkinsci/jenkins
doCreateAccountByAdmin
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
fbf96734470caba9364f04e0b77b0bae7293a1ec
0
Analyze the following code function for security vulnerabilities
private PackageParser.Package scanPackageLI(PackageParser.Package pkg, int parseFlags, int scanFlags, long currentTime, UserHandle user) throws PackageManagerException { boolean success = false; try { final PackageParser.Package res = scanPackageDirtyLI(pkg, parseFlags, scanFlags, currentTime, user); success = true; return res; } finally { if (!success && (scanFlags & SCAN_DELETE_DATA_ON_FAILURES) != 0) { removeDataDirsLI(pkg.volumeUuid, pkg.packageName); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scanPackageLI 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
scanPackageLI
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public boolean dispatchKeyEvent(KeyEvent event) { int keycode = event.getKeyCode(); keycode = CodenameOneView.internalKeyCodeTranslate(keycode); if (keycode == AndroidImplementation.DROID_IMPL_KEY_BACK) { Display.getInstance().keyPressed(keycode); Display.getInstance().keyReleased(keycode); return true; } else { return super.dispatchKeyEvent(event); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchKeyEvent 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
dispatchKeyEvent
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public IChunkGet get(int chunkX, int chunkZ) { return WorldEditPlugin.getInstance().getBukkitImplAdapter().get(getWorldChecked(), chunkX, chunkZ); }
Vulnerability Classification: - CWE: CWE-400 - CVE: CVE-2023-35925 - Severity: MEDIUM - CVSS Score: 5.5 Description: feat: prevent edits outside +/- 30,000,000 blocks Function: get File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit Fixed Code: @Override public IChunkGet get(int chunkX, int chunkZ) { testCoords(BlockVector3.at(chunkX << 16, 0, chunkZ << 16)); return WorldEditPlugin.getInstance().getBukkitImplAdapter().get(getWorldChecked(), chunkX, chunkZ); }
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
get
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
1
Analyze the following code function for security vulnerabilities
public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) { if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) { return; } // Block the panel from expanding, in case we were doing a swipe to dismiss gesture. mKeyguardViewControllerLazy.get().blockPanelExpansionFromCurrentTouch(); final boolean wasShowing = mShowing; InteractionJankMonitor.getInstance().end(CUJ_LOCKSCREEN_UNLOCK_ANIMATION); // Post layout changes to the next frame, so we don't hang at the end of the animation. DejankUtils.postAfterTraversal(() -> { onKeyguardExitFinished(); if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) { mKeyguardUnlockAnimationControllerLazy.get().hideKeyguardViewAfterRemoteAnimation(); } finishSurfaceBehindRemoteAnimation(cancelled); mSurfaceBehindRemoteAnimationRequested = false; // The remote animation is over, so we're not going away anymore. mKeyguardStateController.notifyKeyguardGoingAway(false); // Dispatch the callback on animation finishes. mUpdateMonitor.dispatchKeyguardDismissAnimationFinished(); }); mKeyguardUnlockAnimationControllerLazy.get().notifyFinishedKeyguardExitAnimation( cancelled); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onKeyguardExitRemoteAnimationFinished File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
onKeyguardExitRemoteAnimationFinished
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
public static void startContext(Context ctx) { while (deinitializingEdt) { // It is possible that deinitialize was called just before the // last context was destroyed so there is a pending deinitialize // working its way through the system. Give it some time // before forcing the deinitialize System.out.println("Waiting for deinitializing to complete before starting a new initialization"); try { Thread.sleep(30); } catch (Exception ex){} } if (deinitializing && instance != null) { instance.deinitialize(); } synchronized(activeContexts) { activeContexts.add(ctx); if (instance == null) { // If this is our first rodeo, just call Display.init() as that should // be sufficient to set everything up. Display.init(ctx); } else { // If we've initialized before, we should "re-initialize" the implementation // Reinitializing will force views to be created even if the EDT was already // running in background mode. reinit(ctx); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startContext 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
startContext
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void redirectToAuthenticationPage(ServletRequest request, ServletResponse response) throws ServletException, IOException { String destination = ResourceLocator.getGeneralSettingBundle().getString("sessionTimeout"); HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED); HttpServletRequest httpRequest = (HttpServletRequest) request; if (destination.startsWith("http") || destination.startsWith("ftp")) { httpResponse.sendRedirect(httpResponse.encodeRedirectURL(destination)); } else { RequestDispatcher requestDispatcher = httpRequest.getRequestDispatcher(destination); requestDispatcher.forward(httpRequest, httpResponse); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: redirectToAuthenticationPage File: core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
redirectToAuthenticationPage
core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
public static boolean hasView(Object it, String path) throws IOException { if(it==null) return false; return Stapler.getCurrentRequest().getView(it,path)!=null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasView File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
hasView
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public byte[] getSecretKeySeed() { return XMSSUtil.cloneArray(secretKeySeed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSecretKeySeed File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
getSecretKeySeed
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
@Override public final void activityDestroyed(IBinder token) { if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "ACTIVITY DESTROYED: " + token); synchronized (this) { ActivityStack stack = ActivityRecord.getStackLocked(token); if (stack != null) { stack.activityDestroyedLocked(token, "activityDestroyed"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: activityDestroyed File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
activityDestroyed
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void setPlaybackToLocal(AudioAttributes attributes) throws RemoteException { boolean typeChanged; synchronized (mLock) { typeChanged = mVolumeType == PlaybackInfo.PLAYBACK_TYPE_REMOTE; mVolumeType = PlaybackInfo.PLAYBACK_TYPE_LOCAL; mVolumeControlId = null; if (attributes != null) { mAudioAttrs = attributes; } else { Log.e(TAG, "Received null audio attributes, using existing attributes"); } } if (typeChanged) { final long token = Binder.clearCallingIdentity(); try { mService.onSessionPlaybackTypeChanged(MediaSessionRecord.this); } finally { Binder.restoreCallingIdentity(token); } mHandler.post(MessageHandler.MSG_UPDATE_VOLUME); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPlaybackToLocal File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
setPlaybackToLocal
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
@Before public void setUp() throws Exception { super.setUp(); sqlTestList.add(setUp(new SQLDataSetDefTest())); sqlTestList.add(setUp(new SQLDataSetTrimTest())); sqlTestList.add(setUp(new SQLTableDataSetLookupTest())); sqlTestList.add(setUp(new SQLQueryDataSetLookupTest())); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2016-4999 - Severity: HIGH - CVSS Score: 7.5 Description: DASHBUILDE-113: SQL Injection on data set lookup filters Function: setUp File: dashbuilder-backend/dashbuilder-dataset-sql/src/test/java/org/dashbuilder/dataprovider/sql/SQLTestSuite.java Repository: dashbuilder Fixed Code: @Before public void setUp() throws Exception { super.setUp(); sqlTestList.add(setUp(new SQLDataSetDefTest())); sqlTestList.add(setUp(new SQLDataSetTrimTest())); sqlTestList.add(setUp(new SQLTableDataSetLookupTest())); sqlTestList.add(setUp(new SQLQueryDataSetLookupTest())); sqlTestList.add(setUp(new SQLInjectionAttacksTest())); }
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
setUp
dashbuilder-backend/dashbuilder-dataset-sql/src/test/java/org/dashbuilder/dataprovider/sql/SQLTestSuite.java
8574899e3b6455547b534f570b2330ff772e524b
1
Analyze the following code function for security vulnerabilities
public String getRefererText(String referer) { try { return this.xwiki.getRefererText(referer, getXWikiContext()); } catch (Exception e) { return ""; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRefererText File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getRefererText
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
@Test public void doesNotPrefixOrderReferenceIfOuterJoinAliasDetected() { String query = "select p from Person p left join p.address address"; assertThat(applySorting(query, new Sort("address.city")), endsWith("order by address.city asc")); assertThat(applySorting(query, new Sort("address.city", "lastname"), "p"), endsWith("order by address.city asc, p.lastname asc")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doesNotPrefixOrderReferenceIfOuterJoinAliasDetected File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
doesNotPrefixOrderReferenceIfOuterJoinAliasDetected
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public Map<String, FileEntry> generatorCode(TableDetails tableDetails, String tablePrefix, Map<String, String> customProperties, List<TemplateFile> templateFiles) { Map<String, FileEntry> map = new HashMap<>(templateFiles.size()); // 模板渲染 Map<String, Object> context = GenUtils.getContext(tableDetails, tablePrefix, customProperties); for (TemplateFile templateFile : templateFiles) { FileEntry fileEntry = new FileEntry(); fileEntry.setType(templateFile.getType()); // 替换路径中的占位符 String filename = StrUtil.format(templateFile.getFilename(), context); fileEntry.setFilename(filename); String parentFilePath = GenUtils.evaluateRealPath(templateFile.getParentFilePath(), context); fileEntry.setParentFilePath(parentFilePath); // 如果是文件 if (TemplateEntryTypeEnum.FILE.getType().equals(fileEntry.getType())) { fileEntry.setFilePath(GenUtils.concatFilePath(parentFilePath, filename)); // 文件内容渲染 TemplateEngineTypeEnum engineTypeEnum = TemplateEngineTypeEnum.of(templateFile.getEngineType()); String content = templateEngineDelegator.render(engineTypeEnum, templateFile.getContent(), context); fileEntry.setContent(content); } else { String currentPath = GenUtils.evaluateRealPath(templateFile.getFilename(), context); fileEntry.setFilePath(GenUtils.concatFilePath(parentFilePath, currentPath)); } map.put(fileEntry.getFilePath(), fileEntry); } return map; }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2022-24881 - Severity: HIGH - CVSS Score: 7.5 Description: :lock: 修改模板引擎的默认安全策略,以防止RCE Function: generatorCode File: ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java Repository: ballcat-projects/ballcat-codegen Fixed Code: public Map<String, FileEntry> generatorCode(TableDetails tableDetails, String tablePrefix, Map<String, String> customProperties, List<TemplateFile> templateFiles) { Map<String, FileEntry> map = new HashMap<>(templateFiles.size()); // 模板渲染 Map<String, Object> context = GenUtils.getContext(tableDetails, tablePrefix, customProperties); for (TemplateFile templateFile : templateFiles) { FileEntry fileEntry = new FileEntry(); fileEntry.setType(templateFile.getType()); // 替换路径中的占位符 String templateFilename = templateFile.getFilename(); String filename = StrUtil.format(templateFilename, context); fileEntry.setFilename(filename); String parentFilePath = GenUtils.evaluateRealPath(templateFile.getParentFilePath(), context); fileEntry.setParentFilePath(parentFilePath); // 如果是文件 if (TemplateEntryTypeEnum.FILE.getType().equals(fileEntry.getType())) { String filePath = GenUtils.concatFilePath(parentFilePath, filename); fileEntry.setFilePath(filePath); // 文件内容渲染 TemplateEngineTypeEnum engineTypeEnum = TemplateEngineTypeEnum.of(templateFile.getEngineType()); try { String content = templateEngineDelegator.render(engineTypeEnum, templateFile.getContent(), context); fileEntry.setContent(content); } catch (TemplateRenderException ex) { String errorMessage = StrUtil.format("模板渲染异常,模板文件名:【{}】,错误详情:{}", templateFilename, ex.getMessage()); throw new BusinessException(SystemResultCode.SERVER_ERROR.getCode(), errorMessage); } } else { String currentPath = GenUtils.evaluateRealPath(templateFilename, context); fileEntry.setFilePath(GenUtils.concatFilePath(parentFilePath, currentPath)); } map.put(fileEntry.getFilePath(), fileEntry); } return map; }
[ "CWE-20" ]
CVE-2022-24881
HIGH
7.5
ballcat-projects/ballcat-codegen
generatorCode
ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java
84a7cb38daf0295b93aba21d562ec627e4eb463b
1
Analyze the following code function for security vulnerabilities
protected KeySpec engineGetKeySpec( Key key, Class spec) throws InvalidKeySpecException { if (spec.isAssignableFrom(DHPrivateKeySpec.class) && key instanceof DHPrivateKey) { DHPrivateKey k = (DHPrivateKey)key; return new DHPrivateKeySpec(k.getX(), k.getParams().getP(), k.getParams().getG()); } else if (spec.isAssignableFrom(DHPublicKeySpec.class) && key instanceof DHPublicKey) { DHPublicKey k = (DHPublicKey)key; return new DHPublicKeySpec(k.getY(), k.getParams().getP(), k.getParams().getG()); } return super.engineGetKeySpec(key, spec); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineGetKeySpec File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-310" ]
CVE-2016-1000339
MEDIUM
5
bcgit/bc-java
engineGetKeySpec
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.java
413b42f4d770456508585c830cfcde95f9b0e93b
0
Analyze the following code function for security vulnerabilities
@Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_USER_ADDED.equals(intent.getAction())) { // Notify keystore that a new user was added. final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); if (userHandle > UserHandle.USER_SYSTEM) { removeUser(userHandle, /* unknownUser= */ true); } final KeyStore ks = KeyStore.getInstance(); final UserInfo parentInfo = mUserManager.getProfileParent(userHandle); final int parentHandle = parentInfo != null ? parentInfo.id : -1; ks.onUserAdded(userHandle, parentHandle); } else if (Intent.ACTION_USER_STARTING.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); mStorage.prefetchUser(userHandle); } else if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); if (userHandle > 0) { removeUser(userHandle, /* unknownUser= */ false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onReceive File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
onReceive
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public void execute(AsyncResult<SQLConnection> conn, String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> replyHandler){ try { SQLConnection sqlConnection = conn.result(); sqlConnection.updateWithParams(sql, params, query -> { if (query.failed()) { replyHandler.handle(Future.failedFuture(query.cause())); } else { replyHandler.handle(Future.succeededFuture(query.result())); } }); } catch (Exception e) { log.error(e.getMessage(), e); replyHandler.handle(Future.failedFuture(e)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: execute File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
execute
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public void markAsDirty() { owner.markAsDirty(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: markAsDirty File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
markAsDirty
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Deprecated public String getLanguage() { return this.deletedDoc.getLanguage(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLanguage File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-29208
HIGH
7.5
xwiki/xwiki-platform
getLanguage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
d9e947559077e947315bf700c5703dfc7dd8a8d7
0
Analyze the following code function for security vulnerabilities
protected String getOCEventDataDNsSql(String definitionOids, String studySubjectOids) { return "select ss.oc_oid as study_subject_oid, sed.oc_oid as definition_oid, dn.parent_dn_id, dn.discrepancy_note_id as dn_id, dn.description, dn.detailed_notes, " + " dn.owner_id, dn.date_created, rs.name as status, dnt.name" + " from discrepancy_note dn, dn_study_event_map dnsem, study_event se, study_event_definition sed, study_subject ss, discrepancy_note_type dnt, resolution_status rs" + " where dn.entity_type = 'studyEvent'" + " and dn.discrepancy_note_id = dnsem.discrepancy_note_id and dnsem.study_event_id = se.study_event_id" + " and sed.oc_oid in (" + definitionOids + ") and se.study_event_definition_id = sed.study_event_definition_id" + " and ss.oc_oid in (" + studySubjectOids + ") and se.study_subject_id = ss.study_subject_id" + " and dn.resolution_status_id = rs.resolution_status_id" + " and dn.discrepancy_note_type_id = dnt.discrepancy_note_type_id" + " order by ss.oc_oid, sed.oc_oid, dn.parent_dn_id, dn.discrepancy_note_id"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOCEventDataDNsSql File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
getOCEventDataDNsSql
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
@IntRange(from = -1) public int getLookasideSlotCount() { return mLookasideSlotCount; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLookasideSlotCount File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
getLookasideSlotCount
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
int getAppId(String dumpPackage) { if (dumpPackage != null) { try { ApplicationInfo info = mContext.getPackageManager().getApplicationInfo( dumpPackage, 0); return UserHandle.getAppId(info.uid); } catch (NameNotFoundException e) { e.printStackTrace(); } } return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAppId 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
getAppId
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
protected void setAllowCredentials(CorsOriginConfiguration config, MutableHttpResponse<?> response) { if (config.isAllowCredentials()) { response.header(ACCESS_CONTROL_ALLOW_CREDENTIALS, Boolean.toString(true)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowCredentials File: http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
setAllowCredentials
http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
private static Logger logger(final Jooby app) { return LoggerFactory.getLogger(app.getClass()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logger 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
logger
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private void writeCertificate(Parcel dest, X509Certificate cert) { if (cert != null) { try { byte[] certBytes = cert.getEncoded(); dest.writeInt(certBytes.length); dest.writeByteArray(certBytes); } catch (CertificateEncodingException e) { dest.writeInt(0); } } else { dest.writeInt(0); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeCertificate File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
writeCertificate
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
81be4e3aac55305cbb5c9d523cf5c96c66604b39
0
Analyze the following code function for security vulnerabilities
@ManagedOperation(value = "The number of local and remote associations for the given userId", impact = "INFO") public int getPresenceCount(@Name(value = "userId", description = "The userId to test for presence count") String userId) { synchronized (_uid2Location) { Set<Location> locations = _uid2Location.get(userId); return locations == null ? 0 : locations.size(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPresenceCount File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
getPresenceCount
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
@Override public void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout) { updateRotationUnchecked(alwaysSendConfiguration, forceRelayout); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateRotation File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
updateRotation
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") private final boolean killPackageProcessesLocked(String packageName, int appId, int userId, int minOomAdj, boolean callerWillRestart, boolean allowRestart, boolean doit, boolean evenPersistent, String reason) { ArrayList<ProcessRecord> procs = new ArrayList<>(); // Remove all processes this package may have touched: all with the // same UID (except for the system or root user), and all whose name // matches the package name. final int NP = mProcessNames.getMap().size(); for (int ip=0; ip<NP; ip++) { SparseArray<ProcessRecord> apps = mProcessNames.getMap().valueAt(ip); final int NA = apps.size(); for (int ia=0; ia<NA; ia++) { ProcessRecord app = apps.valueAt(ia); if (app.persistent && !evenPersistent) { // we don't kill persistent processes continue; } if (app.removed) { if (doit) { procs.add(app); } continue; } // Skip process if it doesn't meet our oom adj requirement. if (app.setAdj < minOomAdj) { continue; } // If no package is specified, we call all processes under the // give user id. if (packageName == null) { if (userId != UserHandle.USER_ALL && app.userId != userId) { continue; } if (appId >= 0 && UserHandle.getAppId(app.uid) != appId) { continue; } // Package has been specified, we want to hit all processes // that match it. We need to qualify this by the processes // that are running under the specified app and user ID. } else { final boolean isDep = app.pkgDeps != null && app.pkgDeps.contains(packageName); if (!isDep && UserHandle.getAppId(app.uid) != appId) { continue; } if (userId != UserHandle.USER_ALL && app.userId != userId) { continue; } if (!app.pkgList.containsKey(packageName) && !isDep) { continue; } } // Process has passed all conditions, kill it! if (!doit) { return true; } app.removed = true; procs.add(app); } } int N = procs.size(); for (int i=0; i<N; i++) { removeProcessLocked(procs.get(i), callerWillRestart, allowRestart, reason); } updateOomAdjLocked(); return N > 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killPackageProcessesLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
killPackageProcessesLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Temporal(TemporalType.TIMESTAMP) @Column(name = "create_date", nullable = false, length = 19) public Date getCreateDate() { return this.createDate; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCreateDate File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getCreateDate
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
public boolean readBoolean() throws IOException { return primitiveTypes.readBoolean(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readBoolean File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readBoolean
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override protected Map<Integer, Boolean> doInBackground(Void... args) { List<UserInfo> users = mUserManagerInternal.getUsers(/* excludeDying= */ true); Map<Integer, Boolean> results = new HashMap<>(); for (UserInfo userInfo : users) { results.put(userInfo.id, userHasIncompatibleAccounts(userInfo.id)); } return results; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doInBackground 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
doInBackground
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public Builder port(Integer port) { return port(null, port); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: port File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
port
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
@Transactional(readOnly = false) public String startProcess(String procDefKey, String businessTable, String businessId, String title, Map<String, Object> vars) { String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId()) // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中 identityService.setAuthenticatedUserId(userId); // 设置流程变量 if (vars == null){ vars = Maps.newHashMap(); } // 设置流程标题 if (StringUtils.isNotBlank(title)){ vars.put("title", title); } // 启动流程 ProcessInstance procIns = runtimeService.startProcessInstanceByKey(procDefKey, businessTable+":"+businessId, vars); // 更新业务表流程实例ID Act act = new Act(); act.setBusinessTable(businessTable);// 业务表名 act.setBusinessId(businessId); // 业务表ID act.setProcInsId(procIns.getId()); actDao.updateProcInsIdByBusinessId(act); return act.getProcInsId(); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2023-34601 - Severity: CRITICAL - CVSS Score: 9.8 Description: #I78QEI #515 Function: startProcess File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java Repository: thinkgem/jeesite Fixed Code: @Transactional(readOnly = false) public String startProcess(String procDefKey, String businessTable, String businessId, String title, Map<String, Object> vars) { String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId()) // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中 identityService.setAuthenticatedUserId(userId); // 设置流程变量 if (vars == null){ vars = Maps.newHashMap(); } // 设置流程标题 if (StringUtils.isNotBlank(title)){ vars.put("title", title); } // 安全过滤 Matcher matcher = businessTablePattern.matcher(businessTable); if (!matcher.matches()) { throw new ServiceException("非法参数 businessTable"); } // 启动流程 ProcessInstance procIns = runtimeService.startProcessInstanceByKey(procDefKey, businessTable+":"+businessId, vars); // 更新业务表流程实例ID Act act = new Act(); act.setBusinessTable(businessTable);// 业务表名 act.setBusinessId(businessId); // 业务表ID act.setProcInsId(procIns.getId()); actDao.updateProcInsIdByBusinessId(act); return act.getProcInsId(); }
[ "CWE-89" ]
CVE-2023-34601
CRITICAL
9.8
thinkgem/jeesite
startProcess
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
1
Analyze the following code function for security vulnerabilities
private void sendWidgetRestoreBroadcastLocked(String action, Provider provider, Host host, int[] oldIds, int[] newIds, UserHandle userHandle) { Intent intent = new Intent(action); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS, oldIds); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, newIds); if (provider != null) { intent.setComponent(provider.info.provider); sendBroadcastAsUser(intent, userHandle); } if (host != null) { intent.setComponent(null); intent.setPackage(host.id.packageName); intent.putExtra(AppWidgetManager.EXTRA_HOST_ID, host.id.hostId); sendBroadcastAsUser(intent, userHandle); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendWidgetRestoreBroadcastLocked 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
sendWidgetRestoreBroadcastLocked
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Test public void save3(TestContext context) { postgresClient = createFoo(context); postgresClient.save(FOO, xPojo, context.asyncAssertSuccess(save -> { String id = save; postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> { context.assertEquals("x", get.getString("key")); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save3 File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
save3
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public void doExportAs(String extension, File file) throws IOException { // CustomElementSecurityManager.addThreadPrivileges(Thread.currentThread(), fileName); try { OutputHandler.createAndOutputToFile(extension, file, handler); } catch (Exception e) { throw new IOException(e.getMessage()); } // CustomElementSecurityManager.remThreadPrivileges(Thread.currentThread()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doExportAs 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
doExportAs
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
0
Analyze the following code function for security vulnerabilities
public void init(String name, Type type, ClassLoader classLoader) throws IOException { this.name = name; this.type = type; this.classLoader = classLoader; String themeRoot = "theme/" + name + "/" + type.toString().toLowerCase() + "/"; this.templateRoot = themeRoot; this.resourceRoot = themeRoot + "resources/"; this.messageRoot = themeRoot + "messages/"; this.properties = new Properties(); URL p = classLoader.getResource(themeRoot + "theme.properties"); if (p != null) { Charset encoding = PropertiesUtil.detectEncoding(p.openStream()); try (Reader reader = new InputStreamReader(p.openStream(), encoding)) { properties.load(reader); } this.parentName = properties.getProperty("parent"); this.importName = properties.getProperty("import"); } else { this.parentName = null; this.importName = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java Repository: keycloak The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-3856
MEDIUM
4.3
keycloak
init
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
73f0474008e1bebd0733e62a22aceda9e5de6743
0
Analyze the following code function for security vulnerabilities
public static boolean isEmpty(String value) { return (value == null) || (value.length() == 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEmpty File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
isEmpty
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public int checkPermissionWithToken(String permission, int pid, int uid, IBinder callerToken) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPermissionWithToken File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
checkPermissionWithToken
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void highlightMap(Map<String, Object> options, Map<String, Object> map, int width) { if (!map.isEmpty()) { highlightMap(options, map, width, 0); } else { highlightValue(options, null, objectToString(options, map)).println(terminal()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: highlightMap File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
highlightMap
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
private void updateNotificationTranslucency() { float alpha = 1f; if (mClosingWithAlphaFadeOut && !mExpandingFromHeadsUp && !mHeadsUpManager.hasPinnedHeadsUp()) { alpha = getFadeoutAlpha(); } mNotificationStackScroller.setAlpha(alpha); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateNotificationTranslucency File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
updateNotificationTranslucency
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public void setModified(Integer modified) { this.modified = modified; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setModified File: src/main/java/cn/luischen/model/ContentDomain.java Repository: WinterChenS/my-site The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29638
MEDIUM
5.4
WinterChenS/my-site
setModified
src/main/java/cn/luischen/model/ContentDomain.java
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
0
Analyze the following code function for security vulnerabilities
@Override public void onStart() { mService.start(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onStart File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
onStart
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private static String fingerprint(byte[] bytes) { if (bytes == null) { return ""; } StringJoiner sj = new StringJoiner(":"); for (byte b : bytes) { sj.add(HexDump.toHexString(b)); } return sj.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fingerprint File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
fingerprint
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0