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
void sendContinueUserSwitchLocked(UserState uss, int oldUserId, int newUserId) { mCurUserSwitchCallback = null; mHandler.removeMessages(USER_SWITCH_TIMEOUT_MSG); mHandler.sendMessage(mHandler.obtainMessage(CONTINUE_USER_SWITCH_MSG, oldUserId, newUserId, uss)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendContinueUserSwitchLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
sendContinueUserSwitchLocked
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
static int getLockTaskLaunchMode(ActivityInfo aInfo, @Nullable ActivityOptions options) { int lockTaskLaunchMode = aInfo.lockTaskLaunchMode; // Non-priv apps are not allowed to use always or never, fall back to default if (!aInfo.applicationInfo.isPrivilegedApp() && (lockTaskLaunchMode == LOCK_TASK_LAUNCH_MODE_ALWAYS || lockTaskLaunchMode == LOCK_TASK_LAUNCH_MODE_NEVER)) { lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_DEFAULT; } if (options != null) { final boolean useLockTask = options.getLockTaskMode(); if (useLockTask && lockTaskLaunchMode == LOCK_TASK_LAUNCH_MODE_DEFAULT) { lockTaskLaunchMode = LOCK_TASK_LAUNCH_MODE_IF_ALLOWLISTED; } } return lockTaskLaunchMode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockTaskLaunchMode 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
getLockTaskLaunchMode
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public SCMCheckoutStrategy getScmCheckoutStrategy() { return scmCheckoutStrategy == null ? new DefaultSCMCheckoutStrategyImpl() : scmCheckoutStrategy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScmCheckoutStrategy File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getScmCheckoutStrategy
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public String getPicture() { return picture; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPicture File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getPicture
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public boolean processMessage(Message msg) { boolean isTurningOn= isTurningOn(); boolean isTurningOff = isTurningOff(); boolean isBleTurningOn = isBleTurningOn(); boolean isBleTurningOff = isBleTurningOff(); AdapterService adapterService = mAdapterService; AdapterProperties adapterProperties = mAdapterProperties; if ((adapterService == null) || (adapterProperties == null)) { errorLog("Received message in PendingCommandState after cleanup: " + msg.what); return false; } debugLog("Current state: PENDING_COMMAND, message: " + msg.what); switch (msg.what) { case USER_TURN_ON: if (isBleTurningOff || isTurningOff) { //TODO:do we need to send it after ble turn off also?? infoLog("Deferring USER_TURN_ON request..."); deferMessage(msg); } break; case USER_TURN_OFF: if (isTurningOn || isBleTurningOn) { infoLog("Deferring USER_TURN_OFF request..."); deferMessage(msg); } break; case BLE_TURN_ON: if (isTurningOff || isBleTurningOff) { infoLog("Deferring BLE_TURN_ON request..."); deferMessage(msg); } break; case BLE_TURN_OFF: if (isTurningOn || isBleTurningOn) { infoLog("Deferring BLE_TURN_OFF request..."); deferMessage(msg); } break; case BLE_STARTED: //Remove start timeout removeMessages(BLE_START_TIMEOUT); //Enable if (!adapterService.enableNative()) { errorLog("Error while turning Bluetooth on"); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); transitionTo(mOffState); } else { sendMessageDelayed(ENABLE_TIMEOUT, ENABLE_TIMEOUT_DELAY); } break; case BREDR_STARTED: //Remove start timeout removeMessages(BREDR_START_TIMEOUT); adapterProperties.onBluetoothReady(); mPendingCommandState.setTurningOn(false); transitionTo(mOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_ON); break; case ENABLED_READY: removeMessages(ENABLE_TIMEOUT); mPendingCommandState.setBleTurningOn(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case SET_SCAN_MODE_TIMEOUT: warningLog("Timeout while setting scan mode. Continuing with disable..."); //Fall through case BEGIN_DISABLE: removeMessages(SET_SCAN_MODE_TIMEOUT); sendMessageDelayed(BREDR_STOP_TIMEOUT, BREDR_STOP_TIMEOUT_DELAY); adapterService.stopProfileServices(); break; case DISABLED: if (isTurningOn) { removeMessages(ENABLE_TIMEOUT); errorLog("Error enabling Bluetooth - hardware init failed?"); mPendingCommandState.setTurningOn(false); transitionTo(mOffState); adapterService.stopProfileServices(); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; } removeMessages(DISABLE_TIMEOUT); sendMessageDelayed(BLE_STOP_TIMEOUT, BLE_STOP_TIMEOUT_DELAY); if (adapterService.stopGattProfileService()) { debugLog("Stopping Gatt profile services that were post enabled"); break; } //Fall through if no services or services already stopped case BLE_STOPPED: removeMessages(BLE_STOP_TIMEOUT); setBleTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_STOPPED: removeMessages(BREDR_STOP_TIMEOUT); setTurningOff(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case BLE_START_TIMEOUT: errorLog("Error enabling Bluetooth (BLE start timeout)"); mPendingCommandState.setBleTurningOn(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_START_TIMEOUT: errorLog("Error enabling Bluetooth (start timeout)"); mPendingCommandState.setTurningOn(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case ENABLE_TIMEOUT: errorLog("Error enabling Bluetooth (enable timeout)"); mPendingCommandState.setBleTurningOn(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_STOP_TIMEOUT: errorLog("Error stopping Bluetooth profiles (stop timeout)"); mPendingCommandState.setTurningOff(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case BLE_STOP_TIMEOUT: errorLog("Error stopping Bluetooth profiles (BLE stop timeout)"); mPendingCommandState.setTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case DISABLE_TIMEOUT: errorLog("Error disabling Bluetooth (disable timeout)"); if (isTurningOn) mPendingCommandState.setTurningOn(false); adapterService.stopProfileServices(); adapterService.stopGattProfileService(); mPendingCommandState.setTurningOff(false); setBleTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; default: return false; } return true; }
Vulnerability Classification: - CWE: CWE-362, CWE-20 - CVE: CVE-2016-3760 - Severity: MEDIUM - CVSS Score: 5.4 Description: Add guest mode functionality (3/3) Add a flag to enable() to start Bluetooth in restricted mode. In restricted mode, all devices that are paired during restricted mode are deleted upon leaving restricted mode. Right now restricted mode is only entered while a guest user is active. Bug: 27410683 Change-Id: If4a8855faf362d7f6de509d7ddc7197d1ac75cee Function: processMessage File: src/com/android/bluetooth/btservice/AdapterState.java Repository: android Fixed Code: @Override public boolean processMessage(Message msg) { boolean isTurningOn= isTurningOn(); boolean isTurningOff = isTurningOff(); boolean isBleTurningOn = isBleTurningOn(); boolean isBleTurningOff = isBleTurningOff(); AdapterService adapterService = mAdapterService; AdapterProperties adapterProperties = mAdapterProperties; if ((adapterService == null) || (adapterProperties == null)) { errorLog("Received message in PendingCommandState after cleanup: " + msg.what); return false; } debugLog("Current state: PENDING_COMMAND, message: " + msg.what); switch (msg.what) { case USER_TURN_ON: if (isBleTurningOff || isTurningOff) { //TODO:do we need to send it after ble turn off also?? infoLog("Deferring USER_TURN_ON request..."); deferMessage(msg); } break; case USER_TURN_OFF: if (isTurningOn || isBleTurningOn) { infoLog("Deferring USER_TURN_OFF request..."); deferMessage(msg); } break; case BLE_TURN_ON: if (isTurningOff || isBleTurningOff) { infoLog("Deferring BLE_TURN_ON request..."); deferMessage(msg); } break; case BLE_TURN_OFF: if (isTurningOn || isBleTurningOn) { infoLog("Deferring BLE_TURN_OFF request..."); deferMessage(msg); } break; case BLE_STARTED: //Remove start timeout removeMessages(BLE_START_TIMEOUT); //Enable boolean isGuest = UserManager.get(mAdapterService).isGuestUser(); if (!adapterService.enableNative(isGuest)) { errorLog("Error while turning Bluetooth on"); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); transitionTo(mOffState); } else { sendMessageDelayed(ENABLE_TIMEOUT, ENABLE_TIMEOUT_DELAY); } break; case BREDR_STARTED: //Remove start timeout removeMessages(BREDR_START_TIMEOUT); adapterProperties.onBluetoothReady(); mPendingCommandState.setTurningOn(false); transitionTo(mOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_ON); break; case ENABLED_READY: removeMessages(ENABLE_TIMEOUT); mPendingCommandState.setBleTurningOn(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case SET_SCAN_MODE_TIMEOUT: warningLog("Timeout while setting scan mode. Continuing with disable..."); //Fall through case BEGIN_DISABLE: removeMessages(SET_SCAN_MODE_TIMEOUT); sendMessageDelayed(BREDR_STOP_TIMEOUT, BREDR_STOP_TIMEOUT_DELAY); adapterService.stopProfileServices(); break; case DISABLED: if (isTurningOn) { removeMessages(ENABLE_TIMEOUT); errorLog("Error enabling Bluetooth - hardware init failed?"); mPendingCommandState.setTurningOn(false); transitionTo(mOffState); adapterService.stopProfileServices(); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; } removeMessages(DISABLE_TIMEOUT); sendMessageDelayed(BLE_STOP_TIMEOUT, BLE_STOP_TIMEOUT_DELAY); if (adapterService.stopGattProfileService()) { debugLog("Stopping Gatt profile services that were post enabled"); break; } //Fall through if no services or services already stopped case BLE_STOPPED: removeMessages(BLE_STOP_TIMEOUT); setBleTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_STOPPED: removeMessages(BREDR_STOP_TIMEOUT); setTurningOff(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case BLE_START_TIMEOUT: errorLog("Error enabling Bluetooth (BLE start timeout)"); mPendingCommandState.setBleTurningOn(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_START_TIMEOUT: errorLog("Error enabling Bluetooth (start timeout)"); mPendingCommandState.setTurningOn(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case ENABLE_TIMEOUT: errorLog("Error enabling Bluetooth (enable timeout)"); mPendingCommandState.setBleTurningOn(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case BREDR_STOP_TIMEOUT: errorLog("Error stopping Bluetooth profiles (stop timeout)"); mPendingCommandState.setTurningOff(false); transitionTo(mBleOnState); notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON); break; case BLE_STOP_TIMEOUT: errorLog("Error stopping Bluetooth profiles (BLE stop timeout)"); mPendingCommandState.setTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; case DISABLE_TIMEOUT: errorLog("Error disabling Bluetooth (disable timeout)"); if (isTurningOn) mPendingCommandState.setTurningOn(false); adapterService.stopProfileServices(); adapterService.stopGattProfileService(); mPendingCommandState.setTurningOff(false); setBleTurningOff(false); transitionTo(mOffState); notifyAdapterStateChange(BluetoothAdapter.STATE_OFF); break; default: return false; } return true; }
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
processMessage
src/com/android/bluetooth/btservice/AdapterState.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
1
Analyze the following code function for security vulnerabilities
public boolean isWriteAheadLoggingEnabled() { return (mOpenFlags & ENABLE_WRITE_AHEAD_LOGGING) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWriteAheadLoggingEnabled 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
isWriteAheadLoggingEnabled
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
private boolean enterPublicInterface() { return recursionBreak.get().getAndIncrement() > 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enterPublicInterface File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
enterPublicInterface
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
private String[] packagesToNames(List<PackageInfo> apps) { final int N = apps.size(); String[] names = new String[N]; for (int i = 0; i < N; i++) { names[i] = apps.get(i).packageName; } return names; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: packagesToNames File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
packagesToNames
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public void promptUserOnPartialSigning() throws LaunchException { if (promptedForPartialSigning) { return; } promptedForPartialSigning = true; UnsignedAppletTrustConfirmation.checkPartiallySignedWithUserIfRequired(this, classLoader.file, classLoader.jcv); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: promptUserOnPartialSigning File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
promptUserOnPartialSigning
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Override public void setVoiceKeepAwake(IVoiceInteractionSession session, boolean keepAwake) { synchronized (mGlobalLock) { if (mRunningVoice != null && mRunningVoice.asBinder() == session.asBinder()) { if (keepAwake) { mVoiceWakeLock.acquire(); } else { mVoiceWakeLock.release(); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVoiceKeepAwake 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
setVoiceKeepAwake
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@TestOnly public String currentRevision() { String[] args = new String[]{"log", "-1", "--pretty=format:%H"}; CommandLine gitCmd = gitWd().withArgs(args); return runOrBomb(gitCmd).outputAsString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: currentRevision File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
currentRevision
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private static void listenerXmlGenerator(XmlGenerator gen, Config config) { if (config.getListenerConfigs().isEmpty()) { return; } gen.open("listeners"); for (ListenerConfig lc : config.getListenerConfigs()) { gen.node("listener", classNameOrImplClass(lc.getClassName(), lc.getImplementation())); } gen.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listenerXmlGenerator File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-522" ]
CVE-2023-33264
MEDIUM
4.3
hazelcast
listenerXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
80a502d53cc48bf895711ab55f95e3a51e344ac1
0
Analyze the following code function for security vulnerabilities
boolean isTaskOverlay() { return mTaskOverlay; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isTaskOverlay 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
isTaskOverlay
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public void onUEvent(UEventObserver.UEvent event) { setHdmiPlugged("1".equals(event.get("SWITCH_STATE"))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUEvent File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
onUEvent
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
public byte[] verifyPassword(String password, long challenge, int userId) throws RequestThrottledException { throwIfCalledOnMainThread(); try { VerifyCredentialResponse response = getLockSettings().verifyPassword(password, challenge, userId); if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) { return response.getPayload(); } else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) { throw new RequestThrottledException(response.getTimeout()); } else { return null; } } catch (RemoteException re) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyPassword File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
verifyPassword
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@Override public void onSupportActionModeStarted(ActionMode mode) { super.onSupportActionModeStarted(mode); ViewUtils.setStatusBarColor(this, R.color.action_mode_statusbar_color); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSupportActionModeStarted 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
onSupportActionModeStarted
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder elementBefore(String name, String namespaceURI) { Element newElement = super.elementBeforeImpl(name, namespaceURI); return new XMLBuilder(newElement, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: elementBefore File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
elementBefore
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public void addCompletionCallback(Runnable work, int priority) { validationList.add(work, priority); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addCompletionCallback File: xstream/src/java/com/thoughtworks/xstream/core/TreeUnmarshaller.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
addCompletionCallback
xstream/src/java/com/thoughtworks/xstream/core/TreeUnmarshaller.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
boolean hasPkcs12KeyStore() { return mBundle.containsKey(KeyChain.EXTRA_PKCS12); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasPkcs12KeyStore File: src/com/android/certinstaller/CredentialHelper.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2422
HIGH
9.3
android
hasPkcs12KeyStore
src/com/android/certinstaller/CredentialHelper.java
70dde9870e9450e10418a32206ac1bb30f036b2c
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("[ConnectionServiceWrapper componentName="); sb.append(mComponentName); sb.append("]"); return sb.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
toString
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Override public synchronized void close() throws IOException { out.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: close File: guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
close
guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public static TransformerFactory newInstance() { return TransformerFactory.newInstance(); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000651 - Severity: HIGH - CVSS Score: 7.5 Description: gh-813 Turn on secure processing feature for XML parsers etc Function: newInstance File: stroom-core-server/src/main/java/stroom/entity/server/util/TransformerFactoryFactory.java Repository: gchq/stroom Fixed Code: public static TransformerFactory newInstance() { final TransformerFactory factory = TransformerFactory.newInstance(); secureProcessing(factory); return factory; }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
newInstance
stroom-core-server/src/main/java/stroom/entity/server/util/TransformerFactoryFactory.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
protected void finalize() { cleanup(); if (TRACE_REF) { synchronized (AdapterService.class) { sRefCount--; debugLog("finalize() - REFCOUNT: FINALIZED. INSTANCE_COUNT= " + sRefCount); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finalize File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
finalize
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException { notNull(COMPONENT_EXPRESSION, componentExpression); notNull(CONTEXT, context); notNull(COMPONENT_TYPE, componentType); return createComponentApplyAnnotations(context, componentExpression, componentType, null, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createComponent File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
createComponent
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
void onRefinementCanceled() { if (mRefinementResultReceiver != null) { mRefinementResultReceiver.destroy(); mRefinementResultReceiver = null; } finish(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRefinementCanceled File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
onRefinementCanceled
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
@Override public void setNotificationPolicyAccessGranted(String pkg, boolean granted) throws RemoteException { enforceSystemOrSystemUI("grant notification policy access"); final long identity = Binder.clearCallingIdentity(); try { synchronized (mNotificationList) { mPolicyAccess.put(pkg, granted); } } finally { Binder.restoreCallingIdentity(identity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNotificationPolicyAccessGranted 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
setNotificationPolicyAccessGranted
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public @UserOperationResult int startUserInBackground( @NonNull ComponentName admin, @NonNull UserHandle userHandle) { throwIfParentInstance("startUserInBackground"); try { return mService.startUserInBackground(admin, userHandle); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startUserInBackground File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
startUserInBackground
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void enableAndSetActiveAdmin( @UserIdInt int userId, @UserIdInt int callingUserId, ComponentName adminComponent) { final String adminPackage = adminComponent.getPackageName(); enablePackage(adminPackage, callingUserId); setActiveAdmin(adminComponent, /* refreshing= */ true, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableAndSetActiveAdmin File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
enableAndSetActiveAdmin
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static Path compile(String path, final Predicate... filters) { try { CharacterIndex ci = new CharacterIndex(path); ci.trim(); if(!( ci.charAt(0) == DOC_CONTEXT) && !( ci.charAt(0) == EVAL_CONTEXT)){ ci = new CharacterIndex("$." + path); ci.trim(); } if(ci.lastCharIs('.')){ fail("Path must not end with a '.' or '..'"); } LinkedList<Predicate> filterStack = new LinkedList<Predicate>(asList(filters)); return new PathCompiler(ci, filterStack).compile(); } catch (Exception e) { InvalidPathException ipe; if (e instanceof InvalidPathException) { ipe = (InvalidPathException) e; } else { ipe = new InvalidPathException(e); } throw ipe; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compile File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java Repository: json-path/JsonPath The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-51074
MEDIUM
5.3
json-path/JsonPath
compile
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
f49ff25e3bad8c8a0c853058181f2c00b5beb305
0
Analyze the following code function for security vulnerabilities
ActivityStarter setAllowPendingRemoteAnimationRegistryLookup(boolean allowLookup) { mRequest.allowPendingRemoteAnimationRegistryLookup = allowLookup; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowPendingRemoteAnimationRegistryLookup File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
setAllowPendingRemoteAnimationRegistryLookup
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
public String getPkcs7CertChain() { return pkcs7CertChain; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPkcs7CertChain File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getPkcs7CertChain
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
void setWillCloseOrEnterPip(boolean willCloseOrEnterPip) { mWillCloseOrEnterPip = willCloseOrEnterPip; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWillCloseOrEnterPip 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
setWillCloseOrEnterPip
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public boolean onPrepareOptionsMenu(Menu menu) { boolean result = super.onPrepareOptionsMenu(menu); return mDataBusy ? false : result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPrepareOptionsMenu File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
onPrepareOptionsMenu
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
@Override public MediaPackage addAttachment(InputStream in, String fileName, MediaPackageElementFlavor flavor, MediaPackage mediaPackage) throws IOException, IngestException { String[] tags = null; return addAttachment(in, fileName, flavor, tags, mediaPackage); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAttachment File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
addAttachment
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
Stream<PendingJavaScriptInvocation> getPendingJavaScriptInvocations() { return pendingJsInvocations.stream() .filter(invocation -> !invocation.isCanceled()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPendingJavaScriptInvocations File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
getPendingJavaScriptInvocations
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public ServerBuilder clientAddressTrustedProxyFilter( Predicate<? super InetAddress> clientAddressTrustedProxyFilter) { this.clientAddressTrustedProxyFilter = requireNonNull(clientAddressTrustedProxyFilter, "clientAddressTrustedProxyFilter"); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clientAddressTrustedProxyFilter File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
clientAddressTrustedProxyFilter
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
public void setAllowContainsSearches(boolean theAllowContainsSearches) { this.myModelConfig.setAllowContainsSearches(theAllowContainsSearches); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowContainsSearches File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setAllowContainsSearches
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public List<Path> getImsmanifestFiles() { return imsmanifestFiles; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getImsmanifestFiles File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
getImsmanifestFiles
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
public void handleCompleteInboundCommand(AMQCommand command) throws IOException { // First, offer the command to the asynchronous-command // handling mechanism, which gets to act as a filter on the // incoming command stream. If processAsync() returns true, // the command has been dealt with by the filter and so should // not be processed further. It will return true for // asynchronous commands (deliveries/returns/other events), // and false for commands that should be passed on to some // waiting RPC continuation. this._trafficListener.read(command); if (!processAsync(command)) { // The filter decided not to handle/consume the command, // so it must be a response to an earlier RPC. if (_checkRpcResponseType) { synchronized (_channelMutex) { // check if this reply command is intended for the current waiting request before calling nextOutstandingRpc() if (_activeRpc != null && !_activeRpc.canHandleReply(command)) { // this reply command is not intended for the current waiting request // most likely a previous request timed out and this command is the reply for that. // Throw this reply command away so we don't stop the current request from waiting for its reply return; } } } final RpcWrapper nextOutstandingRpc = nextOutstandingRpc(); // the outstanding RPC can be null when calling Channel#asyncRpc if(nextOutstandingRpc != null) { nextOutstandingRpc.complete(command); markRpcFinished(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleCompleteInboundCommand File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
handleCompleteInboundCommand
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
protected CellState getCellState() { return cellState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCellState 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
getCellState
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference, XWikiContext context) throws XWikiException { return copyDocument(sourceDocumentReference, targetDocumentReference, null, true, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
copyDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") private void removeUriPermissionsForPackageLocked( String packageName, int userHandle, boolean persistable, boolean targetOnly) { if (userHandle == UserHandle.USER_ALL && packageName == null) { throw new IllegalArgumentException("Must narrow by either package or user"); } boolean persistChanged = false; int N = mGrantedUriPermissions.size(); for (int i = 0; i < N; i++) { final int targetUid = mGrantedUriPermissions.keyAt(i); final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.valueAt(i); // Only inspect grants matching user if (userHandle == UserHandle.USER_ALL || userHandle == UserHandle.getUserId(targetUid)) { for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) { final UriPermission perm = it.next(); // Only inspect grants matching package if (packageName == null || (!targetOnly && perm.sourcePkg.equals(packageName)) || perm.targetPkg.equals(packageName)) { // Hacky solution as part of fixing a security bug; ignore // grants associated with DownloadManager so we don't have // to immediately launch it to regrant the permissions if (Downloads.Impl.AUTHORITY.equals(perm.uri.uri.getAuthority()) && !persistable) continue; persistChanged |= perm.revokeModes(persistable ? ~0 : ~Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, true); // Only remove when no modes remain; any persisted grants // will keep this alive. if (perm.modeFlags == 0) { it.remove(); } } } if (perms.isEmpty()) { mGrantedUriPermissions.remove(targetUid); N--; i--; } } } if (persistChanged) { schedulePersistUriGrants(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUriPermissionsForPackageLocked 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
removeUriPermissionsForPackageLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private void setDefaults(Map<String, Key> keys, Entity pc) { if (keys.isEmpty()) return; for (Key key : keys.values()) { if (key.defaultValue!=null) pc.setProperty(key.nameOrId,key.defaultValue); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDefaults File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java Repository: neo4j/apoc The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-23926
HIGH
8.1
neo4j/apoc
setDefaults
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
3202b421b21973b2f57a43b33c88f3f6901cfd2a
0
Analyze the following code function for security vulnerabilities
public void setVolumeManager(final VolumeManager volumeManager) { this.volumeManager = volumeManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVolumeManager 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
setVolumeManager
src/main/java/com/github/junrar/Archive.java
7b16b3d90b91445fd6af0adfed22c07413d4fab7
0
Analyze the following code function for security vulnerabilities
@Override public boolean setApplicationHidden(ComponentName who, String callerPackage, String packageName, boolean hidden, boolean parent) { final CallerIdentity caller = getCallerIdentity(who, callerPackage); Preconditions.checkCallAuthorization((caller.hasAdminComponent() && (isProfileOwner(caller) || isDefaultDeviceOwner(caller))) || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_PACKAGE_ACCESS))); List<String> exemptApps = listPolicyExemptAppsUnchecked(); if (exemptApps.contains(packageName)) { Slogf.d(LOG_TAG, "setApplicationHidden(): ignoring %s as it's on policy-exempt list", packageName); return false; } final int userId = parent ? getProfileParentId(caller.getUserId()) : caller.getUserId(); boolean result; synchronized (getLockObject()) { if (parent) { Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice( caller.getUserId()) && isManagedProfile(caller.getUserId())); // Ensure the package provided is a system package, this is to ensure that this // API cannot be used to leak if certain non-system package exists in the person // profile. mInjector.binderWithCleanCallingIdentity(() -> enforcePackageIsSystemPackage(packageName, userId)); } checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_APPLICATION_HIDDEN); if (VERBOSE_LOG) { Slogf.v(LOG_TAG, "calling pm.setApplicationHiddenSettingAsUser(%s, %b, %d)", packageName, hidden, userId); } result = mInjector.binderWithCleanCallingIdentity(() -> mIPackageManager .setApplicationHiddenSettingAsUser(packageName, hidden, userId)); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_APPLICATION_HIDDEN) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ who == null) .setStrings(packageName, hidden ? "hidden" : "not_hidden", parent ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT) .write(); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setApplicationHidden File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
setApplicationHidden
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public Boolean lockUsers(Integer[] ids, int lockStatus) { if (ids.length < 1) { return false; } return mallUserMapper.lockUserBatch(ids, lockStatus) > 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lockUsers File: src/main/java/ltd/newbee/mall/service/impl/NewBeeMallUserServiceImpl.java Repository: newbee-ltd/newbee-mall The code follows secure coding practices.
[ "CWE-639" ]
CVE-2023-30216
MEDIUM
5.4
newbee-ltd/newbee-mall
lockUsers
src/main/java/ltd/newbee/mall/service/impl/NewBeeMallUserServiceImpl.java
4f8948579ddd6843a2e313fdd55aafc809246f63
0
Analyze the following code function for security vulnerabilities
protected ID findRepeatedRecordId(Field[] repeatFields, Record data) { Map<String, Object> wheres = new HashMap<>(); for (Field c : repeatFields) { String cName = c.getName(); if (data.hasValue(cName)) { wheres.put(cName, data.getObjectValue(cName)); } } log.info("Checking repeated : " + wheres); if (wheres.isEmpty()) return null; Entity entity = data.getEntity(); StringBuilder sql = new StringBuilder(String.format("select %s from %s where (1=1)", entity.getPrimaryField().getName(), entity.getName())); for (String c : wheres.keySet()) { sql.append(" and ").append(c).append(" = :").append(c); } Query query = Application.createQueryNoFilter(sql.toString()); for (Map.Entry<String, Object> e : wheres.entrySet()) { query.setParameter(e.getKey(), e.getValue()); } Object[] exists = query.unique(); return exists == null ? null : (ID) exists[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findRepeatedRecordId File: src/main/java/com/rebuild/core/service/dataimport/DataImporter.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-1613
MEDIUM
4
getrebuild/rebuild
findRepeatedRecordId
src/main/java/com/rebuild/core/service/dataimport/DataImporter.java
d0de4cc35303168f44ca57712c824b5cb9525e54
0
Analyze the following code function for security vulnerabilities
public static byte[] compress(String s, String encoding) throws UnsupportedEncodingException, IOException { byte[] data = s.getBytes(encoding); return compress(data); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compress File: src/main/java/org/xerial/snappy/Snappy.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-190" ]
CVE-2023-34454
HIGH
7.5
xerial/snappy-java
compress
src/main/java/org/xerial/snappy/Snappy.java
d0042551e4a3509a725038eb9b2ad1f683674d94
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") private UriPermission findUriPermissionLocked(int targetUid, GrantUri grantUri) { final ArrayMap<GrantUri, UriPermission> targetUris = mGrantedUriPermissions.get(targetUid); if (targetUris != null) { return targetUris.get(grantUri); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findUriPermissionLocked 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
findUriPermissionLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private VerifyCredentialResponse doVerifyPattern(String pattern, boolean hasChallenge, long challenge, int userId) throws RemoteException { checkPasswordReadPermission(userId); CredentialHash storedHash = mStorage.readPatternHash(userId); return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId); }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2016-3908 - Severity: MEDIUM - CVSS Score: 4.3 Description: Fix vulnerability in LockSettings service Fixes bug 30003944 Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d (cherry picked from commit 2d71384a139ae27cbc7b57f06662bf6ee2010f2b) Function: doVerifyPattern File: services/core/java/com/android/server/LockSettingsService.java Repository: android Fixed Code: private VerifyCredentialResponse doVerifyPattern(String pattern, boolean hasChallenge, long challenge, int userId) throws RemoteException { checkPasswordReadPermission(userId); if (TextUtils.isEmpty(pattern)) { throw new IllegalArgumentException("Pattern can't be null or empty"); } CredentialHash storedHash = mStorage.readPatternHash(userId); return doVerifyPattern(pattern, storedHash, hasChallenge, challenge, userId); }
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
doVerifyPattern
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
1
Analyze the following code function for security vulnerabilities
public void setManagedProfileCallerIdAccessPolicy(@Nullable PackagePolicy policy) { throwIfParentInstance("setManagedProfileCallerIdAccessPolicy"); if (mService != null) { try { mService.setManagedProfileCallerIdAccessPolicy(policy); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setManagedProfileCallerIdAccessPolicy File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setManagedProfileCallerIdAccessPolicy
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void handleNotObscuredLocked(final WindowState w, final int innerDw, final int innerDh) { final WindowManager.LayoutParams attrs = w.mAttrs; final int attrFlags = attrs.flags; final boolean canBeSeen = w.isDisplayedLw(); final boolean opaqueDrawn = canBeSeen && w.isOpaqueDrawn(); if (opaqueDrawn && w.isFullscreen(innerDw, innerDh)) { // This window completely covers everything behind it, // so we want to leave all of them as undimmed (for // performance reasons). mInnerFields.mObscured = true; } if (w.mHasSurface) { if ((attrFlags&FLAG_KEEP_SCREEN_ON) != 0) { mInnerFields.mHoldScreen = w.mSession; } if (!mInnerFields.mSyswin && w.mAttrs.screenBrightness >= 0 && mInnerFields.mScreenBrightness < 0) { mInnerFields.mScreenBrightness = w.mAttrs.screenBrightness; } if (!mInnerFields.mSyswin && w.mAttrs.buttonBrightness >= 0 && mInnerFields.mButtonBrightness < 0) { mInnerFields.mButtonBrightness = w.mAttrs.buttonBrightness; } if (!mInnerFields.mSyswin && w.mAttrs.userActivityTimeout >= 0 && mInnerFields.mUserActivityTimeout < 0) { mInnerFields.mUserActivityTimeout = w.mAttrs.userActivityTimeout; } final int type = attrs.type; if (canBeSeen && (type == TYPE_SYSTEM_DIALOG || type == TYPE_SYSTEM_ERROR || (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0)) { mInnerFields.mSyswin = true; } if (canBeSeen) { // This function assumes that the contents of the default display are // processed first before secondary displays. final DisplayContent displayContent = w.getDisplayContent(); if (displayContent != null && displayContent.isDefaultDisplay) { // While a dream or keyguard is showing, obscure ordinary application // content on secondary displays (by forcibly enabling mirroring unless // there is other content we want to show) but still allow opaque // keyguard dialogs to be shown. if (type == TYPE_DREAM || (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) { mInnerFields.mObscureApplicationContentOnSecondaryDisplays = true; } mInnerFields.mDisplayHasContent = true; } else if (displayContent != null && (!mInnerFields.mObscureApplicationContentOnSecondaryDisplays || (mInnerFields.mObscured && type == TYPE_KEYGUARD_DIALOG))) { // Allow full screen keyguard presentation dialogs to be seen. mInnerFields.mDisplayHasContent = true; } if (mInnerFields.mPreferredRefreshRate == 0 && w.mAttrs.preferredRefreshRate != 0) { mInnerFields.mPreferredRefreshRate = w.mAttrs.preferredRefreshRate; } if (mInnerFields.mPreferredModeId == 0 && w.mAttrs.preferredDisplayModeId != 0) { mInnerFields.mPreferredModeId = w.mAttrs.preferredDisplayModeId; } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleNotObscuredLocked 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
handleNotObscuredLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public void notifyNetworkPolicyRulesUpdated(int uid, long procStateSeq) { if (DEBUG_NETWORK) { Slog.d(TAG_NETWORK, "Got update from NPMS for uid: " + uid + " seq: " + procStateSeq); } UidRecord record; synchronized (ActivityManagerService.this) { record = mActiveUids.get(uid); if (record == null) { if (DEBUG_NETWORK) { Slog.d(TAG_NETWORK, "No active uidRecord for uid: " + uid + " procStateSeq: " + procStateSeq); } return; } } synchronized (record.networkStateLock) { if (record.lastNetworkUpdatedProcStateSeq >= procStateSeq) { if (DEBUG_NETWORK) { Slog.d(TAG_NETWORK, "procStateSeq: " + procStateSeq + " has already" + " been handled for uid: " + uid); } return; } record.lastNetworkUpdatedProcStateSeq = procStateSeq; if (record.curProcStateSeq > procStateSeq) { if (DEBUG_NETWORK) { Slog.d(TAG_NETWORK, "No need to handle older seq no., Uid: " + uid + ", curProcstateSeq: " + record.curProcStateSeq + ", procStateSeq: " + procStateSeq); } return; } if (record.waitingForNetwork) { if (DEBUG_NETWORK) { Slog.d(TAG_NETWORK, "Notifying all blocking threads for uid: " + uid + ", procStateSeq: " + procStateSeq); } record.networkStateLock.notifyAll(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyNetworkPolicyRulesUpdated 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
notifyNetworkPolicyRulesUpdated
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public double getBodyRowHeight() { return getState(false).bodyRowHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBodyRowHeight 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
getBodyRowHeight
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
@Override public void setPublicId(String pubId) { fPublicId = pubId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPublicId File: ext/java/nokogiri/XmlSchema.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-26247
MEDIUM
4
sparklemotion/nokogiri
setPublicId
ext/java/nokogiri/XmlSchema.java
9c87439d9afa14a365ff13e73adc809cb2c3d97b
0
Analyze the following code function for security vulnerabilities
public BigInteger getBigInteger(String key) throws JSONException { Object object = this.get(key); BigInteger ret = objectToBigInteger(object, null); if (ret != null) { return ret; } throw wrongValueFormatException(key, "BigInteger", object, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBigInteger File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
getBigInteger
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public Builder port(ClickHouseProtocol protocol) { return port(protocol, null); }
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
public DocumentReference getAuthorReference() { return this.doc.getAuthorReference(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthorReference File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getAuthorReference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getPermittedCrossProfileNotificationListeners(ComponentName who) { if (!mHasFeature) { return null; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); synchronized (getLockObject()) { // API contract is to return null if there are no permitted cross-profile notification // listeners, including in Device Owner mode. ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller); return admin.permittedNotificationListeners; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermittedCrossProfileNotificationListeners File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getPermittedCrossProfileNotificationListeners
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public String getSelectSQL(Select select) { StringBuilder clause = new StringBuilder(); clause.append(getSelectStatement(select)); clause.append(" "); if (select.getColumns().isEmpty()) { clause.append("*"); } else { boolean first = true; for (Column column : select.getColumns()) { if (!first) { clause.append(", "); } String str = getColumnSQL(column); boolean aliasNonEmpty = !StringUtils.isBlank(column.getAlias()); boolean isSimpleColumn = (column instanceof SimpleColumn) && !str.equals(getColumnNameSQL(column.getAlias())); if (aliasNonEmpty && (allowAliasInStatements() || isSimpleColumn)) { str += " " + getAliasForColumnSQL(column.getAlias()); } clause.append(str); first = false; } } return clause.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSelectSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getSelectSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
@Override public Route.Definition after(final String method, final String pattern, final Route.After handler) { return appendDefinition(method, pattern, handler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: after 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
after
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public StandardTemplateParams textViewId(int textViewId) { mTextViewId = textViewId; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: textViewId File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
textViewId
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
void getBounds(Point bounds) { mDisplay.getDisplayInfo(mDisplayInfo); bounds.x = mDisplayInfo.appWidth; bounds.y = mDisplayInfo.appHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBounds File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
getBounds
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
@Override public TaskSnapshot getTaskSnapshotBlocking( int taskId, boolean isLowResolution) { return ActivityTaskManagerService.this.getTaskSnapshot(taskId, isLowResolution); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTaskSnapshotBlocking 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
getTaskSnapshotBlocking
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private static void writeTrustRootCerts(Parcel dest, Map<String, byte[]> trustRootCerts) { if (trustRootCerts == null) { dest.writeInt(NULL_VALUE); return; } dest.writeInt(trustRootCerts.size()); for (Map.Entry<String, byte[]> entry : trustRootCerts.entrySet()) { dest.writeString(entry.getKey()); dest.writeByteArray(entry.getValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeTrustRootCerts File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
writeTrustRootCerts
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "4.3M1") public String getRealLanguage(XWikiContext context) throws XWikiException { return getRealLanguage(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRealLanguage File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getRealLanguage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private void flingQsWithCurrentVelocity(float y, boolean isCancelMotionEvent) { float vel = getCurrentQSVelocity(); final boolean expandsQs = flingExpandsQs(vel); if (expandsQs) { logQsSwipeDown(y); } flingSettings(vel, expandsQs && !isCancelMotionEvent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: flingQsWithCurrentVelocity 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
flingQsWithCurrentVelocity
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Nullable String getDefaultLauncher(@UserIdInt int userId) { final long start = getStatStartTime(); final long token = injectClearCallingIdentity(); try { synchronized (mLock) { throwIfUserLockedL(userId); final ShortcutUser user = getUserShortcutsLocked(userId); String cachedLauncher = user.getCachedLauncher(); if (cachedLauncher != null) { return cachedLauncher; } // Default launcher from role manager. final long startGetHomeRoleHoldersAsUser = getStatStartTime(); final String defaultLauncher = injectGetHomeRoleHolderAsUser( getParentOrSelfUserId(userId)); logDurationStat(Stats.GET_DEFAULT_HOME, startGetHomeRoleHoldersAsUser); if (defaultLauncher != null) { if (DEBUG) { Slog.v(TAG, "Default launcher from RoleManager: " + defaultLauncher + " user: " + userId); } user.setCachedLauncher(defaultLauncher); } else { Slog.e(TAG, "Default launcher not found." + " user: " + userId); } return defaultLauncher; } } finally { injectRestoreCallingIdentity(token); logDurationStat(Stats.GET_DEFAULT_LAUNCHER, start); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultLauncher File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
getDefaultLauncher
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Deprecated public static void removeExclude(String URLPattern) { // not needed anymore }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeExclude File: dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-434" ]
CVE-2017-11466
HIGH
9
dotCMS/core
removeExclude
dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
ab2bb2e00b841d131b8734227f9106e3ac31bb99
0
Analyze the following code function for security vulnerabilities
@Override boolean check(RingbufferConfig c1, RingbufferConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getName(), c2.getName()) && nullSafeEqual(c1.getBackupCount(), c2.getBackupCount()) && nullSafeEqual(c1.getAsyncBackupCount(), c2.getAsyncBackupCount()) && nullSafeEqual(c1.getCapacity(), c2.getCapacity()) && nullSafeEqual(c1.getTimeToLiveSeconds(), c2.getTimeToLiveSeconds()) && nullSafeEqual(c1.getInMemoryFormat(), c2.getInMemoryFormat()) && nullSafeEqual(c1.getQuorumName(), c2.getQuorumName()) && isCompatible(c1.getRingbufferStoreConfig(), c2.getRingbufferStoreConfig()) && ConfigCompatibilityChecker.isCompatible(c1.getMergePolicyConfig(), c2.getMergePolicyConfig()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
protected Http2ConnectionEncoder encoder() { return encoder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encoder File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
encoder
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
public long getXWikiPreferenceAsLong(String preference, String fallbackParameter, long defaultValue, XWikiContext context) { return NumberUtils.toLong(getXWikiPreference(preference, fallbackParameter, "", context), defaultValue); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiPreferenceAsLong File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getXWikiPreferenceAsLong
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { process(request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doPost File: src/share/org/apache/struts/action/ActionServlet.java Repository: kawasima/struts1-forever The code follows secure coding practices.
[ "CWE-Other", "CWE-20" ]
CVE-2016-1181
MEDIUM
6.8
kawasima/struts1-forever
doPost
src/share/org/apache/struts/action/ActionServlet.java
eda3a79907ed8fcb0387a0496d0cb14332f250e8
0
Analyze the following code function for security vulnerabilities
boolean canReceiveTouchInput() { if (mActivityRecord == null || mActivityRecord.getTask() == null) { return true; } return !mActivityRecord.getTask().getRootTask().shouldIgnoreInput() && mActivityRecord.mVisibleRequested; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canReceiveTouchInput File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
canReceiveTouchInput
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public String getBaseBinURL() { return getBaseBinURL(this.currentWiki); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseBinURL File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getBaseBinURL
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
final void scheduleIdleLocked() { mHandler.sendEmptyMessage(IDLE_NOW_MSG); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scheduleIdleLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
scheduleIdleLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public void reloadCountNumbersOfSlidingPaneAdapter() { NewsReaderListFragment nlf = getSlidingListFragment(); if (nlf != null) { nlf.ListViewNotifyDataSetChanged(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reloadCountNumbersOfSlidingPaneAdapter File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
reloadCountNumbersOfSlidingPaneAdapter
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
public void addImmutableType(Class type) { addImmutableType(type, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addImmutableType File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
addImmutableType
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
protected String compileLess(String less) { String css = ""; try { css = lessEngine.compile(less); } catch(Exception e) { LogUtil.error(this.getClass().getName(), e, "Error compiling LESS"); LogUtil.debug(this.getClass().getName(), "LESS: " + less); } return css; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compileLess File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
compileLess
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
@Override public Document build(final InputStream in, final String systemId) throws JDOMException, IOException { try { return getEngine().build(in, systemId); } finally { if (!reuseParser) { engine = null; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: build File: core/src/java/org/jdom2/input/SAXBuilder.java Repository: hunterhacker/jdom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-33813
MEDIUM
5
hunterhacker/jdom
build
core/src/java/org/jdom2/input/SAXBuilder.java
bd3ab78370098491911d7fe9d7a43b97144a234e
0
Analyze the following code function for security vulnerabilities
public boolean removeStanzaAcknowledgedListener(StanzaListener listener) { return stanzaAcknowledgedListeners.remove(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeStanzaAcknowledgedListener File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
removeStanzaAcknowledgedListener
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(final Object obj) { RouteKey that = (RouteKey) obj; return key.equals(that.key); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-15477
MEDIUM
4.3
jooby-project/jooby
equals
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
34856a738829d8fedca4ed27bd6ff413af87186f
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting Supplier<ActionTransition> createShareAction(Context context, Resources r, Uri uri) { return () -> { ActionTransition transition = mSharedElementTransition.get(); // Note: Both the share and edit actions are proxied through ActionProxyReceiver in // order to do some common work like dismissing the keyguard and sending // closeSystemWindows // Create a share intent, this will always go through the chooser activity first // which should not trigger auto-enter PiP String subjectDate = DateFormat.getDateTimeInstance().format(new Date(mImageTime)); String subject = String.format(SCREENSHOT_SHARE_SUBJECT_TEMPLATE, subjectDate); Intent sharingIntent = new Intent(Intent.ACTION_SEND); sharingIntent.setDataAndType(uri, "image/png"); sharingIntent.putExtra(Intent.EXTRA_STREAM, uri); // Include URI in ClipData also, so that grantPermission picks it up. // We don't use setData here because some apps interpret this as "to:". ClipData clipdata = new ClipData(new ClipDescription("content", new String[]{ClipDescription.MIMETYPE_TEXT_PLAIN}), new ClipData.Item(uri)); sharingIntent.setClipData(clipdata); sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject); sharingIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) .addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); // Make sure pending intents for the system user are still unique across users // by setting the (otherwise unused) request code to the current user id. int requestCode = context.getUserId(); Intent sharingChooserIntent = Intent.createChooser(sharingIntent, null) .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK) .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // cancel current pending intent (if any) since clipData isn't used for matching PendingIntent pendingIntent = PendingIntent.getActivityAsUser( context, 0, sharingChooserIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE, transition.bundle, UserHandle.CURRENT); // Create a share action for the notification PendingIntent shareAction = PendingIntent.getBroadcastAsUser(context, requestCode, new Intent(context, ActionProxyReceiver.class) .putExtra(ScreenshotController.EXTRA_ACTION_INTENT, pendingIntent) .putExtra(ScreenshotController.EXTRA_DISALLOW_ENTER_PIP, true) .putExtra(ScreenshotController.EXTRA_ID, mScreenshotId) .putExtra(ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED, mSmartActionsEnabled) .setAction(Intent.ACTION_SEND) .addFlags(Intent.FLAG_RECEIVER_FOREGROUND), PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE, UserHandle.SYSTEM); Notification.Action.Builder shareActionBuilder = new Notification.Action.Builder( Icon.createWithResource(r, R.drawable.ic_screenshot_share), r.getString(com.android.internal.R.string.share), shareAction); transition.action = shareActionBuilder.build(); return transition; }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createShareAction File: packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35676
HIGH
7.8
android
createShareAction
packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
109e58b62dc9fedcee93983678ef9d4931e72afa
0
Analyze the following code function for security vulnerabilities
static final void indent(Writer writer, int indent) throws IOException { for (int i = 0; i < indent; i += 1) { writer.write(' '); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: indent File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
indent
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public static void addFileToZip(String path, String srcFile, ZipOutputStream zip, String ignore) throws Exception { File folder = new File(srcFile); if (folder.isDirectory()) { addFolderToZip(path, srcFile, zip, ignore); } else { byte[] buf = new byte[1024]; int len; try (FileInputStream in = new FileInputStream(srcFile)) { ZipEntry entry; if (ignore == null) entry = new ZipEntry(path + "/" + folder.getName()); else entry = new ZipEntry(path.replace(ignore, "BCV_Krakatau") + "/" + folder.getName()); zip.putNextEntry(entry); while ((len = in.read(buf)) > 0) { zip.write(buf, 0, len); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addFileToZip File: src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java Repository: Konloch/bytecode-viewer The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-21675
MEDIUM
6.8
Konloch/bytecode-viewer
addFileToZip
src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
1ec02658fe6858162f5e6a24f97928de6696c5cb
0
Analyze the following code function for security vulnerabilities
Integer getUserByOrgCodeTotal(@Param("orgCode") String orgCode, @Param("userParams") SysUser userParams);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserByOrgCodeTotal File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
getUserByOrgCodeTotal
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
public static int getOffsetAfterScheme(String uri) { Matcher m = uriSchemePattern.matcher(uri); if (m.matches()) { return m.group(1).length(); } return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOffsetAfterScheme File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-18212
MEDIUM
4
eclipse/lemminx
getOffsetAfterScheme
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
e37c399aa266be1b7a43061d4afc43dc230410d2
0
Analyze the following code function for security vulnerabilities
public int getPackageScreenCompatMode(String packageName) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageScreenCompatMode File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getPackageScreenCompatMode
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
static void assertIsInserted(long instanceId) { Assert.assertThat("Not inserted", instanceId, is(not(NOT_PERSISTED))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assertIsInserted File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
assertIsInserted
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
protected NotificationData.Entry createNotificationViews(StatusBarNotification sbn) throws InflationException { if (DEBUG) { Log.d(TAG, "createNotificationViews(notification=" + sbn); } NotificationData.Entry entry = new NotificationData.Entry(sbn); Dependency.get(LeakDetector.class).trackInstance(entry); entry.createIcons(mContext, sbn); // Construct the expanded view. inflateViews(entry, mStackScroller); return entry; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createNotificationViews 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
createNotificationViews
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private static void handle(CompletableFuture<?> future, AsyncMethodCallback resultHandler) { future.handle((res, cause) -> { if (cause != null) { resultHandler.onError(convert(cause)); } else { resultHandler.onComplete(res); } return null; }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handle File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
handle
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
public void onPatternCellAdded(List<Cell> pattern) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPatternCellAdded File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
onPatternCellAdded
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
public AwTestContainerView createDetachedAwTestContainerView( final AwContentsClient awContentsClient) { return createDetachedAwTestContainerView(awContentsClient, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createDetachedAwTestContainerView File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
createDetachedAwTestContainerView
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
public void processStreamAndScheduleJobs(InputStream stream, String systemId, Scheduler sched) throws ValidationException, ParserConfigurationException, SAXException, XPathException, IOException, SchedulerException, ClassNotFoundException, ParseException { prepForProcessing(); log.info("Parsing XML from stream with systemId: " + systemId); InputSource is = new InputSource(stream); is.setSystemId(systemId); process(is); executePreProcessCommands(sched); scheduleJobs(sched); maybeThrowValidationException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processStreamAndScheduleJobs File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
processStreamAndScheduleJobs
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
final void logAppTooSlow(ProcessRecord app, long startTime, String msg) { if (true || IS_USER_BUILD) { return; } String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null); if (tracesPath == null || tracesPath.length() == 0) { return; } StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); StrictMode.allowThreadDiskWrites(); try { final File tracesFile = new File(tracesPath); final File tracesDir = tracesFile.getParentFile(); final File tracesTmp = new File(tracesDir, "__tmp__"); try { if (tracesFile.exists()) { tracesTmp.delete(); tracesFile.renameTo(tracesTmp); } StringBuilder sb = new StringBuilder(); Time tobj = new Time(); tobj.set(System.currentTimeMillis()); sb.append(tobj.format("%Y-%m-%d %H:%M:%S")); sb.append(": "); TimeUtils.formatDuration(SystemClock.uptimeMillis()-startTime, sb); sb.append(" since "); sb.append(msg); FileOutputStream fos = new FileOutputStream(tracesFile); fos.write(sb.toString().getBytes()); if (app == null) { fos.write("\n*** No application process!".getBytes()); } fos.close(); FileUtils.setPermissions(tracesFile.getPath(), 0666, -1, -1); // -rw-rw-rw- } catch (IOException e) { Slog.w(TAG, "Unable to prepare slow app traces file: " + tracesPath, e); return; } if (app != null) { ArrayList<Integer> firstPids = new ArrayList<Integer>(); firstPids.add(app.pid); dumpStackTraces(tracesPath, firstPids, null, null, null); } File lastTracesFile = null; File curTracesFile = null; for (int i=9; i>=0; i--) { String name = String.format(Locale.US, "slow%02d.txt", i); curTracesFile = new File(tracesDir, name); if (curTracesFile.exists()) { if (lastTracesFile != null) { curTracesFile.renameTo(lastTracesFile); } else { curTracesFile.delete(); } } lastTracesFile = curTracesFile; } tracesFile.renameTo(curTracesFile); if (tracesTmp.exists()) { tracesTmp.renameTo(tracesFile); } } finally { StrictMode.setThreadPolicy(oldPolicy); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logAppTooSlow File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
logAppTooSlow
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public String getDeviceSvn() { return getDeviceSvnUsingSubId(getDefaultSubscription()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceSvn File: src/java/com/android/internal/telephony/PhoneSubInfoController.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-0831
MEDIUM
4.3
android
getDeviceSvn
src/java/com/android/internal/telephony/PhoneSubInfoController.java
79eecef63f3ea99688333c19e22813f54d4a31b1
0
Analyze the following code function for security vulnerabilities
private Account renameAccountInternal( UserAccounts accounts, Account accountToRename, String newName) { Account resultAccount = null; /* * Cancel existing notifications. Let authenticators * re-post notifications as required. But we don't know if * the authenticators have bound their notifications to * now stale account name data. * * With a rename api, we might not need to do this anymore but it * shouldn't hurt. */ cancelNotification( getSigninRequiredNotificationId(accounts, accountToRename), new UserHandle(accounts.userId)); synchronized(accounts.credentialsPermissionNotificationIds) { for (Pair<Pair<Account, String>, Integer> pair: accounts.credentialsPermissionNotificationIds.keySet()) { if (accountToRename.equals(pair.first.first)) { NotificationId id = accounts.credentialsPermissionNotificationIds.get(pair); cancelNotification(id, new UserHandle(accounts.userId)); } } } synchronized (accounts.dbLock) { synchronized (accounts.cacheLock) { List<String> accountRemovedReceivers = getAccountRemovedReceivers(accountToRename, accounts); accounts.accountsDb.beginTransaction(); Account renamedAccount = new Account(newName, accountToRename.type); try { if ((accounts.accountsDb.findCeAccountId(renamedAccount) >= 0)) { Log.e(TAG, "renameAccount failed - account with new name already exists"); return null; } final long accountId = accounts.accountsDb.findDeAccountId(accountToRename); if (accountId >= 0) { accounts.accountsDb.renameCeAccount(accountId, newName); if (accounts.accountsDb.renameDeAccount( accountId, newName, accountToRename.name)) { accounts.accountsDb.setTransactionSuccessful(); } else { Log.e(TAG, "renameAccount failed"); return null; } } else { Log.e(TAG, "renameAccount failed - old account does not exist"); return null; } } finally { accounts.accountsDb.endTransaction(); } /* * Database transaction was successful. Clean up cached * data associated with the account in the user profile. */ renamedAccount = insertAccountIntoCacheLocked(accounts, renamedAccount); /* * Extract the data and token caches before removing the * old account to preserve the user data associated with * the account. */ Map<String, String> tmpData = accounts.userDataCache.get(accountToRename); Map<String, String> tmpTokens = accounts.authTokenCache.get(accountToRename); Map<String, Integer> tmpVisibility = accounts.visibilityCache.get(accountToRename); removeAccountFromCacheLocked(accounts, accountToRename); /* * Update the cached data associated with the renamed * account. */ accounts.userDataCache.put(renamedAccount, tmpData); accounts.authTokenCache.put(renamedAccount, tmpTokens); accounts.visibilityCache.put(renamedAccount, tmpVisibility); accounts.previousNameCache.put( renamedAccount, new AtomicReference<>(accountToRename.name)); resultAccount = renamedAccount; int parentUserId = accounts.userId; if (canHaveProfile(parentUserId)) { /* * Owner or system user account was renamed, rename the account for * those users with which the account was shared. */ List<UserInfo> users = getUserManager().getAliveUsers(); for (UserInfo user : users) { if (user.isRestricted() && (user.restrictedProfileParentId == parentUserId)) { renameSharedAccountAsUser(accountToRename, newName, user.id); } } } sendNotificationAccountUpdated(resultAccount, accounts); sendAccountsChangedBroadcast(accounts.userId); for (String packageName : accountRemovedReceivers) { sendAccountRemovedBroadcast(accountToRename, packageName, accounts.userId); } AccountManager.invalidateLocalAccountsDataCaches(); AccountManager.invalidateLocalAccountUserDataCaches(); } } return resultAccount; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: renameAccountInternal File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
renameAccountInternal
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public Builder address(InetSocketAddress address) { return address(null, address); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: address 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
address
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
public Set<String> getIncludeFields() { Assert.notNull(includeFields, "Calls #toSqlWhere first"); return includeFields; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIncludeFields File: src/main/java/com/rebuild/core/service/query/AdvFilterParser.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
getIncludeFields
src/main/java/com/rebuild/core/service/query/AdvFilterParser.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
public Iterator<String> getValidatorIds() { return validatorMap.keySet().iterator(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValidatorIds File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
getValidatorIds
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0