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
@Deprecated @SystemApi @RequiresPermission(MANAGE_DEVICE_ADMINS) public boolean setActiveProfileOwner(@NonNull ComponentName admin, @Deprecated String ownerName) throws IllegalArgumentException { throwIfParentInstance("setActiveProfileOwner"); if (mService != null) { try { final int myUserId = myUserId(); mService.setActiveAdmin(admin, false, myUserId); return mService.setProfileOwner(admin, myUserId); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setActiveProfileOwner 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
setActiveProfileOwner
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public <T> List<T> singletonList(T t) { return Collections.singletonList(t); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: singletonList File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
singletonList
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public void manageTenant(String tenant, String state) { StopWatch stopWatch = StopWatch.createStarted(); log.info("START - SETUP:ManageTenant: tenantKey: {}, state: {}", tenant, state); try { tenantListRepository.updateTenant(tenant.toLowerCase(), state.toUpperCase()); log.info("STOP - SETUP:ManageTenant: tenantKey: {}, state: {}, result: OK, time = {} ms", tenant, state, stopWatch.getTime()); } catch (Exception e) { log.info("STOP - SETUP:ManageTenant: tenantKey: {}, state: {}, result: FAIL, error: {}, time = {} ms", tenant, state, e.getMessage(), stopWatch.getTime()); throw e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: manageTenant File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java Repository: xm-online/xm-uaa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15557
HIGH
7.5
xm-online/xm-uaa
manageTenant
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
bd235434f119c67090952e08fc28abe41aea2e2c
0
Analyze the following code function for security vulnerabilities
@Override public void addMediaCompletionHandler(Runnable onComplete) { addCompletionHandler(onComplete); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addMediaCompletionHandler 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
addMediaCompletionHandler
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public int getIoRatio() { return getIntProperty(IO_RATIO, 50); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIoRatio File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getIoRatio
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Override public void playFromUri(String packageName, Uri uri, Bundle extras) { mSessionCb.playFromUri(packageName, Binder.getCallingPid(), Binder.getCallingUid(), uri, extras); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: playFromUri File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
playFromUri
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
private void checkInsertPermissions(ContentValues values) { if (getContext().checkCallingOrSelfPermission(Downloads.Impl.PERMISSION_ACCESS) == PackageManager.PERMISSION_GRANTED) { return; } getContext().enforceCallingOrSelfPermission(android.Manifest.permission.INTERNET, "INTERNET permission is required to use the download manager"); // ensure the request fits within the bounds of a public API request // first copy so we can remove values values = new ContentValues(values); // check columns whose values are restricted enforceAllowedValues(values, Downloads.Impl.COLUMN_IS_PUBLIC_API, Boolean.TRUE); // validate the destination column if (values.getAsInteger(Downloads.Impl.COLUMN_DESTINATION) == Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD) { /* this row is inserted by * DownloadManager.addCompletedDownload(String, String, String, * boolean, String, String, long) */ values.remove(Downloads.Impl.COLUMN_TOTAL_BYTES); values.remove(Downloads.Impl._DATA); values.remove(Downloads.Impl.COLUMN_STATUS); } enforceAllowedValues(values, Downloads.Impl.COLUMN_DESTINATION, Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE, Downloads.Impl.DESTINATION_FILE_URI, Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD); if (getContext().checkCallingOrSelfPermission(Downloads.Impl.PERMISSION_NO_NOTIFICATION) == PackageManager.PERMISSION_GRANTED) { enforceAllowedValues(values, Downloads.Impl.COLUMN_VISIBILITY, Request.VISIBILITY_HIDDEN, Request.VISIBILITY_VISIBLE, Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED, Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION); } else { enforceAllowedValues(values, Downloads.Impl.COLUMN_VISIBILITY, Request.VISIBILITY_VISIBLE, Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED, Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION); } // remove the rest of the columns that are allowed (with any value) values.remove(Downloads.Impl.COLUMN_URI); values.remove(Downloads.Impl.COLUMN_TITLE); values.remove(Downloads.Impl.COLUMN_DESCRIPTION); values.remove(Downloads.Impl.COLUMN_MIME_TYPE); values.remove(Downloads.Impl.COLUMN_FILE_NAME_HINT); // checked later in insert() values.remove(Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE); // checked later in insert() values.remove(Downloads.Impl.COLUMN_ALLOWED_NETWORK_TYPES); values.remove(Downloads.Impl.COLUMN_ALLOW_ROAMING); values.remove(Downloads.Impl.COLUMN_ALLOW_METERED); values.remove(Downloads.Impl.COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI); values.remove(Downloads.Impl.COLUMN_MEDIA_SCANNED); values.remove(Downloads.Impl.COLUMN_ALLOW_WRITE); Iterator<Map.Entry<String, Object>> iterator = values.valueSet().iterator(); while (iterator.hasNext()) { String key = iterator.next().getKey(); if (key.startsWith(Downloads.Impl.RequestHeaders.INSERT_KEY_PREFIX)) { iterator.remove(); } } // any extra columns are extraneous and disallowed if (values.size() > 0) { StringBuilder error = new StringBuilder("Invalid columns in request: "); boolean first = true; for (Map.Entry<String, Object> entry : values.valueSet()) { if (!first) { error.append(", "); } error.append(entry.getKey()); } throw new SecurityException(error.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkInsertPermissions 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
checkInsertPermissions
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public boolean isEnabled() { return enabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEnabled File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-18213
MEDIUM
6.5
eclipse/lemminx
isEnabled
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java
c8bf3245a72cace50ee2aae5eee69538c58ce056
0
Analyze the following code function for security vulnerabilities
public static void jsFunction_cleanUpApplicationRegistration(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException, ParseException { if (args != null && args.length != 0) { try { String applicationName = (String) args[0]; String keyType = (String) args[1]; String groupingId = (String) args[2]; String username = (String) args[3]; getAPIConsumer(thisObj).cleanUpApplicationRegistration(applicationName, keyType, groupingId, username); } catch (Exception e) { handleException("Error while obtaining the application access token for the application" + e .getMessage(), e); } } else { handleException("Invalid input parameters."); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_cleanUpApplicationRegistration File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_cleanUpApplicationRegistration
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
public void rollbackTx(AsyncResult<SQLConnection> conn, Handler<AsyncResult<Void>> done) { SQLConnection sqlConnection = conn.result(); sqlConnection.rollback(res -> { sqlConnection.close(); if (res.failed()) { log.error(res.cause().getMessage(), res.cause()); done.handle(Future.failedFuture(res.cause())); } else { done.handle(Future.succeededFuture()); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rollbackTx File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
rollbackTx
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void onUserStarted(int userId) { synchronized (mLock) { ensureGroupStateLoadedLocked(userId); final int N = mProviders.size(); for (int i = 0; i < N; i++) { Provider provider = mProviders.get(i); // Send broadcast only to the providers of the user. if (provider.getUserId() != userId) { continue; } if (provider.widgets.size() > 0) { sendEnableIntentLocked(provider); int[] appWidgetIds = getWidgetIds(provider.widgets); sendUpdateIntentLocked(provider, appWidgetIds); registerForBroadcastsLocked(provider, appWidgetIds); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUserStarted File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
onUserStarted
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Override public void writeBytes(byte[] value) throws JMSException { writePrimitive(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeBytes File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
writeBytes
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "PSB.DozeServiceHost[mCallbacks=" + mCallbacks.size() + "]"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
toString
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public String getLine1Number(PhoneAccountHandle accountHandle, String callingPackage, String callingFeatureId) { try { Log.startSession("getL1N"); if (!canReadPhoneNumbers(callingPackage, callingFeatureId, "getLine1Number")) { return null; } final UserHandle callingUserHandle = Binder.getCallingUserHandle(); if (!isPhoneAccountHandleVisibleToCallingUser(accountHandle, callingUserHandle)) { Log.d(this, "%s is not visible for the calling user [gL1N]", accountHandle); return null; } long token = Binder.clearCallingIdentity(); try { int subId; synchronized (mLock) { subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount( accountHandle); } return getTelephonyManager(subId).getLine1Number(); } catch (Exception e) { Log.e(this, e, "getSubscriptionIdForPhoneAccount"); throw e; } finally { Binder.restoreCallingIdentity(token); } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLine1Number File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
getLine1Number
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public void setName(String name) { this.name = name; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setName File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setName
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
Resources getResources() { return mContext.getResources(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResources 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
getResources
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private void validateSPTemplateExists(SpTemplate spTemplate, String tenantDomain) throws IdentityApplicationManagementException { List<String> validationMsg = new ArrayList<>(); if (StringUtils.isNotBlank(spTemplate.getName()) && isExistingApplicationTemplate(spTemplate.getName(), tenantDomain)) { validationMsg.add(String.format("Template with name: %s is already configured for tenant: %s.", spTemplate.getName(), tenantDomain)); throw new IdentityApplicationManagementValidationException(validationMsg.toArray(new String[0])); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateSPTemplateExists 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
validateSPTemplateExists
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 void registerAttributionSource(@NonNull AttributionSource source) { // Here we keep track of attribution sources that were created by an app // from an attribution chain that called into the app and the apps's // own attribution source. An app can register an attribution chain up // to itself inclusive if and only if it is adding a node for itself which // optionally points to an attribution chain that was created by each // preceding app recursively up to the beginning of the chain. // The only special case is when the first app in the attribution chain // creates a source that points to another app (not a chain of apps). We // allow this even if the source the app points to is not registered since // in app ops we allow every app to blame every other app (untrusted if not // holding a special permission). // This technique ensures that a bad actor in the middle of the attribution // chain can neither prepend nor append an invalid attribution sequence, i.e. // a sequence that is not constructed by trusted sources up to the that bad // actor's app. // Note that passing your attribution source to another app means you allow // it to blame private data access on your app. This can be mediated by the OS // in, which case security is already enforced; by other app's code running in // your process calling into the other app, in which case it can already access // the private data in your process; or by you explicitly calling to another // app passing the source, in which case you must trust the other side; final int callingUid = Binder.getCallingUid(); if (source.getUid() != callingUid && mContext.checkPermission( Manifest.permission.UPDATE_APP_OPS_STATS, /*pid*/ -1, callingUid) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Cannot register attribution source for uid:" + source.getUid() + " from uid:" + callingUid); } final PackageManagerInternal packageManagerInternal = LocalServices.getService( PackageManagerInternal.class); // TODO(b/234653108): Clean up this UID/package & cross-user check. // If calling from the system process, allow registering attribution for package from // any user int userId = UserHandle.getUserId((callingUid == Process.SYSTEM_UID ? source.getUid() : callingUid)); if (packageManagerInternal.getPackageUid(source.getPackageName(), 0, userId) != source.getUid()) { throw new SecurityException("Cannot register attribution source for package:" + source.getPackageName() + " from uid:" + callingUid); } final AttributionSource next = source.getNext(); if (next != null && next.getNext() != null && !isRegisteredAttributionSource(next)) { throw new SecurityException("Cannot register forged attribution source:" + source); } synchronized (mLock) { mAttributions.put(source.getToken(), source); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerAttributionSource File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
registerAttributionSource
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
@Override protected InputSource getInputSource(final InputSource inputSource) throws IOException { return inputSource; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000651 - Severity: HIGH - CVSS Score: 7.5 Description: gh-813 Turn on secure processing feature for XML parsers etc Function: getInputSource File: stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java Repository: gchq/stroom Fixed Code: @Override protected InputSource getInputSource(final InputSource inputSource) { return inputSource; }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
getInputSource
stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
@VisibleForTesting ShortcutRequestPinProcessor getShortcutRequestPinProcessorForTest() { return mShortcutRequestPinProcessor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShortcutRequestPinProcessorForTest 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
getShortcutRequestPinProcessorForTest
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public static int maxLengthSequence(String string) { if (string.length() == 0) return 0; char previousChar = string.charAt(0); int category = categoryChar(previousChar); //current category of the sequence int diff = 0; //difference between two consecutive characters boolean hasDiff = false; //if we are currently targeting a sequence int maxLength = 0; //maximum length of a sequence already found int startSequence = 0; //where the current sequence started for (int current = 1; current < string.length(); current++) { char currentChar = string.charAt(current); int categoryCurrent = categoryChar(currentChar); int currentDiff = (int) currentChar - (int) previousChar; if (categoryCurrent != category || Math.abs(currentDiff) > maxDiffCategory(category)) { maxLength = Math.max(maxLength, current - startSequence); startSequence = current; hasDiff = false; category = categoryCurrent; } else { if(hasDiff && currentDiff != diff) { maxLength = Math.max(maxLength, current - startSequence); startSequence = current - 1; } diff = currentDiff; hasDiff = true; } previousChar = currentChar; } maxLength = Math.max(maxLength, string.length() - startSequence); return maxLength; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: maxLengthSequence 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
maxLengthSequence
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
protected void _serializeObjectId(Object bean, JsonGenerator g, SerializerProvider provider, TypeSerializer typeSer, WritableObjectId objectId) throws IOException { final ObjectIdWriter w = _objectIdWriter; WritableTypeId typeIdDef = _typeIdDef(typeSer, bean, JsonToken.START_OBJECT); typeSer.writeTypePrefix(g, typeIdDef); objectId.writeAsField(g, provider, w); if (_propertyFilterId != null) { serializeFieldsFiltered(bean, g, provider); } else { serializeFields(bean, g, provider); } typeSer.writeTypeSuffix(g, typeIdDef); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _serializeObjectId File: src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
_serializeObjectId
src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
void settingsGlobalPutInt(String name, int value) { Settings.Global.putInt(mContext.getContentResolver(), name, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: settingsGlobalPutInt 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
settingsGlobalPutInt
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public void endWikiDocumentLocale(Locale locale, FilterEventParameters parameters) throws FilterException { end(parameters); // Reset this.currentLocale = null; this.currentLocaleParameters = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endWikiDocumentLocale File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
endWikiDocumentLocale
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
public JSONObject getJSONObject(int index) throws JSONException { Object o = get(index); if (o instanceof JSONObject) { return (JSONObject)o; } throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJSONObject File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getJSONObject
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public static boolean isValidOperationSafetyReason(@OperationSafetyReason int reason) { return reason == OPERATION_SAFETY_REASON_DRIVING_DISTRACTION; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isValidOperationSafetyReason 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
isValidOperationSafetyReason
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private <V, P> Column<T, V> createColumn(ValueProvider<T, V> valueProvider, ValueProvider<V, P> presentationProvider, AbstractRenderer<? super T, ? super P> renderer, Column.NestedNullBehavior nestedNullBehavior) { return new Column<>(valueProvider, presentationProvider, renderer, nestedNullBehavior); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createColumn 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
createColumn
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private static Throwable unsafeUnavailabilityCause0() { if (isAndroid()) { logger.debug("sun.misc.Unsafe: unavailable (Android)"); return new UnsupportedOperationException("sun.misc.Unsafe: unavailable (Android)"); } if (isIkvmDotNet()) { logger.debug("sun.misc.Unsafe: unavailable (IKVM.NET)"); return new UnsupportedOperationException("sun.misc.Unsafe: unavailable (IKVM.NET)"); } Throwable cause = PlatformDependent0.getUnsafeUnavailabilityCause(); if (cause != null) { return cause; } try { boolean hasUnsafe = PlatformDependent0.hasUnsafe(); logger.debug("sun.misc.Unsafe: {}", hasUnsafe ? "available" : "unavailable"); return hasUnsafe ? null : PlatformDependent0.getUnsafeUnavailabilityCause(); } catch (Throwable t) { logger.trace("Could not determine if Unsafe is available", t); // Probably failed to initialize PlatformDependent0. return new UnsupportedOperationException("Could not determine if Unsafe is available", t); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unsafeUnavailabilityCause0 File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
unsafeUnavailabilityCause0
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public RowStyleGenerator getRowStyleGenerator() { return rowStyleGenerator; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRowStyleGenerator 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
getRowStyleGenerator
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setSynchronousMode(@NonNull String syncMode) { Preconditions.checkNotNull(syncMode); mSyncMode = syncMode; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSynchronousMode 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
setSynchronousMode
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
private boolean isWhiteSpace(CharSequence sender) { if (TextUtils.isEmpty(sender)) { return true; } if (sender.toString().matches("^\\s*$")) { return true; } // Let's check if we only have 0 whitespace chars. Some apps did this as a workaround // For the presentation that we had. for (int i = 0; i < sender.length(); i++) { char c = sender.charAt(i); if (c != '\u200B') { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWhiteSpace File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
isWhiteSpace
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@PUT @Path("survey") @Operation(summary = "Attaches an survey building block", description = "Attaches an survey building block") @ApiResponse(responseCode = "200", description = "The course node metadatas", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)), @Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) }) @ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient") @ApiResponse(responseCode = "404", description = "The course or parentNode not found") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response attachSurvey(@PathParam("courseId") Long courseId, @QueryParam("parentNodeId") String parentNodeId, @QueryParam("position") Integer position, @QueryParam("shortTitle") @DefaultValue("undefined") String shortTitle, @QueryParam("longTitle") @DefaultValue("undefined") String longTitle, @QueryParam("objectives") @DefaultValue("undefined") String objectives, @QueryParam("visibilityExpertRules") String visibilityExpertRules, @QueryParam("accessExpertRules") String accessExpertRules, @QueryParam("surveyResourceableId") Long surveyResourceableId, @Context HttpServletRequest request) { RepositoryManager rm = RepositoryManager.getInstance(); RepositoryEntry surveyRepoEntry = rm.lookupRepositoryEntry(surveyResourceableId); if(surveyRepoEntry == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } CustomConfigDelegate config = CustomConfigFactory.getSurveyCustomConfig(surveyRepoEntry); return attach(courseId, parentNodeId, "iqsurv", position, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachSurvey File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
attachSurvey
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
protected boolean deselect(final Collection<?> itemIds, boolean refresh) { if (itemIds == null) { throw new IllegalArgumentException("itemIds may not be null"); } final boolean hasCommonElements = !Collections.disjoint(itemIds, selection); if (hasCommonElements) { final HashSet<Object> oldSelection = new HashSet<Object>( selection); selection.removeAll(itemIds); fireSelectionEvent(oldSelection, selection); } updateAllSelectedState(); if (refresh) { for (Object itemId : itemIds) { refreshRow(itemId); } } return hasCommonElements; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deselect 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
deselect
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting void clearSizeCompatMode() { final float lastSizeCompatScale = mSizeCompatScale; mInSizeCompatModeForBounds = false; mSizeCompatScale = 1f; mSizeCompatBounds = null; mCompatDisplayInsets = null; if (mSizeCompatScale != lastSizeCompatScale) { forAllWindows(WindowState::updateGlobalScale, false /* traverseTopToBottom */); } // Clear config override in #updateCompatDisplayInsets(). onRequestedOverrideConfigurationChanged(EMPTY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearSizeCompatMode 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
clearSizeCompatMode
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public int getPendingIntentLaunchFlags() { return mPendingIntentLaunchFlags; }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-20918 - Severity: CRITICAL - CVSS Score: 9.8 Description: Only allow NEW_TASK flag when adjusting pending intents Bug: 243794108 Test: atest CtsSecurityBulletinHostTestCases:android.security.cts.CVE_2023_20918 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c62d2e1021a030f4f0ae5fcfc8fe8e0875fa669f) Merged-In: I5d329beecef1902c36704e93d0bc5cb60d0e2f5b Change-Id: I5d329beecef1902c36704e93d0bc5cb60d0e2f5b Function: getPendingIntentLaunchFlags File: core/java/android/app/ActivityOptions.java Repository: android Fixed Code: public int getPendingIntentLaunchFlags() { // b/243794108: Ignore all flags except the new task flag, to be reconsidered in b/254490217 return mPendingIntentLaunchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_RECEIVER_FOREGROUND); }
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
getPendingIntentLaunchFlags
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
1
Analyze the following code function for security vulnerabilities
private void resetSeenObjects() { objectsRead = new ArrayList<Object>(); nextHandle = baseWireHandle; primitiveData = emptyStream; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetSeenObjects 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
resetSeenObjects
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
public void attachFile(EntityReference pageReference, String name, InputStream is, boolean failIfExists) throws Exception { EntityReference reference = new EntityReference(name, EntityType.ATTACHMENT, pageReference); attachFile(reference, is, failIfExists); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachFile File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
attachFile
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private void dump(Printer printer, boolean verbose) { synchronized (mLock) { if (mConnectionPoolLocked != null) { printer.println(""); mConnectionPoolLocked.dump(printer, verbose); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump 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
dump
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
protected void clearViews() { mViews.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearViews File: core/java/android/appwidget/AppWidgetHost.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
clearViews
core/java/android/appwidget/AppWidgetHost.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public String getLanguageCode(HttpServletRequest req) { String langCodeFromConfig = CONF.defaultLanguageCode(); String cookieLoc = getCookieValue(req, CONF.localeCookie()); Locale fromReq = (req == null) ? Locale.getDefault() : req.getLocale(); Locale requestLocale = langutils.getProperLocale(fromReq.toString()); return (cookieLoc != null) ? cookieLoc : (StringUtils.isBlank(langCodeFromConfig) ? requestLocale.getLanguage() : langutils.getProperLocale(langCodeFromConfig).getLanguage()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLanguageCode File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getLanguageCode
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public abstract URL getResource(String url);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResource File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
getResource
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = MANAGE_DEVICE_POLICY_SYSTEM_UPDATES, conditional = true) public void setSystemUpdatePolicy(@NonNull ComponentName admin, SystemUpdatePolicy policy) { throwIfParentInstance("setSystemUpdatePolicy"); if (mService != null) { try { mService.setSystemUpdatePolicy(admin, mContext.getPackageName(), policy); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSystemUpdatePolicy 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
setSystemUpdatePolicy
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public static void getUser( final Optional<AuthenticationService> authenticationService, final String token, final Handler<Optional<User>> handler) { try { if (authenticationService.isEmpty()) { handler.handle(Optional.empty()); } else { authenticationService .get() .getJwtAuthProvider() .authenticate( new JsonObject().put("jwt", token), (r) -> { if (r.succeeded()) { final Optional<User> user = Optional.ofNullable(r.result()); validateExpiryExists(user); handler.handle(user); } else { LOG.debug("Invalid JWT token", r.cause()); handler.handle(Optional.empty()); } }); } } catch (Exception e) { handler.handle(Optional.empty()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUser File: ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java Repository: hyperledger/besu The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-21369
MEDIUM
4
hyperledger/besu
getUser
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java
06e35a58c07a30c0fbdc0aae45a3e8b06b53c022
0
Analyze the following code function for security vulnerabilities
public String getURLToDeleteSpace(String space) { return getURL(space, "WebHome", "deletespace", "confirm=1&async=false&affectChidlren=on"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURLToDeleteSpace File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getURLToDeleteSpace
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private boolean releaseWakeLock(String lockName) { synchronized (this) { if (mWakeLock == null) { errorLog("Repeated wake lock release; aborting release: " + lockName); return false; } mWakeLock.release(); mWakeLock = null; mWakeLockName = null; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: releaseWakeLock File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
releaseWakeLock
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Override // Binder call protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (mContext.checkCallingOrSelfPermission(Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) { pw.println("Permission Denial: can't dump Fingerprint from from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()); return; } final long ident = Binder.clearCallingIdentity(); try { dumpInternal(pw); } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
dump
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public LBMember createMember(LBMember member) { if (member == null) member = new LBMember(); members.put(member.id, member); memberIpToId.put(member.address, member.id); if (member.poolId != null && pools.get(member.poolId) != null) { member.vipId = pools.get(member.poolId).vipId; if (!pools.get(member.poolId).members.contains(member.id)) pools.get(member.poolId).members.add(member.id); } else log.error("member must be specified with non-null pool_id"); return member; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createMember File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java Repository: floodlight The code follows secure coding practices.
[ "CWE-362", "CWE-476" ]
CVE-2015-6569
MEDIUM
4.3
floodlight
createMember
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
7f5bedb625eec3ff4d29987c31cef2553a962b36
0
Analyze the following code function for security vulnerabilities
public void resetThrottling() { mApiCallCount = 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetThrottling File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
resetThrottling
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
public Connector getListener(ConnectorType connectorType) { String binding; switch (connectorType) { case MANAGEMENT_CONNECTOR: binding = prop.getProperty(TS_MANAGEMENT_ADDRESS, "http://127.0.0.1:8081"); break; case METRICS_CONNECTOR: binding = prop.getProperty(TS_METRICS_ADDRESS, "http://127.0.0.1:8082"); break; default: binding = prop.getProperty(TS_INFERENCE_ADDRESS, "http://127.0.0.1:8080"); } return Connector.parse(binding, connectorType); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getListener File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getListener
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
public CriteriaService getCriteriaService() { return this.criteriaService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCriteriaService 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
getCriteriaService
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
@GetMapping("search") public JSON commonSearch(@EntityParam Entity searchEntity, HttpServletRequest request) { final ID user = getRequestUser(request); // 强制搜索 H5 boolean forceResults = getBoolParameter(request, "forceResults"); String q = getParameter(request, "q"); // 为空则加载最近使用的 if (StringUtils.isBlank(q)) { String type = getParameter(request, "type"); ID[] recently = RecentlyUsedHelper.gets(user, searchEntity.getName(), type); if (recently.length == 0) { if (forceResults); else return JSONUtils.EMPTY_ARRAY; } else { return RecentlyUsedSearchController.formatSelect2(recently, null); } } int pageSize = getIntParameter(request, "pageSize", 10); return buildResultSearch( searchEntity, getParameter(request, "quickFields"), q, null, pageSize); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: commonSearch File: src/main/java/com/rebuild/web/general/ReferenceSearchController.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
commonSearch
src/main/java/com/rebuild/web/general/ReferenceSearchController.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; KeyRequestInfo other = (KeyRequestInfo) obj; if (keyURL == null) { if (other.keyURL != null) return false; } else if (!keyURL.equals(other.keyURL)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
equals
base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
static public IActivityManager getDefault() { return gDefault.get(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefault File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getDefault
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void setPassword(String password) { setFieldValue(PASSWORD_KEY, password, ""); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPassword File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
setPassword
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
81be4e3aac55305cbb5c9d523cf5c96c66604b39
0
Analyze the following code function for security vulnerabilities
public static boolean isDefaultDockerInstalled() { return isDockerInstalled(DEFAULT_DOCKER_CLIENT); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2022-25914 - Severity: CRITICAL - CVSS Score: 9.8 Description: Check if file exists when executable path is passed in through jib dockerClient.executable (#3744) * Check if file exists when executable path is passed in through jib.dockerClient.executable Function: isDefaultDockerInstalled File: jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java Repository: GoogleContainerTools/jib Fixed Code: public static boolean isDefaultDockerInstalled() { try { new ProcessBuilder(DEFAULT_DOCKER_CLIENT.toString()).start(); return true; } catch (IOException ex) { return false; } }
[ "CWE-Other" ]
CVE-2022-25914
CRITICAL
9.8
GoogleContainerTools/jib
isDefaultDockerInstalled
jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
67fa40bc2c484da0546333914ea07a89fe44eaaf
1
Analyze the following code function for security vulnerabilities
boolean isDiscovering() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return mAdapterProperties.isDiscovering(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDiscovering File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
isDiscovering
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Override public boolean clearApplicationUserData(final String packageName, final IPackageDataObserver observer, int userId) { enforceNotIsolatedCaller("clearApplicationUserData"); int uid = Binder.getCallingUid(); int pid = Binder.getCallingPid(); userId = handleIncomingUser(pid, uid, userId, false, ALLOW_FULL_ONLY, "clearApplicationUserData", null); long callingId = Binder.clearCallingIdentity(); try { IPackageManager pm = AppGlobals.getPackageManager(); int pkgUid = -1; synchronized(this) { try { pkgUid = pm.getPackageUid(packageName, userId); } catch (RemoteException e) { } if (pkgUid == -1) { Slog.w(TAG, "Invalid packageName: " + packageName); if (observer != null) { try { observer.onRemoveCompleted(packageName, false); } catch (RemoteException e) { Slog.i(TAG, "Observer no longer exists."); } } return false; } if (uid == pkgUid || checkComponentPermission( android.Manifest.permission.CLEAR_APP_USER_DATA, pid, uid, -1, true) == PackageManager.PERMISSION_GRANTED) { forceStopPackageLocked(packageName, pkgUid, "clear data"); } else { throw new SecurityException("PID " + pid + " does not have permission " + android.Manifest.permission.CLEAR_APP_USER_DATA + " to clear data" + " of package " + packageName); } // Remove all tasks match the cleared application package and user for (int i = mRecentTasks.size() - 1; i >= 0; i--) { final TaskRecord tr = mRecentTasks.get(i); final String taskPackageName = tr.getBaseIntent().getComponent().getPackageName(); if (tr.userId != userId) continue; if (!taskPackageName.equals(packageName)) continue; removeTaskByIdLocked(tr.taskId, false); } } try { // Clear application user data pm.clearApplicationUserData(packageName, observer, userId); synchronized(this) { // Remove all permissions granted from/to this package removeUriPermissionsForPackageLocked(packageName, userId, true); } Intent intent = new Intent(Intent.ACTION_PACKAGE_DATA_CLEARED, Uri.fromParts("package", packageName, null)); intent.putExtra(Intent.EXTRA_UID, pkgUid); broadcastIntentInPackage("android", Process.SYSTEM_UID, intent, null, null, 0, null, null, null, false, false, userId); } catch (RemoteException e) { } } finally { Binder.restoreCallingIdentity(callingId); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearApplicationUserData File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
clearApplicationUserData
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private static String findGnuplotHelperScript() { final URL url = GraphHandler.class.getClassLoader().getResource(WRAPPER); if (url == null) { throw new RuntimeException("Couldn't find " + WRAPPER + " on the" + " CLASSPATH: " + System.getProperty("java.class.path")); } final String path = url.getFile(); LOG.debug("Using Gnuplot wrapper at {}", path); final File file = new File(path); final String error; if (!file.exists()) { error = "non-existent"; } else if (!file.canExecute()) { error = "non-executable"; } else if (!file.canRead()) { error = "unreadable"; } else { return path; } throw new RuntimeException("The " + WRAPPER + " found on the" + " CLASSPATH (" + path + ") is a " + error + " file... WTF?" + " CLASSPATH=" + System.getProperty("java.class.path")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findGnuplotHelperScript File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2020-35476
HIGH
7.5
OpenTSDB/opentsdb
findGnuplotHelperScript
src/tsd/GraphHandler.java
b762338664c3ee6e3f773bc04da2a8af24a5c486
0
Analyze the following code function for security vulnerabilities
public static String getName(final Object o) { String payloadName = o.getClass().getName(); if (o instanceof IBaseDataObject) { payloadName = ((IBaseDataObject) o).shortName(); } else if (o instanceof Collection) { final Iterator<?> pi = ((Collection<?>) o).iterator(); if (pi.hasNext()) { payloadName = ((IBaseDataObject) pi.next()).shortName() + "(" + ((Collection<?>) o).size() + ")"; } } return payloadName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: src/main/java/emissary/util/PayloadUtil.java Repository: NationalSecurityAgency/emissary The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-32634
MEDIUM
6.5
NationalSecurityAgency/emissary
getName
src/main/java/emissary/util/PayloadUtil.java
40260b1ec1f76cc92361702cc14fa1e4388e19d7
0
Analyze the following code function for security vulnerabilities
public List<ResolveInfo> queryIntent(Intent intent, String resolvedType, int flags, int userId) { if (!sUserManager.exists(userId)) return null; mFlags = flags; return super.queryIntent(intent, resolvedType, (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: queryIntent 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
queryIntent
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public boolean isPacked(File workflowFile) throws IOException { if (workflowFile.length() > singleFileSizeLimit) { return false; } String fileContent = readFileToString(workflowFile); return fileContent.contains("$graph"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPacked File: src/main/java/org/commonwl/view/cwl/CWLService.java Repository: common-workflow-language/cwlviewer The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-41110
HIGH
7.5
common-workflow-language/cwlviewer
isPacked
src/main/java/org/commonwl/view/cwl/CWLService.java
f6066f09edb70033a2ce80200e9fa9e70a5c29de
0
Analyze the following code function for security vulnerabilities
private void beforeSave(XWikiDocument document, XWikiContext context) throws XWikiException { ObservationManager om = getObservationManager(); if (om != null) { CancelableEvent documentEvent; if (document.getOriginalDocument().isNew()) { documentEvent = new DocumentCreatingEvent(document.getDocumentReference()); } else { documentEvent = new DocumentUpdatingEvent(document.getDocumentReference()); } om.notify(documentEvent, document, context); // If the action has been canceled by the user then don't perform any save and throw an exception if (documentEvent.isCanceled()) { throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_DOC, String.format("An Event Listener has cancelled the document save for [%s]. Reason: [%s]", document.getDocumentReference(), documentEvent.getReason())); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beforeSave 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
beforeSave
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
protected void engineInitSign( PrivateKey privateKey) throws InvalidKeyException { CipherParameters param = DSAUtil.generatePrivateKeyParameter(privateKey); if (random != null) { param = new ParametersWithRandom(param, random); } digest.reset(); signer.init(true, param); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineInitSign File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-347" ]
CVE-2016-1000338
MEDIUM
5
bcgit/bc-java
engineInitSign
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
b0c3ce99d43d73a096268831d0d120ffc89eac7f
0
Analyze the following code function for security vulnerabilities
private static void readInto(final InputStream input, final byte[] output) { try { input.read(output); } catch (IOException e) { throw new StreamException(e); } }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2020-7226 - Severity: MEDIUM - CVSS Score: 5.0 Description: Address code review feedback points. Function: readInto File: src/main/java/org/cryptacular/CiphertextHeaderV2.java Repository: vt-middleware/cryptacular Fixed Code: private static void readInto(final InputStream input, final byte[] output) throws StreamException { try { input.read(output); } catch (IOException e) { throw new StreamException(e); } }
[ "CWE-770" ]
CVE-2020-7226
MEDIUM
5
vt-middleware/cryptacular
readInto
src/main/java/org/cryptacular/CiphertextHeaderV2.java
132f15ead532d78d4c19d2bcb39ec8f319ad6945
1
Analyze the following code function for security vulnerabilities
public boolean isDeviceOwner(CallerIdentity caller) { synchronized (getLockObject()) { return isDeviceOwnerLocked(caller); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceOwner File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
isDeviceOwner
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public long insert(ContentValues values) { return insertInternal(values, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insert File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
insert
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
private IssueTemplateDao getIssueTemplateByProjectId(String projectId) { IssueTemplateDao issueTemplateDao; Project project = baseProjectService.getProjectById(projectId); if (PlatformPluginService.isPluginPlatform(project.getPlatform()) && project.getThirdPartTemplate()) { // 第三方Jira平台 issueTemplateDao = getThirdPartTemplate(project.getId()); issueTemplateDao.setIsThirdTemplate(Boolean.TRUE); } else { issueTemplateDao = trackIssueTemplateService.getTemplate(projectId); issueTemplateDao.setIsThirdTemplate(Boolean.FALSE); } return issueTemplateDao; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIssueTemplateByProjectId File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getIssueTemplateByProjectId
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public static void main(String... args) { final Arguments arguments = new Arguments(args); arguments.getRemainingArguments(0); arguments.out.print("GeoTools version "); arguments.out.println(getVersion()); final Hints hints = getDefaultHints(); if (hints != null && !hints.isEmpty()) { arguments.out.println(hints); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: main File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
main
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
private String removeDoubleQuotes(String string) { if (TextUtils.isEmpty(string)) return ""; int length = string.length(); if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) { return string.substring(1, length - 1); } return string; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeDoubleQuotes File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
removeDoubleQuotes
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
81be4e3aac55305cbb5c9d523cf5c96c66604b39
0
Analyze the following code function for security vulnerabilities
public ApiClient setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKey(apiKey); return this; } } throw new RuntimeException("No API key authentication configured!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setApiKey File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setApiKey
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void setCategories(String categories) { this.categories = categories; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCategories File: src/main/java/cn/luischen/model/ContentDomain.java Repository: WinterChenS/my-site The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29638
MEDIUM
5.4
WinterChenS/my-site
setCategories
src/main/java/cn/luischen/model/ContentDomain.java
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
0
Analyze the following code function for security vulnerabilities
public static boolean getAsBoolean(@NonNull ContentValues values, @NonNull String key, boolean def) { return parseBoolean(values.get(key), def); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAsBoolean File: src/com/android/providers/media/util/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-35683
MEDIUM
5.5
android
getAsBoolean
src/com/android/providers/media/util/DatabaseUtils.java
23d156ed1bed6d2c2b325f0be540d0afca510c49
0
Analyze the following code function for security vulnerabilities
public Pair<AuthorityInfo, SyncStatusInfo> getCopyOfAuthorityWithSyncStatus(EndPoint info) { synchronized (mAuthorities) { AuthorityInfo authorityInfo = getOrCreateAuthorityLocked(info, -1 /* assign a new identifier if creating a new target */, true /* write to storage if this results in a change */); return createCopyPairOfAuthorityWithSyncStatusLocked(authorityInfo); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCopyOfAuthorityWithSyncStatus File: services/core/java/com/android/server/content/SyncStorageEngine.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-2424
HIGH
7.1
android
getCopyOfAuthorityWithSyncStatus
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasSecretParams() { return this.secretParamsForPassword != null && !this.secretParamsForPassword.isEmpty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasSecretParams File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
hasSecretParams
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
private void handleFingerprintLockoutReset() { updateFingerprintListeningState(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleFingerprintLockoutReset File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
handleFingerprintLockoutReset
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
boolean isOperand() { return type.equals("operand"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isOperand File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java Repository: mkulesh/microMathematics The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000821
HIGH
7.5
mkulesh/microMathematics
isOperand
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
5c05ac8de16c569ff0a1816f20be235090d3dd9d
0
Analyze the following code function for security vulnerabilities
public Date getContentUpdateDate() { return this.doc.getContentUpdateDate(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentUpdateDate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getContentUpdateDate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Override public boolean someUserHasAccount(@NonNull final Account account) { if (!UserHandle.isSameApp(Process.SYSTEM_UID, Binder.getCallingUid())) { throw new SecurityException("Only system can check for accounts across users"); } final long token = Binder.clearCallingIdentity(); try { AccountAndUser[] allAccounts = getAllAccounts(); for (int i = allAccounts.length - 1; i >= 0; i--) { if (allAccounts[i].account.equals(account)) { return true; } } return false; } finally { Binder.restoreCallingIdentity(token); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: someUserHasAccount File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
someUserHasAccount
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
final int startActivityFromRecentsInner(int taskId, Bundle options) { final TaskRecord task; final int callingUid; final String callingPackage; final Intent intent; final int userId; synchronized (this) { task = recentTaskForIdLocked(taskId); if (task == null) { throw new IllegalArgumentException("Task " + taskId + " not found."); } if (task.getRootActivity() != null) { moveTaskToFrontLocked(task.taskId, 0, null); return ActivityManager.START_TASK_TO_FRONT; } callingUid = task.mCallingUid; callingPackage = task.mCallingPackage; intent = task.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY); userId = task.userId; } return startActivityInPackage(callingUid, callingPackage, intent, null, null, null, 0, 0, options, userId, null, task); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityFromRecentsInner File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
startActivityFromRecentsInner
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private ArraySet<String> getBackgroundLaunchBroadcasts() { if (mBackgroundLaunchBroadcasts == null) { mBackgroundLaunchBroadcasts = SystemConfig.getInstance().getAllowImplicitBroadcasts(); } return mBackgroundLaunchBroadcasts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBackgroundLaunchBroadcasts File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
getBackgroundLaunchBroadcasts
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public boolean isSecure() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSecure File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
isSecure
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public WebXml getWebXml(FacesContext context) { WebXml webXml = WebXml.getInstance(context); if (null == webXml) { throw new FacesException( "Resources framework is not initialised, check web.xml for Filter configuration"); } return webXml; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWebXml File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
getWebXml
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
public ResourceEncodingEnum getResourceEncoding() { return myResourceEncoding; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourceEncoding File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getResourceEncoding
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public String getProtocol() { return this.protocol; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProtocol File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
getProtocol
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
public String sort() { String typeStr = convertRequestParam(getPara(0)); setPageInfo(Constants.getArticleUri() + "sort/" + typeStr + "-", new Log().findByTypeAlias(getParaToInt(1, 1), getDefaultRows(), typeStr), getParaToInt(1, 1)); Type type = new Type().findByAlias(typeStr); setAttr("type", type); setAttr("tipsType", I18nUtil.getStringFromRes("category")); if (type != null) { setAttr("tipsName", type.getStr("typeName")); } return "page"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sort File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
sort
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
public synchronized TopLevelItem createProject( TopLevelItemDescriptor type, String name, boolean notify ) throws IOException { return itemGroupMixIn.createProject(type,name,notify); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createProject 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
createProject
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void save(String table, String id, Object entity, boolean returnId, Handler<AsyncResult<String>> replyHandler) { client.getConnection(conn -> save(conn, table, id, entity, returnId, /* upsert */ false, /* convertEntity */ true, closeAndHandleResult(conn, replyHandler))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
save
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Test public void detectsAliasCorrectly() throws Exception { assertThat(detectAlias(QUERY), IS_U); assertThat(detectAlias(SIMPLE_QUERY), IS_U); assertThat(detectAlias(COUNT_QUERY), IS_U); assertThat(detectAlias(QUERY_WITH_AS), IS_U); assertThat(detectAlias("SELECT FROM USER U"), is("U")); assertThat(detectAlias("select u from User u"), IS_U); assertThat(detectAlias("select u from com.acme.User u"), IS_U); assertThat(detectAlias("select u from T05User u"), IS_U); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: detectsAliasCorrectly File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
detectsAliasCorrectly
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
@Override public void onServiceConnected(ComponentName component, IBinder service) { if (component.equals( new ComponentName(AuthenticatorActivity.this, OperationsService.class) )) { mOperationsServiceBinder = (OperationsServiceBinder) service; Uri data = getIntent().getData(); if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) { String prefix = getString(R.string.login_data_own_scheme) + PROTOCOL_SUFFIX + "login/"; LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, data.toString()); try { mServerInfo.mBaseUrl = AuthenticatorUrlUtils.normalizeUrlSuffix(loginUrlInfo.serverAddress); webViewUser = loginUrlInfo.username; webViewPassword = loginUrlInfo.password; doOnResumeAndBound(); checkOcServer(); } catch (Exception e) { mServerStatusIcon = R.drawable.ic_alert; mServerStatusText = getString(R.string.qr_could_not_be_read); showServerStatus(); } } else { doOnResumeAndBound(); } } }
Vulnerability Classification: - CWE: CWE-248 - CVE: CVE-2021-32694 - Severity: MEDIUM - CVSS Score: 4.3 Description: Do not crash if wrong deep login url is used Signed-off-by: tobiasKaminsky <tobias@kaminsky.me> Function: onServiceConnected File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java Repository: nextcloud/android Fixed Code: @Override public void onServiceConnected(ComponentName component, IBinder service) { if (component.equals( new ComponentName(AuthenticatorActivity.this, OperationsService.class) )) { mOperationsServiceBinder = (OperationsServiceBinder) service; Uri data = getIntent().getData(); if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) { try { String prefix = getString(R.string.login_data_own_scheme) + PROTOCOL_SUFFIX + "login/"; LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, data.toString()); mServerInfo.mBaseUrl = AuthenticatorUrlUtils.normalizeUrlSuffix(loginUrlInfo.serverAddress); webViewUser = loginUrlInfo.username; webViewPassword = loginUrlInfo.password; doOnResumeAndBound(); checkOcServer(); } catch (Exception e) { mServerStatusIcon = R.drawable.ic_alert; mServerStatusText = getString(R.string.qr_could_not_be_read); showServerStatus(); } } else { doOnResumeAndBound(); } } }
[ "CWE-248" ]
CVE-2021-32694
MEDIUM
4.3
nextcloud/android
onServiceConnected
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
9343bdd85d70625a90e0c952897957a102c2421b
1
Analyze the following code function for security vulnerabilities
public static Element parseElement(String xml) { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dbFactory.newDocumentBuilder(); Document doc = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); return doc.getDocumentElement(); } catch (Exception e) { throw new RuntimeException(e); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2021-3869 - Severity: MEDIUM - CVSS Score: 5.0 Description: Attempt to prevent external document attacks by wrapping DocumentBuilderFactory with a bunch of attribute changes Function: parseElement File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP Fixed Code: public static Element parseElement(String xml) { try { DocumentBuilderFactory dbFactory = safeDocumentBuilderFactory(); DocumentBuilder docBuilder = dbFactory.newDocumentBuilder(); Document doc = docBuilder.parse(new ByteArrayInputStream(xml.getBytes())); return doc.getDocumentElement(); } catch (Exception e) { throw new RuntimeException(e); } }
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
parseElement
src/edu/stanford/nlp/util/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
1
Analyze the following code function for security vulnerabilities
private String i18n(int key, Object... args) { return getContext().getString(key, args); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: i18n File: src/main/java/com/owncloud/android/syncadapter/FileSyncAdapter.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
i18n
src/main/java/com/owncloud/android/syncadapter/FileSyncAdapter.java
27559efb79d45782e000b762860658d49e9c35e9
0
Analyze the following code function for security vulnerabilities
private Set<String> getUrls(@NotNull Dragonfly dragonfly, @NotNull MavenDependency dependency) { return dragonfly.getRepositories().stream().map(repo -> String.format( FORMAT, repo, dependency.getGroupId().replace(".", "/"), dependency.getArtifactId(), dependency.getVersion() )).collect(Collectors.toSet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUrls File: src/main/java/dev/hypera/dragonfly/resolvers/impl/MavenSnapshotResolver.java Repository: HyperaDev/Dragonfly The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
getUrls
src/main/java/dev/hypera/dragonfly/resolvers/impl/MavenSnapshotResolver.java
9661375e1135127ca6cdb5712e978bec33cc06b3
0
Analyze the following code function for security vulnerabilities
@Override public void onReachabilityLost(String logMsg) { mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_CMD_IP_REACHABILITY_LOST); sendMessage(CMD_IP_REACHABILITY_LOST, logMsg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onReachabilityLost File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
onReachabilityLost
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void setSystemId(String sysId) { fSystemId = sysId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSystemId File: ext/java/nokogiri/XmlSchema.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-26247
MEDIUM
4
sparklemotion/nokogiri
setSystemId
ext/java/nokogiri/XmlSchema.java
9c87439d9afa14a365ff13e73adc809cb2c3d97b
0
Analyze the following code function for security vulnerabilities
private boolean equalsFast(HttpHeadersBase that) { HeaderEntry e = head.after; while (e != head) { final AsciiString name = e.getKey(); if (!getAllReversed(name).equals(that.getAllReversed(name))) { return false; } e = e.after; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equalsFast File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
equalsFast
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public int getLineForOffset(int offset) { int high = getLineCount(), low = -1, guess; while (high - low > 1) { guess = (high + low) / 2; if (getLineStart(guess) > offset) high = guess; else low = guess; } if (low < 0) return 0; else return low; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLineForOffset File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getLineForOffset
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
public int read(double[] d) throws IOException { return read(d, 0, d.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/main/java/org/xerial/snappy/SnappyInputStream.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-34455
HIGH
7.5
xerial/snappy-java
read
src/main/java/org/xerial/snappy/SnappyInputStream.java
3bf67857fcf70d9eea56eed4af7c925671e8eaea
0
Analyze the following code function for security vulnerabilities
public void addDatatransferProgressListener( OnDatatransferProgressListener listener, User user, OCFile file ) { if (user == null || file == null || listener == null) { return; } String targetKey = buildRemoteName(user.getAccountName(), file.getRemotePath()); mBoundListeners.put(targetKey, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDatatransferProgressListener File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
addDatatransferProgressListener
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
public void onPatternDetected(List<LockPatternView.Cell> pattern) { if (mUiStage == Stage.NeedToConfirm || mUiStage == Stage.ConfirmWrong) { if (mChosenPattern == null) throw new IllegalStateException( "null chosen pattern in stage 'need to confirm"); try (LockscreenCredential confirmPattern = LockscreenCredential.createPattern(pattern)) { if (mChosenPattern.equals(confirmPattern)) { updateStage(Stage.ChoiceConfirmed); } else { updateStage(Stage.ConfirmWrong); } } } else if (mUiStage == Stage.Introduction || mUiStage == Stage.ChoiceTooShort){ if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) { updateStage(Stage.ChoiceTooShort); } else { mChosenPattern = LockscreenCredential.createPattern(pattern); updateStage(Stage.FirstChoiceValid); } } else { throw new IllegalStateException("Unexpected stage " + mUiStage + " when " + "entering the pattern."); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPatternDetected File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
onPatternDetected
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
public StatusBarNotification[] getArray(int count) { if (count == 0) count = mBufferSize; final StatusBarNotification[] a = new StatusBarNotification[Math.min(count, mBuffer.size())]; Iterator<StatusBarNotification> iter = descendingIterator(); int i=0; while (iter.hasNext() && i < count) { a[i++] = iter.next(); } return a; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getArray 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
getArray
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0