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
private void loadInternalDataFromUserStore(List<WifiConfiguration> configurations) { long supportedFeatures = mWifiInjector.getActiveModeWarden() .getPrimaryClientModeManager().getSupportedFeatures(); for (WifiConfiguration configuration : configurations) { if (!WifiConfigurationUtil.validate( configuration, supportedFeatures, WifiConfigurationUtil.VALIDATE_FOR_ADD)) { Log.e(TAG, "Skipping malformed network from user store: " + configuration); continue; } WifiConfiguration existingConfiguration = getInternalConfiguredNetwork(configuration); if (null != existingConfiguration) { Log.d(TAG, "Merging network from user store " + configuration.getProfileKey()); mergeWithInternalWifiConfiguration(existingConfiguration, configuration); continue; } configuration.networkId = mNextNetworkId++; if (mVerboseLoggingEnabled) { Log.v(TAG, "Adding network from user store " + configuration.getProfileKey()); } try { mConfiguredNetworks.put(configuration); } catch (IllegalArgumentException e) { Log.e(TAG, "Failed to add network to config map", e); } if (configuration.isMostRecentlyConnected) { mLruConnectionTracker.addNetwork(configuration); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadInternalDataFromUserStore File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
loadInternalDataFromUserStore
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private final void assignLayersLocked(WindowList windows) { int N = windows.size(); int curBaseLayer = 0; int curLayer = 0; int i; if (DEBUG_LAYERS) Slog.v(TAG, "Assigning layers based on windows=" + windows, new RuntimeException("here").fillInStackTrace()); boolean anyLayerChanged = false; for (i=0; i<N; i++) { final WindowState w = windows.get(i); final WindowStateAnimator winAnimator = w.mWinAnimator; boolean layerChanged = false; int oldLayer = w.mLayer; if (w.mBaseLayer == curBaseLayer || w.mIsImWindow || (i > 0 && w.mIsWallpaper)) { curLayer += WINDOW_LAYER_MULTIPLIER; w.mLayer = curLayer; } else { curBaseLayer = curLayer = w.mBaseLayer; w.mLayer = curLayer; } if (w.mLayer != oldLayer) { layerChanged = true; anyLayerChanged = true; } final AppWindowToken wtoken = w.mAppToken; oldLayer = winAnimator.mAnimLayer; if (w.mTargetAppToken != null) { winAnimator.mAnimLayer = w.mLayer + w.mTargetAppToken.mAppAnimator.animLayerAdjustment; } else if (wtoken != null) { winAnimator.mAnimLayer = w.mLayer + wtoken.mAppAnimator.animLayerAdjustment; } else { winAnimator.mAnimLayer = w.mLayer; } if (w.mIsImWindow) { winAnimator.mAnimLayer += mInputMethodAnimLayerAdjustment; } else if (w.mIsWallpaper) { winAnimator.mAnimLayer += mWallpaperAnimLayerAdjustment; } if (winAnimator.mAnimLayer != oldLayer) { layerChanged = true; anyLayerChanged = true; } final TaskStack stack = w.getStack(); if (layerChanged && stack != null && stack.isDimming(winAnimator)) { // Force an animation pass just to update the mDimLayer layer. scheduleAnimationLocked(); } if (DEBUG_LAYERS) Slog.v(TAG, "Assign layer " + w + ": " + "mBase=" + w.mBaseLayer + " mLayer=" + w.mLayer + (wtoken == null ? "" : " mAppLayer=" + wtoken.mAppAnimator.animLayerAdjustment) + " =mAnimLayer=" + winAnimator.mAnimLayer); //System.out.println( // "Assigned layer " + curLayer + " to " + w.mClient.asBinder()); } //TODO (multidisplay): Magnification is supported only for the default display. if (mAccessibilityController != null && anyLayerChanged && windows.get(windows.size() - 1).getDisplayId() == Display.DEFAULT_DISPLAY) { mAccessibilityController.onWindowLayersChangedLocked(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assignLayersLocked 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
assignLayersLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public void notifyAppTransitionStarting(int reason) { synchronized (ActivityManagerService.this) { mStackSupervisor.mActivityMetricsLogger.notifyTransitionStarting(reason); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyAppTransitionStarting 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
notifyAppTransitionStarting
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
void onCorruption() { EventLog.writeEvent(EVENT_DB_CORRUPT, getLabel()); mErrorHandler.onCorruption(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCorruption 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
onCorruption
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Override public boolean killProcessesBelowForeground(String reason) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(reason); mRemote.transact(KILL_PROCESSES_BELOW_FOREGROUND_TRANSACTION, data, reply, 0); boolean res = reply.readInt() != 0; data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killProcessesBelowForeground File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
killProcessesBelowForeground
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void setCurrentlyUsedCertPath(CertPath cPath) { currentlyUsed = cPath; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCurrentlyUsedCertPath File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.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
setCurrentlyUsedCertPath
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
0
Analyze the following code function for security vulnerabilities
private void pushbackTC() { hasPushbackTC = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pushbackTC File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
pushbackTC
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Pure public @Nullable InputStream getBinaryStream(@Positive int columnIndex) throws SQLException { connection.getLogger().log(Level.FINEST, " getBinaryStream columnIndex: {0}", columnIndex); byte[] value = getRawValue(columnIndex); if (value == null) { return null; } // Version 7.2 supports BinaryStream for all PG bytea type // As the spec/javadoc for this method indicate this is to be used for // large binary values (i.e. LONGVARBINARY) PG doesn't have a separate // long binary datatype, but with toast the bytea datatype is capable of // handling very large values. Thus the implementation ends up calling // getBytes() since there is no current way to stream the value from the server byte[] b = getBytes(columnIndex); if (b != null) { return new ByteArrayInputStream(b); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBinaryStream File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getBinaryStream
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private boolean noIdProviderSpecified() { return this.idProvider == null || this.idProvider.length == 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: noIdProviderSpecified File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp The code follows secure coding practices.
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
noIdProviderSpecified
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
0189975691e9e6407a9fee87006f730e84f734ff
0
Analyze the following code function for security vulnerabilities
private String evaluate(String content, String name, VelocityContext vcontext, XWikiContext context) { StringWriter writer = new StringWriter(); try { VelocityManager velocityManager = Utils.getComponent(VelocityManager.class); velocityManager.getVelocityEngine().evaluate(vcontext, writer, name, content); return writer.toString(); } catch (Exception e) { LOGGER.error("Error while parsing velocity template namespace [{}]", name, e); Object[] args = { name }; XWikiException xe = new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_RENDERING_VELOCITY_EXCEPTION, "Error while parsing velocity page {0}", e, args); return Util.getHTMLExceptionMessage(xe, context); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: evaluate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
evaluate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
protected void messageSent() { mSendingPgpMessage.set(false); this.binding.textinput.setText(""); if (conversation.setCorrectingMessage(null)) { this.binding.textinput.append(conversation.getDraftMessage()); conversation.setDraftMessage(null); } storeNextMessage(); updateChatMsgHint(); SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(activity); final boolean prefScrollToBottom = p.getBoolean("scroll_to_bottom", activity.getResources().getBoolean(R.bool.scroll_to_bottom)); if (prefScrollToBottom || scrolledToBottom()) { new Handler().post(() -> { int size = messageList.size(); this.binding.messagesView.setSelection(size - 1); }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: messageSent File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
messageSent
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") @Override public boolean contains(K name, V value) { return contains(name, value, JAVA_HASHER); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: contains File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
contains
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
protected Nulls findContentNullStyle(DeserializationContext ctxt, BeanProperty prop) throws JsonMappingException { if (prop != null) { return prop.getMetadata().getContentNulls(); } // 24-Aug-2021, tatu: As per [databind#3227] root values also need // to be checked for content nulls // NOTE: will this work wrt type-specific overrides? Probably not... return ctxt.getConfig().getDefaultSetterInfo().getContentNulls(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findContentNullStyle File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42003
HIGH
7.5
FasterXML/jackson-databind
findContentNullStyle
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
d78d00ee7b5245b93103fef3187f70543d67ca33
0
Analyze the following code function for security vulnerabilities
@Override public boolean isSecondaryLockscreenEnabled(@NonNull UserHandle userHandle) { synchronized (getLockObject()) { return getUserData(userHandle.getIdentifier()).mSecondaryLockscreenEnabled; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSecondaryLockscreenEnabled 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
isSecondaryLockscreenEnabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "SerializationConfig{" + "portableVersion=" + portableVersion + ", dataSerializableFactoryClasses=" + dataSerializableFactoryClasses + ", dataSerializableFactories=" + dataSerializableFactories + ", portableFactoryClasses=" + portableFactoryClasses + ", portableFactories=" + portableFactories + ", globalSerializerConfig=" + globalSerializerConfig + ", serializerConfigs=" + serializerConfigs + ", checkClassDefErrors=" + checkClassDefErrors + ", classDefinitions=" + classDefinitions + ", byteOrder=" + byteOrder + ", useNativeByteOrder=" + useNativeByteOrder + '}'; }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2016-10750 - Severity: MEDIUM - CVSS Score: 6.8 Description: Add basic protection against untrusted deserialization. Function: toString File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java Repository: hazelcast Fixed Code: @Override public String toString() { return "SerializationConfig{" + "portableVersion=" + portableVersion + ", dataSerializableFactoryClasses=" + dataSerializableFactoryClasses + ", dataSerializableFactories=" + dataSerializableFactories + ", portableFactoryClasses=" + portableFactoryClasses + ", portableFactories=" + portableFactories + ", globalSerializerConfig=" + globalSerializerConfig + ", serializerConfigs=" + serializerConfigs + ", checkClassDefErrors=" + checkClassDefErrors + ", classDefinitions=" + classDefinitions + ", byteOrder=" + byteOrder + ", useNativeByteOrder=" + useNativeByteOrder + ", javaSerializationFilterConfig=" + javaSerializationFilterConfig + '}'; }
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
toString
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
1
Analyze the following code function for security vulnerabilities
@Override public int getMaxY() { return getWorld().getMaxHeight() - 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaxY File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
getMaxY
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
public String getValue() { return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValue File: src/main/java/com/gitblit/StoredUserConfig.java Repository: gitblit-org/gitblit The code follows secure coding practices.
[ "CWE-269" ]
CVE-2022-31267
HIGH
7.5
gitblit-org/gitblit
getValue
src/main/java/com/gitblit/StoredUserConfig.java
9b4afad6f4be212474809533ec2c280cce86501a
0
Analyze the following code function for security vulnerabilities
public boolean isLockScreenDisabled(int userId) { return !isSecure(userId) && getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLockScreenDisabled 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
isLockScreenDisabled
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public void engineInit( int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { AlgorithmParameterSpec paramSpec = null; if (params != null) { try { paramSpec = params.getParameterSpec(IESParameterSpec.class); } catch (Exception e) { throw new InvalidAlgorithmParameterException("cannot recognise parameters: " + e.toString()); } } engineParam = params; engineInit(opmode, key, paramSpec, random); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineInit File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineInit
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
private void addDCValue(Context c, Item i, String schema, Node n) throws TransformerException, SQLException, AuthorizeException { String value = getStringValue(n); //n.getNodeValue(); // compensate for empty value getting read as "null", which won't display if (value == null) { value = ""; } else { value = value.trim(); } // //getElementData(n, "element"); String element = getAttributeValue(n, "element"); String qualifier = getAttributeValue(n, "qualifier"); //NodeValue(); // //getElementData(n, // "qualifier"); String language = getAttributeValue(n, "language"); if (language != null) { language = language.trim(); } if (!isQuiet) { System.out.println("\tSchema: " + schema + " Element: " + element + " Qualifier: " + qualifier + " Value: " + value); } if ("none".equals(qualifier) || "".equals(qualifier)) { qualifier = null; } // only add metadata if it is no test and there is an real value if (!isTest && !value.equals("")) { i.addMetadata(schema, element, qualifier, language, value); } else { // If we're just test the import, let's check that the actual metadata field exists. MetadataSchema foundSchema = MetadataSchema.find(c,schema); if (foundSchema == null) { System.out.println("ERROR: schema '"+schema+"' was not found in the registry."); return; } int schemaID = foundSchema.getSchemaID(); MetadataField foundField = MetadataField.findByElement(c, schemaID, element, qualifier); if (foundField == null) { System.out.println("ERROR: Metadata field: '"+schema+"."+element+"."+qualifier+"' was not found in the registry."); return; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDCValue File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
addDCValue
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
56e76049185bbd87c994128a9d77735ad7af0199
0
Analyze the following code function for security vulnerabilities
public String getTextArea(String content) { return com.xpn.xwiki.XWiki.getTextArea(content, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTextArea File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getTextArea
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
private void cancelAuthentication(CryptoObject cryptoObject) { if (mService != null) try { mService.cancelAuthentication(mToken, mContext.getOpPackageName()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelAuthentication File: core/java/android/hardware/fingerprint/FingerprintManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
cancelAuthentication
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
private void addDisabledHint(ManagedServiceInfo info, int hint) { if (mListenersDisablingEffects.indexOfKey(hint) < 0) { mListenersDisablingEffects.put(hint, new ArraySet<ManagedServiceInfo>()); } ArraySet<ManagedServiceInfo> hintListeners = mListenersDisablingEffects.get(hint); hintListeners.add(info); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDisabledHint 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
addDisabledHint
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Override protected boolean isPackageForFilter(String packageName, PackageParser.ProviderIntentInfo info) { return packageName.equals(info.provider.owner.packageName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPackageForFilter File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
isPackageForFilter
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void setView(String viewStr) { this.view = new P4MaterialViewConfig(viewStr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setView File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
setView
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public static final native void setProcessGroup(int pid, int group) throws IllegalArgumentException, SecurityException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProcessGroup File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
setProcessGroup
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
Builder setIntent(Intent intent) { mIntent = intent; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIntent 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
setIntent
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public KeyguardAffordanceView getCenterIcon() { return mKeyguardBottomArea.getLockIcon(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCenterIcon 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
getCenterIcon
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public AsyncHttpClientConfigBean setApplicationThreadPool(ExecutorService applicationThreadPool) { if (this.applicationThreadPool != null) { this.applicationThreadPool.shutdownNow(); } this.applicationThreadPool = applicationThreadPool; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setApplicationThreadPool File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setApplicationThreadPool
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
private String getFileExtension(String filename) { String retval = filename; int pos = filename.lastIndexOf("."); if (pos > 0) retval = filename.substring(pos + 1); return retval; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFileExtension File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java Repository: jflyfox/jfinal_cms The code follows secure coding practices.
[ "CWE-74" ]
CVE-2021-37262
MEDIUM
5
jflyfox/jfinal_cms
getFileExtension
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
e7fd0fe9362464c4d2bd308318eecc89a847b116
0
Analyze the following code function for security vulnerabilities
public LocalFileHeader getNextEntry(FileHeader fileHeader, boolean readUntilEndOfCurrentEntryIfOpen) throws IOException { if (localFileHeader != null && readUntilEndOfCurrentEntryIfOpen) { readUntilEndOfEntry(); } localFileHeader = headerReader.readLocalFileHeader(inputStream, zip4jConfig.getCharset()); if (localFileHeader == null) { return null; } if (localFileHeader.isEncrypted() && password == null && passwordCallback != null) { setPassword(passwordCallback.getPassword()); } verifyLocalFileHeader(localFileHeader); crc32.reset(); if (fileHeader != null) { localFileHeader.setCrc(fileHeader.getCrc()); localFileHeader.setCompressedSize(fileHeader.getCompressedSize()); localFileHeader.setUncompressedSize(fileHeader.getUncompressedSize()); // file header's directory flag is more reliable than local file header's directory flag as file header has // additional external file attributes which has a directory flag defined. In local file header, the only way // to determine if an entry is directory is to check if the file name has a trailing forward slash "/" localFileHeader.setDirectory(fileHeader.isDirectory()); canSkipExtendedLocalFileHeader = true; } else { canSkipExtendedLocalFileHeader = false; } this.decompressedInputStream = initializeEntryInputStream(localFileHeader); this.entryEOFReached = false; return localFileHeader; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNextEntry File: src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
getNextEntry
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
public @NotNull DragonflyBuilder setStatusHandler(@NotNull Consumer<Status> statusHandler) { this.statusHandler = statusHandler; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStatusHandler File: src/main/java/dev/hypera/dragonfly/DragonflyBuilder.java Repository: HyperaDev/Dragonfly The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
setStatusHandler
src/main/java/dev/hypera/dragonfly/DragonflyBuilder.java
9661375e1135127ca6cdb5712e978bec33cc06b3
0
Analyze the following code function for security vulnerabilities
private boolean createIdmapForPackagePairLI(PackageParser.Package pkg, PackageParser.Package opkg) { if (!opkg.mTrustedOverlay) { Slog.w(TAG, "Skipping target and overlay pair " + pkg.baseCodePath + " and " + opkg.baseCodePath + ": overlay not trusted"); return false; } ArrayMap<String, PackageParser.Package> overlaySet = mOverlays.get(pkg.packageName); if (overlaySet == null) { Slog.e(TAG, "was about to create idmap for " + pkg.baseCodePath + " and " + opkg.baseCodePath + " but target package has no known overlays"); return false; } final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid); // TODO: generate idmap for split APKs if (mInstaller.idmap(pkg.baseCodePath, opkg.baseCodePath, sharedGid) != 0) { Slog.e(TAG, "Failed to generate idmap for " + pkg.baseCodePath + " and " + opkg.baseCodePath); return false; } PackageParser.Package[] overlayArray = overlaySet.values().toArray(new PackageParser.Package[0]); Comparator<PackageParser.Package> cmp = new Comparator<PackageParser.Package>() { public int compare(PackageParser.Package p1, PackageParser.Package p2) { return p1.mOverlayPriority - p2.mOverlayPriority; } }; Arrays.sort(overlayArray, cmp); pkg.applicationInfo.resourceDirs = new String[overlayArray.length]; int i = 0; for (PackageParser.Package p : overlayArray) { pkg.applicationInfo.resourceDirs[i++] = p.baseCodePath; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createIdmapForPackagePairLI File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
createIdmapForPackagePairLI
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public static String getNodeText(Node node, String... nodePath) { List<Node> nodes = getNodes(node, nodePath); if (nodes != null && nodes.size() > 0) { return nodes.get(0).getTextContent(); } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNodeText File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
getNodeText
src/edu/stanford/nlp/util/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
@Override public Iterator<FileHeader> iterator() { return new Iterator<FileHeader>() { @Override public FileHeader next() { FileHeader next; if (Archive.this.nextFileHeader != null) { next = Archive.this.nextFileHeader; } else { next = nextFileHeader(); } return next; } @Override public boolean hasNext() { Archive.this.nextFileHeader = nextFileHeader(); return Archive.this.nextFileHeader != null; } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: iterator 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
iterator
src/main/java/com/github/junrar/Archive.java
7b16b3d90b91445fd6af0adfed22c07413d4fab7
0
Analyze the following code function for security vulnerabilities
public @Nullable String getGlobalPrivateDnsHost(@NonNull ComponentName admin) { throwIfParentInstance("setGlobalPrivateDns"); if (mService == null) { return null; } try { return mService.getGlobalPrivateDnsHost(admin); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGlobalPrivateDnsHost 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
getGlobalPrivateDnsHost
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void sendResponse(TransportResponse response, TransportResponseOptions options) throws IOException { if (transport.compress) { options.withCompress(true); } byte status = 0; status = TransportStatus.setResponse(status); ReleasableBytesStreamOutput bStream = new ReleasableBytesStreamOutput(transport.bigArrays); boolean addedReleaseListener = false; try { bStream.skip(NettyHeader.HEADER_SIZE); StreamOutput stream = bStream; if (options.compress()) { status = TransportStatus.setCompress(status); stream = CompressorFactory.defaultCompressor().streamOutput(stream); } stream = new HandlesStreamOutput(stream); stream.setVersion(version); response.writeTo(stream); stream.close(); ReleasableBytesReference bytes = bStream.bytes(); ChannelBuffer buffer = bytes.toChannelBuffer(); NettyHeader.writeHeader(buffer, requestId, status, version); ChannelFuture future = channel.write(buffer); ReleaseChannelFutureListener listener = new ReleaseChannelFutureListener(bytes); future.addListener(listener); addedReleaseListener = true; transportServiceAdapter.onResponseSent(requestId, action, response, options); } finally { if (!addedReleaseListener) { Releasables.close(bStream.bytes()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendResponse File: src/main/java/org/elasticsearch/transport/netty/NettyTransportChannel.java Repository: elastic/elasticsearch The code follows secure coding practices.
[ "CWE-74" ]
CVE-2015-5377
HIGH
7.5
elastic/elasticsearch
sendResponse
src/main/java/org/elasticsearch/transport/netty/NettyTransportChannel.java
bf3052d14c874aead7da8855c5fcadf5428a43f2
0
Analyze the following code function for security vulnerabilities
@Override public VFSStatus rename(String newname) { CoreSpringFactory.getImpl(VFSRepositoryService.class).rename(this, newname); File f = getBasefile(); File par = f.getParentFile(); File nf = new File(par, newname); boolean ren = f.renameTo(nf); if (ren) { // f.renameTo() does NOT modify the path contained in the object f!! // The guys at sun consider this a feature and not a bug... // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4094022 // We need to manually reload the new basefile and set it in our parent super.setBasefile(new File(nf.getAbsolutePath())); return VFSConstants.YES; } else { return VFSConstants.NO; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rename File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
rename
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
0
Analyze the following code function for security vulnerabilities
@Override protected BigDecimal bcdToBigDecimal() { if (usingBytes) { // Converting to a string here is faster than doing BigInteger/BigDecimal arithmetic. BigDecimal result = new BigDecimal(toNumberString()); if (isNegative()) { result = result.negate(); } return result; } else { long tempLong = 0L; for (int shift = (precision - 1); shift >= 0; shift--) { tempLong = tempLong * 10 + getDigitPos(shift); } BigDecimal result = BigDecimal.valueOf(tempLong); result = result.scaleByPowerOfTen(scale); if (isNegative()) result = result.negate(); return result; } }
Vulnerability Classification: - CWE: CWE-190 - CVE: CVE-2018-18928 - Severity: HIGH - CVSS Score: 7.5 Description: ICU-20246 Fixing another integer overflow in number parsing. Function: bcdToBigDecimal File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java Repository: unicode-org/icu Fixed Code: @Override protected BigDecimal bcdToBigDecimal() { if (usingBytes) { // Converting to a string here is faster than doing BigInteger/BigDecimal arithmetic. BigDecimal result = new BigDecimal(toNumberString()); if (isNegative()) { result = result.negate(); } return result; } else { long tempLong = 0L; for (int shift = (precision - 1); shift >= 0; shift--) { tempLong = tempLong * 10 + getDigitPos(shift); } BigDecimal result = BigDecimal.valueOf(tempLong); try { result = result.scaleByPowerOfTen(scale); } catch (ArithmeticException e) { if (e.getMessage().contains("Underflow")) { result = BigDecimal.ZERO; } else { throw e; } } if (isNegative()) result = result.negate(); return result; } }
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
bcdToBigDecimal
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
1
Analyze the following code function for security vulnerabilities
private String guessMimeTypeFromContents(final ChannelBuffer buf) { if (!buf.readable()) { logWarn("Sending an empty result?! buf=" + buf); return "text/plain"; } final int firstbyte = buf.getUnsignedByte(buf.readerIndex()); switch (firstbyte) { case '<': // <html or <!DOCTYPE return HTML_CONTENT_TYPE; case '{': // JSON object case '[': // JSON array return "application/json"; // RFC 4627 section 6 mandates this. case 0x89: // magic number in PNG files. return "image/png"; } return "text/plain"; // Default. }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: guessMimeTypeFromContents File: src/tsd/HttpQuery.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
guessMimeTypeFromContents
src/tsd/HttpQuery.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
public static byte[] read(InputStream is, byte[] data, int size) throws IOException { int bytesRead = is.read(data, 0, size); if (bytesRead != size) { throw new RuntimeException("Unable to read the required number of bytes"); } return data; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/main/java/net/sf/mpxj/common/InputStreamHelper.java Repository: joniles/mpxj The code follows secure coding practices.
[ "CWE-377", "CWE-200" ]
CVE-2022-41954
LOW
3.3
joniles/mpxj
read
src/main/java/net/sf/mpxj/common/InputStreamHelper.java
ae0af24345d79ad45705265d9927fe55e94a5721
0
Analyze the following code function for security vulnerabilities
@Override public boolean isAntiAliasedTextSupported() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAntiAliasedTextSupported File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isAntiAliasedTextSupported
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected R loadBuild(File dir) throws IOException { try { return getBuildClass().getConstructor(getClass(),File.class).newInstance(this,dir); } catch (InstantiationException e) { throw new Error(e); } catch (IllegalAccessException e) { throw new Error(e); } catch (InvocationTargetException e) { throw handleInvocationTargetException(e); } catch (NoSuchMethodException e) { throw new Error(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadBuild 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
loadBuild
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void addArg( Arg argument, boolean insertAtStart ) { if ( insertAtStart ) { arguments.insertElementAt( argument, 0 ); } else { arguments.addElement( argument ); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addArg File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
addArg
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
Class<?> findClassNonRecursive(final String name) throws ClassNotFoundException { // If we have searched this path before, don't try again if (Arrays.equals(super.getURLs(), notFoundResources.get(name))) { throw new ClassNotFoundException(name); } try { return AccessController.doPrivileged( new PrivilegedExceptionAction<Class<?>>() { public Class<?> run() throws ClassNotFoundException { Class<?> c = CodeBaseClassLoader.super.findClass(name); parentJNLPClassLoader.checkPartialSigningWithUser(); return c; } }, parentJNLPClassLoader.getAccessControlContextForClassLoading()); } catch (PrivilegedActionException pae) { notFoundResources.put(name, super.getURLs()); throw new ClassNotFoundException("Could not find class " + name, pae); } catch (NullJnlpFileException njf) { notFoundResources.put(name, super.getURLs()); throw new ClassNotFoundException("Could not find class " + name, njf); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findClassNonRecursive 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
findClassNonRecursive
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
public void setWebProtocols(final String[] webProtocols) { this.webProtocols = webProtocols; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWebProtocols File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java Repository: codelibs/fess The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000822
HIGH
7.5
codelibs/fess
setWebProtocols
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
0
Analyze the following code function for security vulnerabilities
@Override void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets, Rect outSurfaceInsets) { final WindowState win = findMainWindow(); if (win == null) { return; } win.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAnimationFrames 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
getAnimationFrames
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { if (FormApply.isApply(req)) { FormApply.applyResponse("notificationBar.show(" + quote(getMessage())+ ",notificationBar.defaultOptions.ERROR)") .generateResponse(req, rsp, node); } else { // for now, we can't really use the field name that caused the problem. new Failure(getMessage()).generateResponse(req,rsp,node); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateResponse File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
generateResponse
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void deleteSubscription(ServiceRequest service) throws UaException { DeleteSubscriptionsRequest request = (DeleteSubscriptionsRequest) service.getRequest(); List<UInteger> subscriptionIds = l(request.getSubscriptionIds()); if (subscriptionIds.isEmpty()) { throw new UaException(StatusCodes.Bad_NothingToDo); } StatusCode[] results = new StatusCode[subscriptionIds.size()]; for (int i = 0; i < subscriptionIds.size(); i++) { UInteger subscriptionId = subscriptionIds.get(i); Subscription subscription = subscriptions.remove(subscriptionId); if (subscription != null) { server.getSubscriptions().remove(subscription.getId()); server.getEventBus().post(new SubscriptionDeletedEvent(subscription)); List<BaseMonitoredItem<?>> deletedItems = subscription.deleteSubscription(); /* * Notify AddressSpaces of the items we just deleted. */ byMonitoredItemType( deletedItems, dataItems -> server.getAddressSpaceManager().onDataItemsDeleted(dataItems), eventItems -> server.getAddressSpaceManager().onEventItemsDeleted(eventItems) ); results[i] = StatusCode.GOOD; server.getMonitoredItemCount().getAndUpdate(count -> count - deletedItems.size()); } else { results[i] = new StatusCode(StatusCodes.Bad_SubscriptionIdInvalid); } } ResponseHeader header = service.createResponseHeader(); DeleteSubscriptionsResponse response = new DeleteSubscriptionsResponse( header, results, new DiagnosticInfo[0] ); service.setResponse(response); while (subscriptions.isEmpty() && publishQueue.isNotEmpty()) { ServiceRequest publishService = publishQueue.poll(); if (publishService != null) { publishService.setServiceFault(StatusCodes.Bad_NoSubscription); } } }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2022-25897 - Severity: HIGH - CVSS Score: 7.5 Description: Allow max MonitoredItems per session to be configured via OpcUaServerConfigLimits Function: deleteSubscription File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java Repository: eclipse/milo Fixed Code: public void deleteSubscription(ServiceRequest service) throws UaException { DeleteSubscriptionsRequest request = (DeleteSubscriptionsRequest) service.getRequest(); List<UInteger> subscriptionIds = l(request.getSubscriptionIds()); if (subscriptionIds.isEmpty()) { throw new UaException(StatusCodes.Bad_NothingToDo); } StatusCode[] results = new StatusCode[subscriptionIds.size()]; for (int i = 0; i < subscriptionIds.size(); i++) { UInteger subscriptionId = subscriptionIds.get(i); Subscription subscription = subscriptions.remove(subscriptionId); if (subscription != null) { server.getSubscriptions().remove(subscription.getId()); server.getEventBus().post(new SubscriptionDeletedEvent(subscription)); List<BaseMonitoredItem<?>> deletedItems = subscription.deleteSubscription(); /* * Notify AddressSpaces of the items we just deleted. */ byMonitoredItemType( deletedItems, dataItems -> server.getAddressSpaceManager().onDataItemsDeleted(dataItems), eventItems -> server.getAddressSpaceManager().onEventItemsDeleted(eventItems) ); results[i] = StatusCode.GOOD; monitoredItemCount.getAndUpdate(count -> count - deletedItems.size()); server.getMonitoredItemCount().getAndUpdate(count -> count - deletedItems.size()); } else { results[i] = new StatusCode(StatusCodes.Bad_SubscriptionIdInvalid); } } ResponseHeader header = service.createResponseHeader(); DeleteSubscriptionsResponse response = new DeleteSubscriptionsResponse( header, results, new DiagnosticInfo[0] ); service.setResponse(response); while (subscriptions.isEmpty() && publishQueue.isNotEmpty()) { ServiceRequest publishService = publishQueue.poll(); if (publishService != null) { publishService.setServiceFault(StatusCodes.Bad_NoSubscription); } } }
[ "CWE-770" ]
CVE-2022-25897
HIGH
7.5
eclipse/milo
deleteSubscription
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
1
Analyze the following code function for security vulnerabilities
public ConnectionFactory load(String propertyFileLocation, String prefix) throws IOException { ConnectionFactoryConfigurator.load(this, propertyFileLocation, prefix); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: load File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
load
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public int getRows() { return getIntValue("rows"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRows File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-41046
MEDIUM
6.3
xwiki/xwiki-platform
getRows
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
edc52579eeaab1b4514785c134044671a1ecd839
0
Analyze the following code function for security vulnerabilities
public String getPackageForToken(IBinder token) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageForToken File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getPackageForToken
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected void internalSetBigContentTitle(CharSequence title) { mBigContentTitle = title; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalSetBigContentTitle File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
internalSetBigContentTitle
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setUsesChronometer(boolean b) { mN.extras.putBoolean(EXTRA_SHOW_CHRONOMETER, b); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUsesChronometer File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setUsesChronometer
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public <T> T putAttachment(AttachmentKey<T> key, T value) { if (key == null) { throw UndertowMessages.MESSAGES.argumentCannotBeNull("key"); } return key.cast(attachments.put(key, key.cast(value))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putAttachment File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
putAttachment
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
@Override protected void performDelete() throws IOException, InterruptedException { // prevent a new build while a delete operation is in progress makeDisabled(true); FilePath ws = getWorkspace(); if(ws!=null) { Node on = getLastBuiltOn(); getScm().processWorkspaceBeforeDeletion(this, ws, on); if(on!=null) on.getFileSystemProvisioner().discardWorkspace(this,ws); } super.performDelete(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: performDelete 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
performDelete
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public String getChildProjectsValue() { return childProjects; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChildProjectsValue File: core/src/main/java/hudson/tasks/BuildTrigger.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getChildProjectsValue
core/src/main/java/hudson/tasks/BuildTrigger.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public LlcpSocket createLlcpSocket(int sap, int miu, int rw, int linearBufferLength) throws LlcpException { return mDeviceHost.createLlcpSocket(sap, miu, rw, linearBufferLength); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createLlcpSocket File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
createLlcpSocket
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
private void trackContextHelperReferences( ServiceReference<?> reference) { LoggerFactory.getLogger(ResourceBundleTracker.class).debug( "Found several {} services matched context path '{}'. " + "The first one is used to register a resource and it's tracked for changes.", ServletContextHelper.class.getSimpleName(), contextPath); contextHelperListener = event -> { if (reference.equals(event.getServiceReference()) && event.getType() != ServiceEvent.REGISTERED) { if (contextHelperListener != null) { reference.getBundle().getBundleContext() .removeServiceListener(contextHelperListener); contextHelperListener = null; } if (resourceRegistration != null) { Bundle bundle = resourceRegistration.getReference() .getBundle(); resourceRegistration.unregister(); registerResource(bundle); } } }; reference.getBundle().getBundleContext() .addServiceListener(contextHelperListener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: trackContextHelperReferences File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java Repository: vaadin/osgi The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
trackContextHelperReferences
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
0
Analyze the following code function for security vulnerabilities
@EnsuresNonNull("thisRow") protected byte @Nullable [] getRawValue(@Positive int column) throws SQLException { checkClosed(); if (thisRow == null) { throw new PSQLException( GT.tr("ResultSet not positioned properly, perhaps you need to call next."), PSQLState.INVALID_CURSOR_STATE); } checkColumnIndex(column); byte[] bytes = thisRow.get(column - 1); wasNullFlag = bytes == null; return bytes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRawValue File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getRawValue
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public void removeAppStartingWindow(IBinder token) { synchronized (mWindowMap) { AppWindowToken wtoken = mTokenMap.get(token).appWindowToken; if (wtoken.startingWindow != null) { scheduleRemoveStartingWindowLocked(wtoken); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAppStartingWindow 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
removeAppStartingWindow
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public static boolean isBreaking(String tag) { return breakingTags.contains(tag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBreaking File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
isBreaking
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
String getLabel() { synchronized (mLock) { return mConfigurationLocked.label; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLabel 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
getLabel
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public JWT decode(String encodedJWT, Verifier... verifiers) { Objects.requireNonNull(encodedJWT); Objects.requireNonNull(verifiers); // An unsecured JWT will not contain a signature and should only have a header and a payload. String[] parts = getParts(encodedJWT); Header header = Mapper.deserialize(base64Decode(parts[0].getBytes(StandardCharsets.UTF_8)), Header.class); // Be particular about decoding an unsecured JWT. If the JWT is signed or any verifiers were provided don't do it. if (header.algorithm == Algorithm.none && parts.length == 2 && verifiers.length == 0) { return Mapper.deserialize(base64Decode(parts[1].getBytes(StandardCharsets.UTF_8)), JWT.class); } // If verifiers were provided, ensure it is able to verify this JWT. Verifier verifier = null; for (Verifier v : verifiers) { if (v.canVerify(header.algorithm)) { verifier = v; } } return decode(encodedJWT, header, parts, verifier); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2018-1000125 - Severity: HIGH - CVSS Score: 7.5 Description: Fixes Issue #2, bug exists that allows a JWT to be decoded even when no signature is provided. Function: decode File: src/main/java/org/primeframework/jwt/JWTDecoder.java Repository: FusionAuth/fusionauth-jwt Fixed Code: public JWT decode(String encodedJWT, Verifier... verifiers) { Objects.requireNonNull(encodedJWT); Objects.requireNonNull(verifiers); // An unsecured JWT will not contain a signature and should only have a header and a payload. String[] parts = getParts(encodedJWT); Header header = Mapper.deserialize(base64Decode(parts[0].getBytes(StandardCharsets.UTF_8)), Header.class); // If parts.length == 2 we have no signature, if no verifiers were provided, decode if header says 'none', else throw an exception if (parts.length == 2 && verifiers.length == 0) { if (header.algorithm == Algorithm.none) { return Mapper.deserialize(base64Decode(parts[1].getBytes(StandardCharsets.UTF_8)), JWT.class); } else { throw new InvalidJWTSignatureException(); } } // If verifiers were provided, ensure it is able to verify this JWT. Verifier verifier = null; for (Verifier v : verifiers) { if (v.canVerify(header.algorithm)) { verifier = v; } } return decode(encodedJWT, header, parts, verifier); }
[ "CWE-20" ]
CVE-2018-1000125
HIGH
7.5
FusionAuth/fusionauth-jwt
decode
src/main/java/org/primeframework/jwt/JWTDecoder.java
0d94dcef0133d699f21d217e922564adbb83a227
1
Analyze the following code function for security vulnerabilities
private static String[] splitItemsFormProperty(final String property ){ if (property != null && property.length() > 0) { return property.split(","); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: splitItemsFormProperty File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
splitItemsFormProperty
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
public HashMap getNamedDestination(boolean keepNames) { HashMap names = getNamedDestinationFromNames(keepNames); names.putAll(getNamedDestinationFromStrings()); return names; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNamedDestination File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
getNamedDestination
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
private ObjectStreamClass readEnumDesc() throws IOException, ClassNotFoundException { byte tc = nextTC(); switch (tc) { case TC_CLASSDESC: return readEnumDescInternal(); case TC_REFERENCE: return (ObjectStreamClass) readCyclicReference(); case TC_NULL: return null; default: throw corruptStream(tc); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readEnumDesc File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readEnumDesc
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public boolean enableFgsNotificationRateLimit(boolean enable) { enforceCallingPermission(permission.WRITE_DEVICE_CONFIG, "enableFgsNotificationRateLimit"); synchronized (this) { return mServices.enableFgsNotificationRateLimitLocked(enable); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableFgsNotificationRateLimit File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
enableFgsNotificationRateLimit
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
static void writeAttr(TypedXmlSerializer out, String name, long value) throws IOException { writeAttr(out, name, String.valueOf(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeAttr 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
writeAttr
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@NonNull @SystemApi @RequiresPermission(android.Manifest.permission.MANAGE_DEVICE_POLICY_APP_EXEMPTIONS) public Set<Integer> getApplicationExemptions(@NonNull String packageName) throws NameNotFoundException { throwIfParentInstance("getApplicationExemptions"); if (mService == null) { return Collections.emptySet(); } try { return intArrayToSet(mService.getApplicationExemptions(packageName)); } catch (ServiceSpecificException e) { switch (e.errorCode) { case ERROR_PACKAGE_NAME_NOT_FOUND: throw new NameNotFoundException(e.getMessage()); default: throw new RuntimeException( "Unknown error getting application exemptions: " + e.errorCode, e); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getApplicationExemptions 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
getApplicationExemptions
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void loadIconsAsync(List<Integer> missingIcons) { new AsyncTask<List<Integer>, Void, Void>() { @Override protected void onPostExecute(Void result) { updateUserList(); } @Override protected Void doInBackground(List<Integer>... values) { for (int userId : values[0]) { Bitmap bitmap = mUserManager.getUserIcon(userId); if (bitmap == null) { bitmap = Utils.getDefaultUserIconAsBitmap(userId); } mUserIcons.append(userId, bitmap); } return null; } }.execute(missingIcons); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadIconsAsync File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
loadIconsAsync
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
public final String getTokenServerEncodedUrl() { return tokenServerEncodedUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTokenServerEncodedUrl File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java Repository: googleapis/google-oauth-java-client The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-7692
MEDIUM
6.4
googleapis/google-oauth-java-client
getTokenServerEncodedUrl
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
13433cd7dd06267fc261f0b1d4764f8e3432c824
0
Analyze the following code function for security vulnerabilities
public boolean disableNetwork(int networkId, int uid, @NonNull String packageName) { if (mVerboseLoggingEnabled) { Log.v(TAG, "Disabling network " + networkId); } if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) { Log.e(TAG, "UID " + uid + " package " + packageName + " not visible to the current user"); return false; } WifiConfiguration config = getInternalConfiguredNetwork(networkId); if (config == null) { return false; } // Reset the "last selected" flag even if the app does not have permissions to modify this // network config. if (networkId == mLastSelectedNetworkId) { clearLastSelectedNetwork(); } if (!canModifyNetwork(config, uid, packageName)) { Log.e(TAG, "UID " + uid + " package " + packageName + " does not have permission to update configuration " + config.getProfileKey()); return false; } if (!updateNetworkSelectionStatus( networkId, NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER)) { return false; } saveToStore(true); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disableNetwork File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
disableNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public boolean isRecordingExist(String recordId) { List<String> publishList = getAllRecordingIds(publishedDir); List<String> unpublishList = getAllRecordingIds(unpublishedDir); if (publishList.contains(recordId) || unpublishList.contains(recordId)) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRecordingExist File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java Repository: bigbluebutton The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-12443
HIGH
7.5
bigbluebutton
isRecordingExist
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
b21ca8355a57286a1e6df96984b3a4c57679a463
0
Analyze the following code function for security vulnerabilities
@Override public List<V> put(K key, V value) { Jedis jedis = jedisPool.getResource(); jedis.set(getKey(key), valueSerializer.serialize(value)); jedis.close(); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-46990
CRITICAL
9.8
sanluan/PublicCMS
put
publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java
c7bf58bf07fdc60a71134c6a73a4947c7709abf7
0
Analyze the following code function for security vulnerabilities
public void write(final InputStream inputStream, final RASegmentOutputStream segmentOutputStream) { write(inputStream, segmentOutputStream, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: stroom-core-server/src/main/java/stroom/streamstore/server/fs/serializable/RawInputSegmentWriter.java Repository: gchq/stroom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
write
stroom-core-server/src/main/java/stroom/streamstore/server/fs/serializable/RawInputSegmentWriter.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
0
Analyze the following code function for security vulnerabilities
private static native int nativeMigrateToBoost();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeMigrateToBoost 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
nativeMigrateToBoost
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
private void setCarrierCustomizedConfigToUi() { if (TextUtils.isEmpty(mApnType.getText()) && !ArrayUtils.isEmpty(mDefaultApnTypes)) { String value = getEditableApnType(mDefaultApnTypes); mApnType.setText(value); mApnType.setSummary(value); } String protocol = protocolDescription(mDefaultApnProtocol, mProtocol); if (TextUtils.isEmpty(mProtocol.getValue()) && !TextUtils.isEmpty(protocol)) { mProtocol.setValue(mDefaultApnProtocol); mProtocol.setSummary(protocol); } String roamingProtocol = protocolDescription(mDefaultApnRoamingProtocol, mRoamingProtocol); if (TextUtils.isEmpty(mRoamingProtocol.getValue()) && !TextUtils.isEmpty(roamingProtocol)) { mRoamingProtocol.setValue(mDefaultApnRoamingProtocol); mRoamingProtocol.setSummary(roamingProtocol); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCarrierCustomizedConfigToUi File: src/com/android/settings/network/apn/ApnEditor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40125
HIGH
7.8
android
setCarrierCustomizedConfigToUi
src/com/android/settings/network/apn/ApnEditor.java
63d464c3fa5c7b9900448fef3844790756e557eb
0
Analyze the following code function for security vulnerabilities
public String getSelection() { return mWhereClause.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSelection File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
getSelection
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
protected int engineGetKeySize( Key key) { if (key instanceof RSAPrivateKey) { RSAPrivateKey k = (RSAPrivateKey)key; return k.getModulus().bitLength(); } else if (key instanceof RSAPublicKey) { RSAPublicKey k = (RSAPublicKey)key; return k.getModulus().bitLength(); } throw new IllegalArgumentException("not an RSA key!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineGetKeySize File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineGetKeySize
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
@Override public void enableScreenAfterBoot(boolean booted) { writeBootProgressEnableScreen(SystemClock.uptimeMillis()); mWindowManager.enableScreenAfterBoot(); synchronized (mGlobalLock) { updateEventDispatchingLocked(booted); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableScreenAfterBoot 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
enableScreenAfterBoot
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private void checkAssessmentItem(Path outputFile) { QTI21Service qtiService = CoreSpringFactory.getImpl(QTI21Service.class); QtiXmlReader qtiXmlReader = new QtiXmlReader(qtiService.jqtiExtensionManager()); ResourceLocator fileResourceLocator = new FileResourceLocator(); ResourceLocator inputResourceLocator = ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator); URI assessmentObjectSystemId = outputFile.toFile().toURI(); AssessmentObjectXmlLoader assessmentObjectXmlLoader = new AssessmentObjectXmlLoader(qtiXmlReader, inputResourceLocator); ResolvedAssessmentItem resolvedAssessmentItem = assessmentObjectXmlLoader.loadAndResolveAssessmentItem(assessmentObjectSystemId); AssessmentItem assessmentItem = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful(); if(!AssessmentItemChecker.checkAndCorrect(assessmentItem)) { try(FileOutputStream out = new FileOutputStream(outputFile.toFile())) { qtiService.qtiSerializer().serializeJqtiObject(assessmentItem, out); } catch(Exception e) { log.error("", e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkAssessmentItem File: src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
checkAssessmentItem
src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
public Builder addRefreshListener(CredentialRefreshListener refreshListener) { refreshListeners.add(Preconditions.checkNotNull(refreshListener)); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addRefreshListener File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java Repository: googleapis/google-oauth-java-client The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-7692
MEDIUM
6.4
googleapis/google-oauth-java-client
addRefreshListener
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
13433cd7dd06267fc261f0b1d4764f8e3432c824
0
Analyze the following code function for security vulnerabilities
public Object currentObject() { return types.size() == 1 ? root : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: currentObject 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
currentObject
xstream/src/java/com/thoughtworks/xstream/core/TreeUnmarshaller.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public void init(final AbstractSecuredPage page) { getMenu(); this.favoritesMenu = FavoritesMenu.get(); final WebMarkupContainer goMobile = new WebMarkupContainer("goMobile"); add(goMobile); if (page.getMySession().isMobileUserAgent() == true) { goMobile.add(new BookmarkablePageLink<Void>("link", MenuMobilePage.class)); } else { goMobile.setVisible(false); } final BookmarkablePageLink<Void> layoutSettingsMenuLink = new BookmarkablePageLink<Void>("layoutSettingsMenuLink", LayoutSettingsPage.class); if (UserRights.getAccessChecker().isRestrictedUser() == true) { // Not visibible for restricted users: layoutSettingsMenuLink.setVisible(false); } add(new MenuConfig("menuconfig", getMenu(), favoritesMenu)); @SuppressWarnings("serial") final Form<String> searchForm = new Form<String>("searchForm") { private String searchString; /** * @see org.apache.wicket.markup.html.form.Form#onSubmit() */ @Override protected void onSubmit() { if (StringUtils.isNotBlank(searchString) == true) { final SearchPage searchPage = new SearchPage(new PageParameters(), searchString); setResponsePage(searchPage); } super.onSubmit(); } }; add(searchForm); final TextField<String> searchField = new TextField<String>("searchField", new PropertyModel<String>(searchForm, "searchString")); WicketUtils.setPlaceHolderAttribute(searchField, getString("search.search")); searchForm.add(searchField); add(layoutSettingsMenuLink); add(new BookmarkablePageLink<Void>("feedbackLink", FeedbackPage.class)); { @SuppressWarnings("serial") final AjaxLink<Void> showBookmarkLink = new AjaxLink<Void>("showBookmarkLink") { /** * @see org.apache.wicket.ajax.markup.html.AjaxLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget) */ @Override public void onClick(final AjaxRequestTarget target) { bookmarkDialog.open(target); // Redraw the content: bookmarkDialog.redraw().addContent(target); } }; add(showBookmarkLink); addBookmarkDialog(); } { add(new Label("user", PFUserContext.getUser().getFullname())); if (accessChecker.isRestrictedUser() == true) { // Show ChangePaswordPage as my account for restricted users. final BookmarkablePageLink<Void> changePasswordLink = new BookmarkablePageLink<Void>("myAccountLink", ChangePasswordPage.class); add(changePasswordLink); } else { final BookmarkablePageLink<Void> myAccountLink = new BookmarkablePageLink<Void>("myAccountLink", MyAccountEditPage.class); add(myAccountLink); } final BookmarkablePageLink<Void> documentationLink = new BookmarkablePageLink<Void>("documentationLink", DocumentationPage.class); add(documentationLink); @SuppressWarnings("serial") final Link<String> logoutLink = new Link<String>("logoutLink") { @Override public void onClick() { LoginPage.logout((MySession) getSession(), (WebRequest) getRequest(), (WebResponse) getResponse(), userXmlPreferencesCache); setResponsePage(LoginPage.class); }; }; add(logoutLink); } addCompleteMenu(); addFavoriteMenu(); }
Vulnerability Classification: - CWE: CWE-352 - CVE: CVE-2013-7251 - Severity: MEDIUM - CVSS Score: 6.8 Description: CSRF protection. Function: init File: src/main/java/org/projectforge/web/core/NavTopPanel.java Repository: micromata/projectforge-webapp Fixed Code: public void init(final AbstractSecuredPage page) { getMenu(); this.favoritesMenu = FavoritesMenu.get(); final WebMarkupContainer goMobile = new WebMarkupContainer("goMobile"); add(goMobile); if (page.getMySession().isMobileUserAgent() == true) { goMobile.add(new BookmarkablePageLink<Void>("link", MenuMobilePage.class)); } else { goMobile.setVisible(false); } final BookmarkablePageLink<Void> layoutSettingsMenuLink = new BookmarkablePageLink<Void>("layoutSettingsMenuLink", LayoutSettingsPage.class); if (UserRights.getAccessChecker().isRestrictedUser() == true) { // Not visibible for restricted users: layoutSettingsMenuLink.setVisible(false); } add(new MenuConfig("menuconfig", getMenu(), favoritesMenu)); @SuppressWarnings("serial") final Form<String> searchForm = new Form<String>("searchForm") { private String searchString; /** * @see org.apache.wicket.markup.html.form.Form#onSubmit() */ @Override protected void onSubmit() { csrfTokenHandler.onSubmit(); if (StringUtils.isNotBlank(searchString) == true) { final SearchPage searchPage = new SearchPage(new PageParameters(), searchString); setResponsePage(searchPage); } super.onSubmit(); } }; csrfTokenHandler = new CsrfTokenHandler(searchForm); add(searchForm); final TextField<String> searchField = new TextField<String>("searchField", new PropertyModel<String>(searchForm, "searchString")); WicketUtils.setPlaceHolderAttribute(searchField, getString("search.search")); searchForm.add(searchField); add(layoutSettingsMenuLink); add(new BookmarkablePageLink<Void>("feedbackLink", FeedbackPage.class)); { @SuppressWarnings("serial") final AjaxLink<Void> showBookmarkLink = new AjaxLink<Void>("showBookmarkLink") { /** * @see org.apache.wicket.ajax.markup.html.AjaxLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget) */ @Override public void onClick(final AjaxRequestTarget target) { bookmarkDialog.open(target); // Redraw the content: bookmarkDialog.redraw().addContent(target); } }; add(showBookmarkLink); addBookmarkDialog(); } { add(new Label("user", PFUserContext.getUser().getFullname())); if (accessChecker.isRestrictedUser() == true) { // Show ChangePaswordPage as my account for restricted users. final BookmarkablePageLink<Void> changePasswordLink = new BookmarkablePageLink<Void>("myAccountLink", ChangePasswordPage.class); add(changePasswordLink); } else { final BookmarkablePageLink<Void> myAccountLink = new BookmarkablePageLink<Void>("myAccountLink", MyAccountEditPage.class); add(myAccountLink); } final BookmarkablePageLink<Void> documentationLink = new BookmarkablePageLink<Void>("documentationLink", DocumentationPage.class); add(documentationLink); @SuppressWarnings("serial") final Link<String> logoutLink = new Link<String>("logoutLink") { @Override public void onClick() { LoginPage.logout((MySession) getSession(), (WebRequest) getRequest(), (WebResponse) getResponse(), userXmlPreferencesCache); setResponsePage(LoginPage.class); }; }; add(logoutLink); } addCompleteMenu(); addFavoriteMenu(); }
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
init
src/main/java/org/projectforge/web/core/NavTopPanel.java
422de35e3c3141e418a73bfb39b430d5fd74077e
1
Analyze the following code function for security vulnerabilities
public static void addFolderToZipAPKTool(String path, String srcFolder, ZipOutputStream zip) throws Exception { File folder = new File(srcFolder); for (String fileName : Objects.requireNonNull(folder.list())) { if (path.isEmpty()) { addFileToZipAPKTool(folder.getName(), srcFolder + "/" + fileName, zip); } else { addFileToZipAPKTool(path + "/" + folder.getName(), srcFolder + "/" + fileName, zip); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addFolderToZipAPKTool 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
addFolderToZipAPKTool
src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
1ec02658fe6858162f5e6a24f97928de6696c5cb
0
Analyze the following code function for security vulnerabilities
private static boolean saveStream(InputStream stream, URL url, File rawDataDir, final Progress progress, final SavingUpdate update, ObjectNode fileRecord, ArrayNode fileRecords, long length) throws IOException, Exception { String localname = url.getPath(); if (localname.isEmpty() || localname.endsWith("/")) { localname = localname + "temp"; } File file = allocateFile(rawDataDir, localname); JSONUtilities.safePut(fileRecord, "fileName", file.getName()); JSONUtilities.safePut(fileRecord, "location", getRelativePath(file, rawDataDir)); update.totalExpectedSize += length; progress.setProgress("Downloading " + url.toString(), calculateProgressPercent(update.totalExpectedSize, update.totalRetrievedSize)); long actualLength = saveStreamToFile(stream, file, update); JSONUtilities.safePut(fileRecord, "size", actualLength); if (actualLength == 0) { throw new Exception("No content found in " + url.toString()); } else if (length >= 0) { update.totalExpectedSize += (actualLength - length); } else { update.totalExpectedSize += actualLength; } progress.setProgress("Saving " + url.toString() + " locally", calculateProgressPercent(update.totalExpectedSize, update.totalRetrievedSize)); return postProcessRetrievedFile(rawDataDir, file, fileRecord, fileRecords, progress); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveStream File: main/src/com/google/refine/importing/ImportingUtilities.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-19859
MEDIUM
4
OpenRefine
saveStream
main/src/com/google/refine/importing/ImportingUtilities.java
e243e73e4064de87a913946bd320fbbe246da656
0
Analyze the following code function for security vulnerabilities
@Override public boolean isRenderAll() { assertNotReleased(); if (renderAll == null) { String render = PARTIAL_RENDER_PARAM.getValue(ctx); renderAll = (ALL_PARTIAL_PHASE_CLIENT_IDS.equals(render)); } return renderAll; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRenderAll File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-17091
MEDIUM
4.3
eclipse-ee4j/mojarra
isRenderAll
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
0
Analyze the following code function for security vulnerabilities
int enforceDumpPermissionForPackage(String packageName, int userId, int callingUid, String function) { final long identity = Binder.clearCallingIdentity(); int uid = INVALID_UID; try { uid = mPackageManagerInt.getPackageUid(packageName, MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, userId); } finally { Binder.restoreCallingIdentity(identity); } // If the uid is Process.INVALID_UID, the below 'if' check will be always true if (UserHandle.getAppId(uid) != UserHandle.getAppId(callingUid)) { // Requires the DUMP permission if the target package doesn't belong // to the caller or it doesn't exist. enforceCallingPermission(android.Manifest.permission.DUMP, function); } return uid; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceDumpPermissionForPackage File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
enforceDumpPermissionForPackage
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void reload() throws IOException, InterruptedException, ReactorException { executeReactor(null, loadTasks()); User.reload(); servletContext.setAttribute("app", this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reload File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
reload
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private void revokeUriPermissionLocked(int callingUid, GrantUri grantUri, final int modeFlags) { if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "Revoking all granted permissions to " + grantUri); final IPackageManager pm = AppGlobals.getPackageManager(); final String authority = grantUri.uri.getAuthority(); final ProviderInfo pi = getProviderInfoLocked(authority, grantUri.sourceUserId, MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE); if (pi == null) { Slog.w(TAG, "No content provider found for permission revoke: " + grantUri.toSafeString()); return; } // Does the caller have this permission on the URI? if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) { // If they don't have direct access to the URI, then revoke any // ownerless URI permissions that have been granted to them. final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(callingUid); if (perms != null) { boolean persistChanged = false; for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) { final UriPermission perm = it.next(); if (perm.uri.sourceUserId == grantUri.sourceUserId && perm.uri.uri.isPathPrefixMatch(grantUri.uri)) { if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "Revoking non-owned " + perm.targetUid + " permission to " + perm.uri); persistChanged |= perm.revokeModes( modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, false); if (perm.modeFlags == 0) { it.remove(); } } } if (perms.isEmpty()) { mGrantedUriPermissions.remove(callingUid); } if (persistChanged) { schedulePersistUriGrants(); } } return; } boolean persistChanged = false; // Go through all of the permissions and remove any that match. 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); for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) { final UriPermission perm = it.next(); if (perm.uri.sourceUserId == grantUri.sourceUserId && perm.uri.uri.isPathPrefixMatch(grantUri.uri)) { if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "Revoking " + perm.targetUid + " permission to " + perm.uri); persistChanged |= perm.revokeModes( modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, true); 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: revokeUriPermissionLocked 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
revokeUriPermissionLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public boolean clearNetworkCandidateScanResult(int networkId) { if (mVerboseLoggingEnabled) { Log.v(TAG, "Clear network candidate scan result for " + networkId); } WifiConfiguration config = getInternalConfiguredNetwork(networkId); if (config == null) { return false; } config.getNetworkSelectionStatus().setCandidate(null); config.getNetworkSelectionStatus().setCandidateScore(Integer.MIN_VALUE); config.getNetworkSelectionStatus().setSeenInLastQualifiedNetworkSelection(false); config.getNetworkSelectionStatus().setCandidateSecurityParams(null); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearNetworkCandidateScanResult File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
clearNetworkCandidateScanResult
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public int getRequestedMinimumPasswordLength(int userId) { return getDevicePolicyManager().getPasswordMinimumLength(null, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestedMinimumPasswordLength 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
getRequestedMinimumPasswordLength
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private int jjMoveStringLiteralDfa4_1(long old0, long active0) { if (((active0 &= old0)) == 0L) return jjStartNfa_1(2, old0); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_1(3, active0); return 4; } switch(curChar) { case 97: return jjMoveStringLiteralDfa5_1(active0, 0x400000000000L); case 101: if ((active0 & 0x20000L) != 0L) return jjStartNfaWithStates_1(4, 17, 6); break; case 121: if ((active0 & 0x200000000000L) != 0L) return jjStartNfaWithStates_1(4, 45, 6); break; default : break; } return jjStartNfa_1(3, active0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jjMoveStringLiteralDfa4_1 File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java Repository: jakartaee/expression-language The code follows secure coding practices.
[ "CWE-917" ]
CVE-2021-28170
MEDIUM
5
jakartaee/expression-language
jjMoveStringLiteralDfa4_1
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
b6a3943ac5fba71cbc6719f092e319caa747855b
0
Analyze the following code function for security vulnerabilities
@Override public void reboot(ComponentName admin) { Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_REBOOT); mInjector.binderWithCleanCallingIdentity(() -> { // Make sure there are no ongoing calls on the device. if (mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE) { throw new IllegalStateException("Cannot be called with ongoing call on the device"); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.REBOOT) .setAdmin(admin) .write(); mInjector.powerManagerReboot(PowerManager.REBOOT_REQUESTED_BY_DEVICE_OWNER); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reboot 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
reboot
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private Properties getXMLFormattingProperties(final Properties properties) { Properties filteredProperties = new Properties(); properties.entrySet().stream().filter( entry -> SUPPORTED_XML_FORMAT_PREFS.contains(entry.getKey())).forEach(entry -> filteredProperties.put(entry.getKey(), entry.getValue())); return filteredProperties; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXMLFormattingProperties File: _ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java Repository: diffplug/spotless The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-9843
MEDIUM
5.1
diffplug/spotless
getXMLFormattingProperties
_ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java
b23ee9ef5ba4b65e7bd0e341c76ed197c06ee83d
0
Analyze the following code function for security vulnerabilities
private void deleteApplicationRole(String applicationName) { try { ApplicationMgtUtil.deleteAppRole(applicationName); } catch (IdentityApplicationManagementException e) { log.error("Failed to delete the application role for: " + applicationName, e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteApplicationRole File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
deleteApplicationRole
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
public DetailsGenerator getDetailsGenerator() { return detailComponentManager.getDetailsGenerator(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDetailsGenerator 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
getDetailsGenerator
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
void setLastReportedConfiguration(@NonNull MergedConfiguration config) { setLastReportedConfiguration(config.getGlobalConfiguration(), config.getOverrideConfiguration()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLastReportedConfiguration 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
setLastReportedConfiguration
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void setPhonyDocument(DocumentReference reference, XWikiContext context) { XWikiDocument doc = new XWikiDocument(reference); doc.setElements(XWikiDocument.HAS_ATTACHMENTS | XWikiDocument.HAS_OBJECTS); doc.setStore(getStore()); context.put("doc", doc); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPhonyDocument 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
setPhonyDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0