instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; // also set the date format for model (de)serialization with Date properties this.json.setDateFormat((DateFormat) dateFormat.clone()); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDateFormat File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
setDateFormat
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
void dump(PrintWriter pw, String prefix) { pw.print(prefix); pw.print("service: "); pw.println(mServicePackageName); pw.print(prefix); pw.print("app: "); pw.println(mComponentName.toShortString()); pw.print(prefix); pw.print("theme id: "); pw.print(mThemeId); switch (mThemeId) { case THEME_ID_DARK: pw.println(" (dark)"); break; case THEME_ID_LIGHT: pw.println(" (light)"); break; default: pw.println("(UNKNOWN_MODE)"); break; } final View view = mDialog.getWindow().getDecorView(); final int[] loc = view.getLocationOnScreen(); pw.print(prefix); pw.print("coordinates: "); pw.print('('); pw.print(loc[0]); pw.print(','); pw.print(loc[1]); pw.print(')'); pw.print('('); pw.print(loc[0] + view.getWidth()); pw.print(','); pw.print(loc[1] + view.getHeight()); pw.println(')'); pw.print(prefix); pw.print("destroyed: "); pw.println(mDestroyed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-610" ]
CVE-2023-40133
MEDIUM
5.5
android
dump
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
08becc8c600f14c5529115cc1a1e0c97cd503f33
0
Analyze the following code function for security vulnerabilities
@Override public void setNativePlayerMode(boolean nativePlayer) { this.nativePlayer = nativePlayer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNativePlayerMode 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
setNativePlayerMode
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private native long nativeInit(long webContentsPtr, long viewAndroidPtr, long windowAndroidPtr, HashSet<Object> retainedObjectSet);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeInit File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
nativeInit
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public void setVr2dDisplayId(int vr2dDisplayId) { ProtoLog.d(WM_DEBUG_TASKS, "setVr2dDisplayId called for: %d", vr2dDisplayId); synchronized (mGlobalLock) { mVr2dDisplayId = vr2dDisplayId; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVr2dDisplayId File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
setVr2dDisplayId
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
protected String encodeURL( HttpServletResponse resp, String path ) { path = path.replace("%", "%25"); path = path.replace(" ", "%20"); path = XMLEncoder.encode(path); return path; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encodeURL File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java Repository: opencrx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-46502
CRITICAL
9.8
opencrx
encodeURL
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
ce7a71db0bb34ecbcb0e822d40598e410a48b399
0
Analyze the following code function for security vulnerabilities
public String dumpConfigurations() { Runtime runtime = Runtime.getRuntime(); return "\nTorchserve version: " + prop.getProperty(VERSION) + "\nTS Home: " + getModelServerHome() + "\nCurrent directory: " + getCanonicalPath(".") + "\nTemp directory: " + System.getProperty("java.io.tmpdir") + "\nMetrics config path: " + getMetricsConfigPath() + "\nNumber of GPUs: " + getNumberOfGpu() + "\nNumber of CPUs: " + runtime.availableProcessors() + "\nMax heap size: " + (runtime.maxMemory() / 1024 / 1024) + " M\nPython executable: " + (getPythonExecutable() == null ? "N/A" : getPythonExecutable()) + "\nConfig file: " + prop.getProperty("tsConfigFile", "N/A") + "\nInference address: " + getListener(ConnectorType.INFERENCE_CONNECTOR) + "\nManagement address: " + getListener(ConnectorType.MANAGEMENT_CONNECTOR) + "\nMetrics address: " + getListener(ConnectorType.METRICS_CONNECTOR) + "\nModel Store: " + (getModelStore() == null ? "N/A" : getModelStore()) + "\nInitial Models: " + (getLoadModels() == null ? "N/A" : getLoadModels()) + "\nLog dir: " + getCanonicalPath(System.getProperty("LOG_LOCATION")) + "\nMetrics dir: " + getCanonicalPath(System.getProperty("METRICS_LOCATION")) + "\nNetty threads: " + getNettyThreads() + "\nNetty client threads: " + getNettyClientThreads() + "\nDefault workers per model: " + getDefaultWorkers() + "\nBlacklist Regex: " + prop.getProperty(TS_BLACKLIST_ENV_VARS, "N/A") + "\nMaximum Response Size: " + prop.getProperty(TS_MAX_RESPONSE_SIZE, "6553500") + "\nMaximum Request Size: " + prop.getProperty(TS_MAX_REQUEST_SIZE, "6553500") + "\nLimit Maximum Image Pixels: " + prop.getProperty(TS_LIMIT_MAX_IMAGE_PIXELS, "true") + "\nPrefer direct buffer: " + prop.getProperty(TS_PREFER_DIRECT_BUFFER, "false") + "\nAllowed Urls: " + getAllowedUrls() + "\nCustom python dependency for model allowed: " + prop.getProperty(TS_INSTALL_PY_DEP_PER_MODEL, "false") + "\nEnable metrics API: " + prop.getProperty(TS_ENABLE_METRICS_API, "true") + "\nMetrics mode: " + getMetricsMode() + "\nDisable system metrics: " + isSystemMetricsDisabled() + "\nWorkflow Store: " + (getWorkflowStore() == null ? "N/A" : getWorkflowStore()) + "\nModel config: " + prop.getProperty(MODEL_CONFIG, "N/A"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpConfigurations 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
dumpConfigurations
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Override public double getDoubleAndRemove(K name, double defaultValue) { Double v = getDoubleAndRemove(name); return v != null ? v : defaultValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDoubleAndRemove File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
getDoubleAndRemove
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
private void elide(int start, int end) { if (sanitizedJson == null) { sanitizedJson = new StringBuilder(jsonish.length() + 16); } sanitizedJson.append(jsonish, cleaned, start); cleaned = end; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: elide File: src/main/java/com/google/json/JsonSanitizer.java Repository: OWASP/json-sanitizer The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-13973
MEDIUM
4.3
OWASP/json-sanitizer
elide
src/main/java/com/google/json/JsonSanitizer.java
53ceaac3e0a10e86d512ce96a0056578f2d1978f
0
Analyze the following code function for security vulnerabilities
public String getCorsAllowedOrigin() { return prop.getProperty(TS_CORS_ALLOWED_ORIGIN); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCorsAllowedOrigin 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
getCorsAllowedOrigin
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
boolean currentLaunchCanTurnScreenOn() { return mCurrentLaunchCanTurnScreenOn; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: currentLaunchCanTurnScreenOn 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
currentLaunchCanTurnScreenOn
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public String getMessage() { return message.getExpressionString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMessage File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getMessage
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public static Principal authenticate(String username, String password, XWikiContext context) throws XWikiException { return context.getWiki().getAuthService().authenticate(username, password, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: authenticate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
authenticate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
public AsyncHttpClientConfigBean setHostnameVerifier(HostnameVerifier hostnameVerifier) { this.hostnameVerifier = hostnameVerifier; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHostnameVerifier File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setHostnameVerifier
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
@Test public void saveTransIdSyntaxError(TestContext context) { String id = randomUuid(); postgresClient = createFoo(context); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.save(trans, "'", id, xPojo, context.asyncAssertFailure(save -> { postgresClient.rollbackTx(trans, context.asyncAssertSuccess()); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveTransIdSyntaxError File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
saveTransIdSyntaxError
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@JsonProperty("Text") public String getText() { return text; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getText File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getText
base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void removeReadyStateChangeListener(PropertyChangeListener listener) { super.removePropertyChangeListener("readyState", listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeReadyStateChangeListener File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java Repository: LoboEvolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000540
MEDIUM
6.8
LoboEvolution
removeReadyStateChangeListener
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
public @ColorInt int getSecondaryTextColor() { return mSecondaryTextColor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSecondaryTextColor File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getSecondaryTextColor
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void cancelRequestToScrollFocusedEditableNodeIntoView() { // Zero-ing the rect will prevent |updateAfterSizeChanged()| from // issuing the delayed form focus event. mFocusPreOSKViewportRect.setEmpty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelRequestToScrollFocusedEditableNodeIntoView File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
cancelRequestToScrollFocusedEditableNodeIntoView
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public void unrouteAids(String aid) { sendMessage(MSG_UNROUTE_AID, aid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unrouteAids File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
unrouteAids
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
private void incrementAppWidgetServiceRefCount(int appWidgetId, Pair<Integer, FilterComparison> serviceId) { HashSet<Integer> appWidgetIds = null; if (mRemoteViewsServicesAppWidgets.containsKey(serviceId)) { appWidgetIds = mRemoteViewsServicesAppWidgets.get(serviceId); } else { appWidgetIds = new HashSet<>(); mRemoteViewsServicesAppWidgets.put(serviceId, appWidgetIds); } appWidgetIds.add(appWidgetId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: incrementAppWidgetServiceRefCount 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
incrementAppWidgetServiceRefCount
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Override public String endParsing(String content, XWikiContext context) { return super.endParsing(content, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endParsing File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29206
MEDIUM
5.4
xwiki/xwiki-platform
endParsing
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasSystemUidErrors() { return mHasSystemUidErrors; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasSystemUidErrors 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
hasSystemUidErrors
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public ComponentName getDefaultPhoneApp() { try { Log.startSession("TSI.gDPA"); return mDefaultDialerCache.getDialtactsSystemDialerComponent(); } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultPhoneApp 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
getDefaultPhoneApp
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
@Override public boolean isAjaxRequest() { assertNotReleased(); if (ajaxRequest == null) { ajaxRequest = "partial/ajax".equals(ctx. getExternalContext().getRequestHeaderMap().get("Faces-Request")); if (!ajaxRequest) { ajaxRequest = "partial/ajax".equals(ctx.getExternalContext().getRequestParameterMap(). get("Faces-Request")); } } return ajaxRequest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAjaxRequest File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-17091
MEDIUM
4.3
eclipse-ee4j/mojarra
isAjaxRequest
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
0
Analyze the following code function for security vulnerabilities
private void addVariable(final Variable v, final List<Variable> out) { try { v.toString(); out.add(v); } catch (Throwable t) { // skip variables that cannot render due to an exception log.warn("Cannot resolve variable " + v.getName(), t); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addVariable File: varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java Repository: indeedeng/util The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-36634
MEDIUM
5.4
indeedeng/util
addVariable
varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
0
Analyze the following code function for security vulnerabilities
@Override public void onError(Session session, Throwable thr) { logger.error("Error received {} on session {}", thr.getMessage(), session.getId(), thr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onError File: kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
onError
kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
private void cancelDoKeyguardForChildProfilesLocked() { mDelayedProfileShowingSequence++; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelDoKeyguardForChildProfilesLocked File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
cancelDoKeyguardForChildProfilesLocked
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
@JsonProperty("KeyLength") public Integer getKeyLength() { return keyLength; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKeyLength File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getKeyLength
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public DefaultJpaInstanceConfiguration provideOptionDao() { bind(OptionDao.class, DefaultOptionJpaDao_LongInt.class); provideOptionDao = true; return this; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2016-15018 - Severity: MEDIUM - CVSS Score: 5.2 Description: Fix #18 SQLInjection vulnerability cleared Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key. Function: provideOptionDao File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java Repository: KrailOrg/krail-jpa Fixed Code: @Override public DefaultJpaInstanceConfiguration provideOptionDao() { bind(OptionDao.class, DefaultJpaOptionDao.class); provideOptionDao = true; return this; }
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
provideOptionDao
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
1
Analyze the following code function for security vulnerabilities
public static boolean hasAlignDirectByteBuffer() { return hasUnsafe() || PlatformDependent0.hasAlignSliceMethod(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasAlignDirectByteBuffer 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
hasAlignDirectByteBuffer
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public boolean removeAllEphemeralOrPasspointConfiguredNetworks() { if (mVerboseLoggingEnabled) { Log.v(TAG, "Removing all passpoint or ephemeral configured networks"); } boolean didRemove = false; WifiConfiguration[] copiedConfigs = mConfiguredNetworks.valuesForAllUsers().toArray(new WifiConfiguration[0]); for (WifiConfiguration config : copiedConfigs) { if (config.isPasspoint()) { Log.d(TAG, "Removing passpoint network config " + config.getProfileKey()); removeNetwork(config.networkId, config.creatorUid, config.creatorName); didRemove = true; } else if (config.ephemeral) { Log.d(TAG, "Removing ephemeral network config " + config.getProfileKey()); removeNetwork(config.networkId, config.creatorUid, config.creatorName); didRemove = true; } } return didRemove; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAllEphemeralOrPasspointConfiguredNetworks File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
removeAllEphemeralOrPasspointConfiguredNetworks
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public boolean showAssistFromActivity(IBinder token, Bundle args) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showAssistFromActivity File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
showAssistFromActivity
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public Page<E> setStartRow(long startRow) { this.startRow = startRow; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStartRow File: src/main/java/com/github/pagehelper/Page.java Repository: pagehelper/Mybatis-PageHelper The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-28111
HIGH
7.5
pagehelper/Mybatis-PageHelper
setStartRow
src/main/java/com/github/pagehelper/Page.java
554a524af2d2b30d09505516adc412468a84d8fa
0
Analyze the following code function for security vulnerabilities
@Override public BigDecimal toBigDecimal() { if (isApproximate) { // Converting to a BigDecimal requires Double.toString(). convertToAccurateDouble(); } return bcdToBigDecimal(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toBigDecimal File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
toBigDecimal
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
void dumpPermissionsLocked(FileDescriptor fd, PrintWriter pw, String[] args, int opti, boolean dumpAll, String dumpPackage) { boolean needSep = false; boolean printedAnything = false; pw.println("ACTIVITY MANAGER URI PERMISSIONS (dumpsys activity permissions)"); if (mGrantedUriPermissions.size() > 0) { boolean printed = false; int dumpUid = -2; if (dumpPackage != null) { try { dumpUid = mContext.getPackageManager().getPackageUidAsUser(dumpPackage, MATCH_UNINSTALLED_PACKAGES, 0); } catch (NameNotFoundException e) { dumpUid = -1; } } for (int i=0; i<mGrantedUriPermissions.size(); i++) { int uid = mGrantedUriPermissions.keyAt(i); if (dumpUid >= -1 && UserHandle.getAppId(uid) != dumpUid) { continue; } final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.valueAt(i); if (!printed) { if (needSep) pw.println(); needSep = true; pw.println(" Granted Uri Permissions:"); printed = true; printedAnything = true; } pw.print(" * UID "); pw.print(uid); pw.println(" holds:"); for (UriPermission perm : perms.values()) { pw.print(" "); pw.println(perm); if (dumpAll) { perm.dump(pw, " "); } } } } if (!printedAnything) { pw.println(" (nothing)"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpPermissionsLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
dumpPermissionsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private final String _findDecodedLong(int len, int q1, int q2) throws IOException { // first, need enough buffer to store bytes as ints: { int bufLen = (len + 3) >> 2; if (bufLen > _quadBuffer.length) { _quadBuffer = _growArrayTo(_quadBuffer, bufLen); } } _quadBuffer[0] = q1; _quadBuffer[1] = q2; // then decode, full quads first int offset = 2; int inPtr = _inputPtr+8; len -= 8; final byte[] inBuf = _inputBuffer; do { int q = (inBuf[inPtr++] & 0xFF); q = (q << 8) | inBuf[inPtr++] & 0xFF; q = (q << 8) | inBuf[inPtr++] & 0xFF; q = (q << 8) | inBuf[inPtr++] & 0xFF; _quadBuffer[offset++] = q; } while ((len -= 4) > 3); // and then leftovers if (len > 0) { int q = inBuf[inPtr] & 0xFF; if (len > 1) { q = (q << 8) + (inBuf[++inPtr] & 0xFF); if (len > 2) { q = (q << 8) + (inBuf[++inPtr] & 0xFF); } } _quadBuffer[offset++] = q; } return _symbols.findName(_quadBuffer, offset); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _findDecodedLong File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_findDecodedLong
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
private String getConfig(String orgId, String platform) { IntegrationRequest request = new IntegrationRequest(); if (StringUtils.isBlank(orgId)) { MSException.throwException("organization id is null"); } request.setWorkspaceId(orgId); request.setPlatform(platform); ServiceIntegration integration = baseIntegrationService.get(request); return integration.getConfiguration(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConfig 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
getConfig
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
@CalledByNative protected void setSyncId(int syncId) { mSyncId = syncId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSyncId File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
setSyncId
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private <T> T withAccessibilityManager( int userId, Function<AccessibilityManager, T> function) { // Not using AccessibilityManager.getInstance because that guesses // at the user you require based on callingUid and caches for a given // process. final IBinder iBinder = ServiceManager.getService(Context.ACCESSIBILITY_SERVICE); final IAccessibilityManager service = iBinder == null ? null : IAccessibilityManager.Stub.asInterface(iBinder); final AccessibilityManager am = new AccessibilityManager(mContext, service, userId); try { return function.apply(am); } finally { am.removeClient(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withAccessibilityManager 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
withAccessibilityManager
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected TextView getBody() { return mBodyView; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBody File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
getBody
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING, conditional = true) public void setUsbDataSignalingEnabled(boolean enabled) { throwIfParentInstance("setUsbDataSignalingEnabled"); if (mService != null) { try { mService.setUsbDataSignalingEnabled(mContext.getPackageName(), enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUsbDataSignalingEnabled 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
setUsbDataSignalingEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@TestApi public long getLastNetworkLogRetrievalTime() { try { return mService.getLastNetworkLogRetrievalTime(); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastNetworkLogRetrievalTime 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
getLastNetworkLogRetrievalTime
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public boolean isFingerprintAllowedForUser(int userId) { return (getStrongAuthForUser(userId) & ~ALLOWING_FINGERPRINT) == 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFingerprintAllowedForUser 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
isFingerprintAllowedForUser
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private boolean load(ArrayList<String> errors, String lib) { try { System.loadLibrary(lib); return true; } catch (UnsatisfiedLinkError e) { errors.add(e.getMessage()); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: load File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java Repository: fusesource/hawtjni The code follows secure coding practices.
[ "CWE-94" ]
CVE-2013-2035
MEDIUM
4.4
fusesource/hawtjni
load
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
92c266170ce98edc200c656bd034a237098b8aa5
0
Analyze the following code function for security vulnerabilities
private boolean canUserUseLockTaskLocked(int userId) { if (isUserAffiliatedWithDeviceLocked(userId)) { return true; } // Unaffiliated profile owners are not allowed to use lock when there is a device owner. if (mOwners.hasDeviceOwner()) { return false; } final ComponentName profileOwner = getProfileOwnerAsUser(userId); if (profileOwner == null) { return false; } // Managed profiles are not allowed to use lock task if (isManagedProfile(userId)) { return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canUserUseLockTaskLocked 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
canUserUseLockTaskLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public boolean bindDeviceAdminServiceAsUser( @NonNull ComponentName admin, @NonNull IApplicationThread caller, @Nullable IBinder activtiyToken, @NonNull Intent serviceIntent, @NonNull IServiceConnection connection, int flags, @UserIdInt int targetUserId) { if (!mHasFeature) { return false; } Objects.requireNonNull(admin); Objects.requireNonNull(caller); Objects.requireNonNull(serviceIntent); Preconditions.checkArgument( serviceIntent.getComponent() != null || serviceIntent.getPackage() != null, "Service intent must be explicit (with a package name or component): " + serviceIntent); Objects.requireNonNull(connection); Preconditions.checkArgument(mInjector.userHandleGetCallingUserId() != targetUserId, "target user id must be different from the calling user id"); if (!getBindDeviceAdminTargetUsers(admin).contains(UserHandle.of(targetUserId))) { throw new SecurityException("Not allowed to bind to target user id"); } final String targetPackage; synchronized (getLockObject()) { targetPackage = getOwnerPackageNameForUserLocked(targetUserId); } final long callingIdentity = mInjector.binderClearCallingIdentity(); try { // Validate and sanitize the incoming service intent. final Intent sanitizedIntent = createCrossUserServiceIntent(serviceIntent, targetPackage, targetUserId); if (sanitizedIntent == null) { // Fail, cannot lookup the target service. return false; } // Ask ActivityManager to bind it. Notice that we are binding the service with the // caller app instead of DevicePolicyManagerService. return mInjector.getIActivityManager().bindService( caller, activtiyToken, serviceIntent, serviceIntent.resolveTypeIfNeeded(mContext.getContentResolver()), connection, flags, mContext.getOpPackageName(), targetUserId) != 0; } catch (RemoteException ex) { // Same process, should not happen. } finally { mInjector.binderRestoreCallingIdentity(callingIdentity); } // Failed to bind. return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindDeviceAdminServiceAsUser 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
bindDeviceAdminServiceAsUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException { enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, "createStackOnDisplay()"); synchronized (this) { final int stackId = mStackSupervisor.getNextStackId(); final ActivityStack stack = mStackSupervisor.createStackOnDisplay(stackId, displayId); if (stack == null) { return null; } return stack.mActivityContainer; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStackOnDisplay File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
createStackOnDisplay
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override protected void formCancelled(UserRequest ureq) { status = FolderCommandStatus.STATUS_CANCELED; fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formCancelled File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdZip.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
formCancelled
src/main/java/org/olat/core/commons/modules/bc/commands/CmdZip.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
private void doOnResumeAndBound() { mOperationsServiceBinder.addOperationListener(this, mHandler); if (mWaitingForOpId <= Integer.MAX_VALUE) { mOperationsServiceBinder.dispatchResultIfFinished((int) mWaitingForOpId, this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doOnResumeAndBound File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-248" ]
CVE-2021-32694
MEDIUM
4.3
nextcloud/android
doOnResumeAndBound
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
9343bdd85d70625a90e0c952897957a102c2421b
0
Analyze the following code function for security vulnerabilities
public XmlGraphMLReader relType(String name) { this.defaultRelType = RelationshipType.withName(name); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: relType File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java Repository: neo4j/apoc The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-23926
HIGH
8.1
neo4j/apoc
relType
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
3202b421b21973b2f57a43b33c88f3f6901cfd2a
0
Analyze the following code function for security vulnerabilities
private void disableFieldsForCarrieridApn() { mMcc.setEnabled(false); mMnc.setEnabled(false); mMvnoType.setEnabled(false); mMvnoMatchData.setEnabled(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disableFieldsForCarrieridApn File: src/com/android/settings/network/apn/ApnEditor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40125
HIGH
7.8
android
disableFieldsForCarrieridApn
src/com/android/settings/network/apn/ApnEditor.java
63d464c3fa5c7b9900448fef3844790756e557eb
0
Analyze the following code function for security vulnerabilities
int getResult() { return mResult; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResult File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
getResult
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
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/ProfileOutput.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/ProfileOutput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public String getBrowserURL(PeerComponent browserPeer) { return ((AndroidImplementation.AndroidBrowserComponent) browserPeer).getURL(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBrowserURL 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
getBrowserURL
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public ActivityInfo getReceiverInfo(ComponentName component, int flags, int userId) { if (!sUserManager.exists(userId)) return null; enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get receiver info"); synchronized (mPackages) { PackageParser.Activity a = mReceivers.mActivities.get(component); if (DEBUG_PACKAGE_INFO) Log.v( TAG, "getReceiverInfo " + component + ": " + a); if (a != null && mSettings.isEnabledLPr(a.info, flags, userId)) { PackageSetting ps = mSettings.mPackages.get(component.getPackageName()); if (ps == null) return null; return PackageParser.generateActivityInfo(a, flags, ps.readUserState(userId), userId); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReceiverInfo 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
getReceiverInfo
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private static String getWebLoginUserAgent() { return Build.MANUFACTURER.substring(0, 1).toUpperCase(Locale.getDefault()) + Build.MANUFACTURER.substring(1).toLowerCase(Locale.getDefault()) + " " + Build.MODEL + " (Android)"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWebLoginUserAgent File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-248" ]
CVE-2021-32694
MEDIUM
4.3
nextcloud/android
getWebLoginUserAgent
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
9343bdd85d70625a90e0c952897957a102c2421b
0
Analyze the following code function for security vulnerabilities
public static final void readExceptionFromParcel(Parcel reply) { int code = reply.readExceptionCode(); if (code == 0) return; String msg = reply.readString(); DatabaseUtils.readExceptionFromParcel(reply, msg, code); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readExceptionFromParcel File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
readExceptionFromParcel
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
private void maybeClearProfilesForUpgradesLI( @Nullable PackageSetting originalPkgSetting, @NonNull AndroidPackage pkg) { if (originalPkgSetting == null || !mPm.isDeviceUpgrading()) { return; } if (originalPkgSetting.getVersionCode() == pkg.getLongVersionCode()) { return; } mAppDataHelper.clearAppProfilesLIF(pkg); if (DEBUG_INSTALL) { Slog.d(TAG, originalPkgSetting.getPackageName() + " clear profile due to version change " + originalPkgSetting.getVersionCode() + " != " + pkg.getLongVersionCode()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: maybeClearProfilesForUpgradesLI File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
maybeClearProfilesForUpgradesLI
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
@Override public void setBackupServiceEnabled(ComponentName admin, boolean enabled) { if (!mHasFeature) { return; } Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller) || isProfileOwner(caller) || isFinancedDeviceOwner(caller)); toggleBackupServiceActive(caller.getUserId(), enabled); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBackupServiceEnabled 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
setBackupServiceEnabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public @CheckForNull Node getNode(String name) { return slaves.getNode(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNode 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
getNode
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void flushCache() { if (hasProgrammingRights()) { this.xwiki.flushCache(getXWikiContext()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: flushCache 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
flushCache
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
private void copyAttachment(XWikiAttachment attachment, boolean reset) throws XWikiException { XWikiContext xcontext = getXWikiContext(); XWikiAttachment newAttachment = attachment.clone(); // Make sure we copy the attachment content also, not just its meta data. For this we need to load // the attachment content from the source document. Note that the owner document will be overwritten // below when we call setAttachment(). newAttachment.setDoc(attachment.getDoc(), false); newAttachment.loadAttachmentContent(xcontext); // We need to set the content of the attachment to be dirty because the dirty bit is used to signal // that there is a reason to save the copied attachment, otherwise the copied attachment will be // empty since the original attachment content is not modified in this operation. newAttachment.getAttachment_content().setContentDirty(true); if (reset) { // Reset the meta data that is specific to the original attachment (version, author, date). newAttachment.setRCSVersion(null); newAttachment.setAuthorReference(xcontext.getUserReference()); newAttachment.setDate(new Date()); } // Add the attachment copy to the list of attachments of this document. setAttachment(newAttachment); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyAttachment File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
copyAttachment
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Unstable public void initialize() { // There is no syntax by default in a new document and the default one is retrieved from the configuration setSyntax(getSyntax()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
initialize
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
public String getPrefix() { throw new RuntimeException("getPrefix not supported"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrefix File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
getPrefix
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public int getAutocompleteLength() { int autoCompleteIndex = getText().getSpanStart(mAutocompleteSpan); if (autoCompleteIndex < 0) return 0; return getText().length() - autoCompleteIndex; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAutocompleteLength File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
getAutocompleteLength
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
public NotificationChannel getChannel(String pkg, int uid, String channelId) { return getChannel(pkg, uid, channelId, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChannel File: src/com/android/settings/notification/NotificationBackend.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35667
HIGH
7.8
android
getChannel
src/com/android/settings/notification/NotificationBackend.java
d8355ac47e068ad20c6a7b1602e72f0585ec0085
0
Analyze the following code function for security vulnerabilities
public String getSpaceCopyright() { return this.xwiki.getSpaceCopyright(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSpaceCopyright 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
getSpaceCopyright
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
@Override public List<XWikiDocument> searchDocuments(String wheresql, XWikiContext context) throws XWikiException { return searchDocuments(wheresql, null, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: searchDocuments File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
searchDocuments
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
@Override protected void _handleEOF() throws JsonParseException { if (!_parsingContext.inRoot()) { String marker = _parsingContext.inArray() ? "Array" : "Object"; _reportInvalidEOF(String.format( ": expected close marker for %s (start marker at %s)", marker, _parsingContext.getStartLocation(_ioContext.getSourceReference())), null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _handleEOF File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_handleEOF
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
public void write(final Writer writer, final String entityType) throws IOException { try { final SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory.newInstance(); final TransformerHandler th = stf.newTransformerHandler(); final Transformer transformer = th.getTransformer(); writer.write("<?xml version=\"1.1\" encoding=\"UTF-8\"?>\n"); XMLUtil.setCommonOutputProperties(transformer, true); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, YES); th.setResult(new StreamResult(writer)); th.startDocument(); final String xmlName = XMLUtil.toXMLName(entityType); writeStartElement(th, xmlName); for (final Entry<String, List<Object>> entry : propertyValues.entrySet()) { final String propertyName = entry.getKey(); final List<Object> list = entry.getValue(); for (final Object value : list) { if (value != null) { if (value instanceof Collection) { for (final Object valueItem : (Collection<?>) value) { writeStartElement(th, propertyName); writeContent(th, String.valueOf(valueItem)); writeEndElement(th, propertyName); } } else if (value instanceof DocRef) { final DocRef docRef = (DocRef) value; writeStartElement(th, propertyName); writeStartElement(th, "doc"); writeStartElement(th, "type"); writeContent(th, docRef.getType()); writeEndElement(th, "type"); writeStartElement(th, "uuid"); writeContent(th, docRef.getUuid()); writeEndElement(th, "uuid"); writeStartElement(th, "name"); writeContent(th, docRef.getName()); writeEndElement(th, "name"); writeEndElement(th, "doc"); writeEndElement(th, propertyName); } else if (value instanceof Date) { writeStartElement(th, propertyName); writeContent(th, DateUtil.createNormalDateTimeString(((Date) value).getTime())); writeEndElement(th, propertyName); } else { writeStartElement(th, propertyName); writeContent(th, String.valueOf(value)); writeEndElement(th, propertyName); } } } } writeEndElement(th, xmlName); th.endDocument(); writer.close(); } catch (final IOException e) { throw e; } catch (final Exception e) { throw new IOException(e.getMessage()); } }
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: write File: stroom-core-server/src/main/java/stroom/importexport/server/Config.java Repository: gchq/stroom Fixed Code: public void write(final Writer writer, final String entityType) throws IOException { try { final SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactoryFactory.newInstance(); final TransformerHandler th = stf.newTransformerHandler(); final Transformer transformer = th.getTransformer(); writer.write("<?xml version=\"1.1\" encoding=\"UTF-8\"?>\n"); XMLUtil.setCommonOutputProperties(transformer, true); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, YES); th.setResult(new StreamResult(writer)); th.startDocument(); final String xmlName = XMLUtil.toXMLName(entityType); writeStartElement(th, xmlName); for (final Entry<String, List<Object>> entry : propertyValues.entrySet()) { final String propertyName = entry.getKey(); final List<Object> list = entry.getValue(); for (final Object value : list) { if (value != null) { if (value instanceof Collection) { for (final Object valueItem : (Collection<?>) value) { writeStartElement(th, propertyName); writeContent(th, String.valueOf(valueItem)); writeEndElement(th, propertyName); } } else if (value instanceof DocRef) { final DocRef docRef = (DocRef) value; writeStartElement(th, propertyName); writeStartElement(th, "doc"); writeStartElement(th, "type"); writeContent(th, docRef.getType()); writeEndElement(th, "type"); writeStartElement(th, "uuid"); writeContent(th, docRef.getUuid()); writeEndElement(th, "uuid"); writeStartElement(th, "name"); writeContent(th, docRef.getName()); writeEndElement(th, "name"); writeEndElement(th, "doc"); writeEndElement(th, propertyName); } else if (value instanceof Date) { writeStartElement(th, propertyName); writeContent(th, DateUtil.createNormalDateTimeString(((Date) value).getTime())); writeEndElement(th, propertyName); } else { writeStartElement(th, propertyName); writeContent(th, String.valueOf(value)); writeEndElement(th, propertyName); } } } } writeEndElement(th, xmlName); th.endDocument(); writer.close(); } catch (final IOException e) { throw e; } catch (final Exception e) { throw new IOException(e.getMessage()); } }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
write
stroom-core-server/src/main/java/stroom/importexport/server/Config.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
public void destroy() { if (mNativeContentViewCore != 0) { nativeOnJavaContentViewCoreDestroyed(mNativeContentViewCore); } mWebContents = null; if (mViewAndroid != null) mViewAndroid.destroy(); mNativeContentViewCore = 0; mContentSettings = null; mJavaScriptInterfaces.clear(); mRetainedJavaScriptObjects.clear(); unregisterAccessibilityContentObserver(); mGestureStateListeners.clear(); ScreenOrientationListener.getInstance().removeObserver(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: destroy File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
destroy
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public int delete(Uri uri, String arg1, String[] arg2) { return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete File: provider_src/com/android/email/provider/AttachmentProvider.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3918
MEDIUM
4.3
android
delete
provider_src/com/android/email/provider/AttachmentProvider.java
6b2b0bd7c771c698f11d7be89c2c57c8722c7454
0
Analyze the following code function for security vulnerabilities
@Override public void rewind(String packageName) { mSessionCb.rewind(packageName, Binder.getCallingPid(), Binder.getCallingUid()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rewind 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
rewind
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
private void initQuotedTextFromRefMessage(Message refMessage, int action) { if (mRefMessage != null && (action == REPLY || action == REPLY_ALL || action == FORWARD)) { mQuotedTextView.setQuotedText(action, refMessage, action != FORWARD); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initQuotedTextFromRefMessage File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
initQuotedTextFromRefMessage
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@Override public void onBackStackChanged() { setTitleFromBackStack(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onBackStackChanged File: src/com/android/settings/SettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
onBackStackChanged
src/com/android/settings/SettingsActivity.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
@RequestMapping("scores") @ResponseBody public int scores(@RequestAttribute SysSite site, Long id, HttpServletRequest request) { CmsContentStatistics contentStatistics = statisticsComponent.contentScores(site, id); if (null != contentStatistics && site.getId().equals(contentStatistics.getSiteId())) { return contentStatistics.getScores() + contentStatistics.getScores(); } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scores File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
scores
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
PackageManagerInternal getPackageManagerInternalLocked() { if (mPackageManagerInt == null) { mPackageManagerInt = LocalServices.getService(PackageManagerInternal.class); } return mPackageManagerInt; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageManagerInternalLocked 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
getPackageManagerInternalLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void updateIsAddedByAutoUpgradeFlag(int networkId, int securityType, boolean isAddedByAutoUpgrade) { WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId); if (internalConfig == null) { return; } internalConfig.setSecurityParamsIsAddedByAutoUpgrade(securityType, isAddedByAutoUpgrade); saveToStore(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateIsAddedByAutoUpgradeFlag File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
updateIsAddedByAutoUpgradeFlag
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
protected Map<String, List<String>> buildResponseHeaders(Response response) { Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>(); for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) { List<Object> values = entry.getValue(); List<String> headers = new ArrayList<String>(); for (Object o : values) { headers.add(String.valueOf(o)); } responseHeaders.put(entry.getKey(), headers); } return responseHeaders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildResponseHeaders File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
buildResponseHeaders
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private void scheduleTimeoutLocked(ToastRecord r) { mHandler.removeCallbacksAndMessages(r); Message m = Message.obtain(mHandler, MESSAGE_TIMEOUT, r); long delay = r.duration == Toast.LENGTH_LONG ? LONG_DELAY : SHORT_DELAY; mHandler.sendMessageDelayed(m, delay); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scheduleTimeoutLocked 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
scheduleTimeoutLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
private static boolean shouldOmitAutoUpgradeParams(SecurityParams params) { if (!params.isAddedByAutoUpgrade()) return false; WifiGlobals wifiGlobals = WifiInjector.getInstance().getWifiGlobals(); if (params.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)) { return !wifiGlobals.isWpa3SaeUpgradeEnabled(); } if (params.isSecurityType(WifiConfiguration.SECURITY_TYPE_OWE)) { return !wifiGlobals.isOweUpgradeEnabled(); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldOmitAutoUpgradeParams File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
shouldOmitAutoUpgradeParams
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
public String getEditURL(String action, String mode, XWikiContext context) throws XWikiException { com.xpn.xwiki.XWiki xwiki = context.getWiki(); String language = ""; XWikiDocument tdoc = (XWikiDocument) context.get("tdoc"); String realLang = tdoc.getRealLanguage(context); if ((xwiki.isMultiLingual(context) == true) && (!realLang.equals(""))) { language = realLang; } return getEditURL(action, mode, language, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEditURL File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
getEditURL
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
private void applyCiphers() throws SSLException { debug("JSSEngine: applyCiphers()"); // Enabled the ciphersuites specified by setEnabledCipherSuites(...). // When this isn't called, enabled_ciphers will be null, so we'll just // use whatever is enabled by default. if (enabled_ciphers == null) { return; } // We need to disable the suite if it isn't present in the list of // suites above. Be lazy about it for the time being and disable all // cipher suites first. for (SSLCipher suite : SSLCipher.values()) { if (SSL.CipherPrefSet(ssl_fd, suite.getID(), false) == SSL.SECFailure) { // warn("Unable to set cipher suite preference for " + suite.name() + ": " + errorText(PR.GetError())); } } // Only enable these particular suites. When a cipher suite can't be // enabled it is most likely due to local policy. Log it. Also log // which ciphers were successfully enabled for debugging purposes. for (SSLCipher suite : enabled_ciphers) { if (suite == null) { continue; } if (SSL.CipherPrefSet(ssl_fd, suite.getID(), true) == SSL.SECFailure) { warn("Unable to enable cipher suite " + suite + ": " + errorText(PR.GetError())); } else { debug("Enabled cipher suite " + suite + ": " + errorText(PR.GetError())); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyCiphers File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
applyCiphers
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
private Set<String> getConfigurableDefaultCrossProfilePackages() { List<String> defaultPackages = getDefaultCrossProfilePackages(); return defaultPackages.stream().filter( mInjector.getCrossProfileApps()::canConfigureInteractAcrossProfiles).collect( Collectors.toSet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConfigurableDefaultCrossProfilePackages 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
getConfigurableDefaultCrossProfilePackages
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected Client buildHttpClient() { // use the default client config if not yet initialized if (clientConfig == null) { clientConfig = getDefaultClientConfig(); } ClientBuilder clientBuilder = ClientBuilder.newBuilder(); customizeClientBuilder(clientBuilder); clientBuilder = clientBuilder.withConfig(clientConfig); return clientBuilder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildHttpClient File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
buildHttpClient
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static long getInputDispatchingTimeoutLocked(ProcessRecord r) { if (r != null && (r.instrumentationClass != null || r.usingWrapper)) { return INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT; } return KEY_DISPATCHING_TIMEOUT; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInputDispatchingTimeoutLocked 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
getInputDispatchingTimeoutLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public static Patient getFakePerson() { Patient demo = new Patient(12345); demo.addName(new PersonName("Demo", "The", "Person")); Location l = Context.getLocationService().getAllLocations().iterator().next(); for (PatientIdentifierType pit : Context.getPatientService().getAllPatientIdentifierTypes()) { if (StringUtils.isEmpty(pit.getValidator())) { demo.addIdentifier(new PatientIdentifier("Testing" + pit.getName() + "123", pit, l)); } } demo.setGender("F"); demo.setUuid("testing-html-form-entry"); { Calendar cal = Calendar.getInstance(); cal.add(Calendar.YEAR, -31); demo.setBirthdate(cal.getTime()); } for (PersonAttributeType type : Context.getPersonService().getAllPersonAttributeTypes()) { if (type.getFormat() != null && type.getFormat().equals("java.lang.String")) { demo.addAttribute(new PersonAttribute(type, "Test " + type.getName() + " Attribute")); } } PersonAddress addr = new PersonAddress(); addr.setCityVillage("Rwinkwavu"); addr.setCountyDistrict("Kayonza District"); addr.setStateProvince("Eastern Province"); addr.setCountry("Rwanda"); demo.addAddress(addr); return demo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFakePerson File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
getFakePerson
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
public final void setCustomParameters(final Map<String, String> customParameters) { this.customParameters = customParameters; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCustomParameters File: cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java Repository: apereo/java-cas-client The code follows secure coding practices.
[ "CWE-74" ]
CVE-2014-4172
HIGH
7.5
apereo/java-cas-client
setCustomParameters
cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
ae37092100c8eaec610dab6d83e5e05a8ee58814
0
Analyze the following code function for security vulnerabilities
public byte[] getRoot() { return XMSSUtil.cloneArray(root); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRoot File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
getRoot
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
@Override public boolean resetPassword(@Nullable String password, int flags) throws RemoteException { if (!mLockPatternUtils.hasSecureLockScreen()) { Slogf.w(LOG_TAG, "Cannot reset password when the device has no lock screen"); return false; } if (password == null) password = ""; final CallerIdentity caller = getCallerIdentity(); final int userHandle = caller.getUserId(); // As of R, only privileged caller holding RESET_PASSWORD can call resetPassword() to // set password to an unsecured user. if (hasCallingPermission(permission.RESET_PASSWORD)) { final boolean result = setPasswordPrivileged(password, flags, caller); if (result) { DevicePolicyEventLogger .createEvent(DevicePolicyEnums.RESET_PASSWORD) .write(); } return result; } // If caller has PO (or DO) throw or fail silently depending on its target SDK level. if (isDefaultDeviceOwner(caller) || isProfileOwner(caller)) { synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller); if (getTargetSdk(admin.info.getPackageName(), userHandle) < Build.VERSION_CODES.O) { Slogf.e(LOG_TAG, "DPC can no longer call resetPassword()"); return false; } throw new SecurityException("Device admin can no longer call resetPassword()"); } } // Caller is not DO or PO, could either be unauthorized or Device Admin. synchronized (getLockObject()) { // Legacy device admin cannot call resetPassword either ActiveAdmin admin = getActiveAdminForCallerLocked( null, DeviceAdminInfo.USES_POLICY_RESET_PASSWORD, false); Preconditions.checkCallAuthorization(admin != null, "Unauthorized caller cannot call resetPassword."); if (getTargetSdk(admin.info.getPackageName(), userHandle) <= android.os.Build.VERSION_CODES.M) { Slogf.e(LOG_TAG, "Device admin can no longer call resetPassword()"); return false; } throw new SecurityException("Device admin can no longer call resetPassword()"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetPassword 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
resetPassword
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static Set<Class<?>> getModelClasses() { Set<Class<?>> modelClasses = new HashSet<Class<?>>(); modelClasses.add(KieServerInstance.class); modelClasses.add(KieServerInstanceList.class); modelClasses.add(KieServerInstanceInfo.class); modelClasses.add(KieServerSetup.class); modelClasses.add(KieServerStatus.class); modelClasses.add(ServerInstance.class); modelClasses.add(ServerInstanceKey.class); modelClasses.add(ServerTemplate.class); modelClasses.add(ServerTemplateKey.class); modelClasses.add(ServerConfig.class); modelClasses.add(RuleConfig.class); modelClasses.add(ProcessConfig.class); modelClasses.add(ContainerSpec.class); modelClasses.add(ContainerSpecKey.class); modelClasses.add(Container.class); modelClasses.add(ContainerKey.class); modelClasses.add(ServerTemplateList.class); modelClasses.add(ContainerSpecList.class); return modelClasses; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModelClasses File: kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
getModelClasses
kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
private Map<String, Argument<?>> initializeTypeParameters(Argument[] genericTypes) { Map<String, Argument<?>> typeParameters; if (genericTypes != null && genericTypes.length > 0) { typeParameters = new LinkedHashMap<>(genericTypes.length); for (Argument genericType : genericTypes) { typeParameters.put(genericType.getName(), genericType); } } else { typeParameters = Collections.emptyMap(); } return typeParameters; }
Vulnerability Classification: - CWE: CWE-400 - CVE: CVE-2022-21700 - Severity: MEDIUM - CVSS Score: 5.0 Description: Use ConversionContext constants where possible instead of class (#2356) Changes ------- * Added ArgumentConversionContext constants in ConversionContext * Replaced Argument.of and use of argument classes with ConversionContext constants where possible * Added getFirst method in ConvertibleMultiValues that accepts ArgumentConversionContent parameter Partially addresses issue #2355 Function: initializeTypeParameters File: core/src/main/java/io/micronaut/core/type/DefaultArgument.java Repository: micronaut-projects/micronaut-core Fixed Code: private static Map<String, Argument<?>> initializeTypeParameters(Argument[] genericTypes) { Map<String, Argument<?>> typeParameters; if (genericTypes != null && genericTypes.length > 0) { typeParameters = new LinkedHashMap<>(genericTypes.length); for (Argument genericType : genericTypes) { typeParameters.put(genericType.getName(), genericType); } } else { typeParameters = Collections.emptyMap(); } return typeParameters; }
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
initializeTypeParameters
core/src/main/java/io/micronaut/core/type/DefaultArgument.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
1
Analyze the following code function for security vulnerabilities
void setIngestService(IngestService ingestService) { this.ingestService = ingestService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIngestService File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java Repository: opencast The code follows secure coding practices.
[ "CWE-74" ]
CVE-2020-5230
MEDIUM
5
opencast
setIngestService
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
bbb473f34ab95497d6c432c81285efb0c739f317
0
Analyze the following code function for security vulnerabilities
private static boolean containsHanScript(String s) { return s.codePoints().anyMatch( codepoint -> Character.UnicodeScript.of(codepoint) == Character.UnicodeScript.HAN); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsHanScript File: web/src/main/java/com/zrlog/web/controller/BaseController.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
containsHanScript
web/src/main/java/com/zrlog/web/controller/BaseController.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
public void addAttribute(ProfileAttribute attr) { attrs.add(attr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAttribute File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
addAttribute
base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public static HttpHeaders toArmeria(io.netty.handler.codec.http.HttpHeaders inHeaders) { if (inHeaders.isEmpty()) { return HttpHeaders.of(); } final HttpHeadersBuilder out = HttpHeaders.builder(); out.sizeHint(inHeaders.size()); toArmeria(inHeaders, out); return out.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toArmeria File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
toArmeria
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection delete(final String path1, final String path2, final String path3, final Route.Handler handler) { return new Route.Collection( new Route.Definition[]{delete(path1, handler), delete(path2, handler), delete(path3, handler)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
delete
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public static List<Descriptor<MyViewsTabBar>> getMyViewsTabBarDescriptors() { return MyViewsTabBar.all(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMyViewsTabBarDescriptors 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
getMyViewsTabBarDescriptors
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Override public void run() { Slog.w(TAG, "getAssistContextExtras failed: timeout retrieving from " + activity); synchronized (this) { haveResult = true; notifyAll(); } pendingAssistExtrasTimedOut(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
run
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0