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
@Override public void listPlugins(String projectName, AsyncMethodCallback resultHandler) { unimplemented(resultHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listPlugins File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
listPlugins
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
static int getNotifyId() { return 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotifyId File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getNotifyId
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private boolean consumeWithJarResourceHandler(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException { if (jarResourceHandlers != null) { for (JarResourceHandler jarResourceHandler : jarResourceHandlers) { InputStream stream = jarResourceHandler.getResource(httpRequest); if (stream != null) { httpResponse.setHeader(MimeType.CONTENT_TYPE, MimeType.fromPathInfo(httpRequest.getPathInfo())); customHeaders.forEach(httpResponse::setHeader); //add all user-defined headers to response OutputStream wrappedOutputStream = GzipUtils.checkAndWrap(httpRequest, httpResponse, false); IOUtils.copy(stream, wrappedOutputStream); wrappedOutputStream.flush(); wrappedOutputStream.close(); return true; } } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: consumeWithJarResourceHandler File: src/main/java/spark/staticfiles/StaticFilesConfiguration.java Repository: perwendel/spark The code follows secure coding practices.
[ "CWE-22" ]
CVE-2016-9177
MEDIUM
5
perwendel/spark
consumeWithJarResourceHandler
src/main/java/spark/staticfiles/StaticFilesConfiguration.java
26b57d0596ee73c14c558463943ef0857e53b91f
0
Analyze the following code function for security vulnerabilities
@SafeVarargs public static Pair<ActivityOptions, ExitTransitionCoordinator> startSharedElementAnimation( Window window, ExitTransitionCallbacks exitCallbacks, SharedElementCallback callback, Pair<View, String>... sharedElements) { ActivityOptions opts = new ActivityOptions(); ExitTransitionCoordinator exit = makeSceneTransitionAnimation( exitCallbacks, callback, window, opts, sharedElements); opts.mExitCoordinatorIndex = -1; return Pair.create(opts, exit); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startSharedElementAnimation File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
startSharedElementAnimation
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
private int getCurrentState() { try { return getStateFromProcState(mIActivityManager.getUidProcessState(mUid, null)); } catch (RemoteException e) { Log.e(LOG_TAG, "Couldn't check uid proc state", e); } return STATE_GONE; }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21254 - Severity: HIGH - CVSS Score: 7.8 Description: [1-time permissions] Use internal api to check proc states We need to check the proc state and the binder method has a filter that is affected by a bug that keeps a killed a proces in the "pending top" list. Using the internal api isn't affected by this filter and also is more correct for inprocess calls. Test: Install test app that requests permission and will exit immediately on granting, observe permission is no longer indefinitely held. Bug: 254736794 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e836611f3057cf9eae589a34a39fe80d0a9145f3) Merged-In: I30579090c803b231fd750abbc4ad645805f7ece2 Change-Id: I30579090c803b231fd750abbc4ad645805f7ece2 Function: getCurrentState File: services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java Repository: android Fixed Code: private int getCurrentState() { return getStateFromProcState(mActivityManagerInternal.getUidProcessState(mUid)); }
[ "CWE-Other" ]
CVE-2023-21254
HIGH
7.8
android
getCurrentState
services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
fa539c85503dc63bfb53c76b6f12b3549f14a709
1
Analyze the following code function for security vulnerabilities
void grantUriPermissionUncheckedLocked(int targetUid, String targetPkg, GrantUri grantUri, final int modeFlags, UriPermissionOwner owner) { if (!Intent.isAccessUriMode(modeFlags)) { return; } // So here we are: the caller has the assumed permission // to the uri, and the target doesn't. Let's now give this to // the target. if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION, "Granting " + targetPkg + "/" + targetUid + " permission to " + grantUri); final String authority = grantUri.uri.getAuthority(); final ProviderInfo pi = getProviderInfoLocked(authority, grantUri.sourceUserId); if (pi == null) { Slog.w(TAG, "No content provider found for grant: " + grantUri.toSafeString()); return; } if ((modeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) { grantUri.prefix = true; } final UriPermission perm = findOrCreateUriPermissionLocked( pi.packageName, targetPkg, targetUid, grantUri); perm.grantModes(modeFlags, owner); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: grantUriPermissionUncheckedLocked 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
grantUriPermissionUncheckedLocked
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Deprecated public Map<String, String> getSyncedTables() { return new HashMap<String, String>(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSyncedTables 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
getSyncedTables
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Override public PasspointConfiguration[] newArray(int size) { return new PasspointConfiguration[size]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newArray File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
newArray
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public Set<String> getCacheUrls(String appId, String userviewId, String userviewKey) { HttpServletRequest request = WorkflowUtil.getHttpServletRequest(); String contextPath = request.getContextPath(); Set<String> urls = new HashSet<String>(); urls.add(contextPath + "/web/userview/" + appId + "/" + userviewId + "/"+userviewKey+"/index"); if (!getPropertyString("urlsToCache").isEmpty()) { String urlsToCache = getPropertyString("urlsToCache"); if (urlsToCache != null) { StringTokenizer st = new StringTokenizer(urlsToCache, "\n"); while (st.hasMoreTokens()) { String url = st.nextToken().trim(); if (url.startsWith("/") && !url.startsWith(contextPath)) { url = contextPath + url; } urls.add(url); } } } return urls; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCacheUrls File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
getCacheUrls
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public void moveTaskBackwards(int task) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(task); mRemote.transact(MOVE_TASK_BACKWARDS_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveTaskBackwards File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
moveTaskBackwards
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public long getJMSExpiration() throws JMSException { return this.getLongProperty(JMS_MESSAGE_EXPIRATION); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJMSExpiration File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
getJMSExpiration
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Override public ServerBuilder tls(PrivateKey key, @Nullable String keyPassword, X509Certificate... keyCertChain) { return (ServerBuilder) TlsSetters.super.tls(key, keyPassword, keyCertChain); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tls File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
tls
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("rawtypes") @Override public boolean supports(Class clazz) { return HtmlForm.class.equals(clazz); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: supports File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormValidator.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-24621
MEDIUM
6.5
openmrs/openmrs-module-htmlformentry
supports
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormValidator.java
458597984050461f1c88e4e3a403bf2b060f0844
0
Analyze the following code function for security vulnerabilities
private static APIKey getKey(SubscribedAPI api, String keyType) { List<APIKey> apiKeys = api.getKeys(); return getKeyOfType(apiKeys, keyType); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKey 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
getKey
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
private void ensureSettingsStateLocked(int key) { if (mSettingsStates.get(key) == null) { final int maxBytesPerPackage = getMaxBytesPerPackageForType(getTypeFromKey(key)); SettingsState settingsState = new SettingsState(mLock, getSettingsFile(key), key, maxBytesPerPackage, mHandlerThread.getLooper()); mSettingsStates.put(key, settingsState); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureSettingsStateLocked File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
ensureSettingsStateLocked
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
private boolean nonSuperUser( User currentUser ) { return Objects.nonNull( currentUser ) && !currentUser.isSuper(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nonSuperUser File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java Repository: dhis2/dhis2-core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
nonSuperUser
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
0
Analyze the following code function for security vulnerabilities
public String getURL(EntityReference entityReference, String action, String queryString, String anchor, XWikiContext context) { // TODO: replace this API with a clean implementation of EntityResourceReferenceSerializer // Handle attachment URL if (EntityType.ATTACHMENT.equals(entityReference.getType())) { // Get the full attachment reference AttachmentReference attachmentReference = getCurrentAttachmentResolver().resolve(entityReference); return getAttachmentURL(attachmentReference, action, queryString, context); } // For all other types, we return the URL of the default corresponding document. DocumentReference documentReference = getDocumentReference(entityReference, context); return getURL(documentReference, action, queryString, anchor, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURL 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
getURL
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public ViewPage createPage(String space, String page, String content, String title) { return createPage(Collections.singletonList(space), page, content, title); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createPage 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
createPage
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 setRowBufferColumn(Tuple rowBuffer, int columnIndex, @Nullable Object valueObject) throws SQLException { if (valueObject instanceof PGobject) { String value = ((PGobject) valueObject).getValue(); rowBuffer.set(columnIndex, (value == null) ? null : connection.encodeString(value)); } else { if (valueObject == null) { rowBuffer.set(columnIndex, null); return; } switch (getSQLType(columnIndex + 1)) { // boolean needs to be formatted as t or f instead of true or false case Types.BIT: case Types.BOOLEAN: rowBuffer.set(columnIndex, connection .encodeString((Boolean) valueObject ? "t" : "f")); break; // // toString() isn't enough for date and time types; we must format it correctly // or we won't be able to re-parse it. // case Types.DATE: rowBuffer.set(columnIndex, connection .encodeString( getTimestampUtils().toString( getDefaultCalendar(), (Date) valueObject))); break; case Types.TIME: rowBuffer.set(columnIndex, connection .encodeString( getTimestampUtils().toString( getDefaultCalendar(), (Time) valueObject))); break; case Types.TIMESTAMP: rowBuffer.set(columnIndex, connection.encodeString( getTimestampUtils().toString( getDefaultCalendar(), (Timestamp) valueObject))); break; case Types.NULL: // Should never happen? break; case Types.BINARY: case Types.LONGVARBINARY: case Types.VARBINARY: if (isBinary(columnIndex + 1)) { rowBuffer.set(columnIndex, (byte[]) valueObject); } else { try { rowBuffer.set(columnIndex, PGbytea.toPGString((byte[]) valueObject).getBytes(connection.getEncoding().name())); } catch (UnsupportedEncodingException e) { throw new PSQLException( GT.tr("The JVM claims not to support the encoding: {0}", connection.getEncoding().name()), PSQLState.UNEXPECTED_ERROR, e); } } break; default: rowBuffer.set(columnIndex, connection.encodeString(String.valueOf(valueObject))); break; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRowBufferColumn File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
setRowBufferColumn
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting protected void setRecentTasks(RecentTasks recentTasks) { mRecentTasks = recentTasks; mTaskSupervisor.setRecentTasks(recentTasks); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRecentTasks 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
setRecentTasks
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private int determineLaunchSourceType(int launchFromUid, WindowProcessController caller) { if (launchFromUid == Process.SYSTEM_UID || launchFromUid == Process.ROOT_UID) { return LAUNCH_SOURCE_TYPE_SYSTEM; } if (caller != null) { if (caller.isHomeProcess()) { return LAUNCH_SOURCE_TYPE_HOME; } if (mAtmService.getSysUiServiceComponentLocked().getPackageName() .equals(caller.mInfo.packageName)) { return LAUNCH_SOURCE_TYPE_SYSTEMUI; } } return LAUNCH_SOURCE_TYPE_APPLICATION; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: determineLaunchSourceType 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
determineLaunchSourceType
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public R getFirstBuild() { return builds.oldestBuild(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFirstBuild File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getFirstBuild
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public Class getxWikiClass() { BaseClass bclass = this.getDoc().getXClass(); if (bclass == null) { return null; } else { return new Class(bclass, getXWikiContext()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getxWikiClass 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
getxWikiClass
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 void updateExternalMediaStatus(final boolean mediaStatus, final boolean reportStatus) { int callingUid = Binder.getCallingUid(); if (callingUid != 0 && callingUid != Process.SYSTEM_UID) { throw new SecurityException("Media status can only be updated by the system"); } // reader; this apparently protects mMediaMounted, but should probably // be a different lock in that case. synchronized (mPackages) { Log.i(TAG, "Updating external media status from " + (mMediaMounted ? "mounted" : "unmounted") + " to " + (mediaStatus ? "mounted" : "unmounted")); if (DEBUG_SD_INSTALL) Log.i(TAG, "updateExternalMediaStatus:: mediaStatus=" + mediaStatus + ", mMediaMounted=" + mMediaMounted); if (mediaStatus == mMediaMounted) { final Message msg = mHandler.obtainMessage(UPDATED_MEDIA_STATUS, reportStatus ? 1 : 0, -1); mHandler.sendMessage(msg); return; } mMediaMounted = mediaStatus; } // Queue up an async operation since the package installation may take a // little while. mHandler.post(new Runnable() { public void run() { updateExternalMediaStatusInner(mediaStatus, reportStatus, true); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateExternalMediaStatus 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
updateExternalMediaStatus
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public void onPackageReplaced(ApplicationInfo aInfo) { synchronized (mGlobalLock) { mRootWindowContainer.updateActivityApplicationInfo(aInfo); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPackageReplaced 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
onPackageReplaced
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") protected static void putCacheValue(String key, String val) { int trials = 0; boolean done = false; do { //Exponential? back-off if (trials > 0) { try { Thread.sleep(200 * trials); } catch (InterruptedException e) { } } trials++; try { tokenCache.put(key, val); done = true; } catch(MemcacheServiceException e) { //delay in re-trial is above done = false; } } while(!done && trials < 3); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putCacheValue File: src/main/java/com/mxgraph/online/AbsAuthServlet.java Repository: jgraph/drawio The code follows secure coding practices.
[ "CWE-601", "CWE-918" ]
CVE-2022-1767
MEDIUM
5
jgraph/drawio
putCacheValue
src/main/java/com/mxgraph/online/AbsAuthServlet.java
c63f3a04450f30798df47f9badbc74eb8a69fbdf
0
Analyze the following code function for security vulnerabilities
@Override protected void dump(FileDescriptor fd, final PrintWriter writer, String[] args) { if (mContext.checkCallingOrSelfPermission( android.Manifest.permission.DUMP) != PackageManager.PERMISSION_GRANTED) { writer.println("Permission Denial: can't dump TelecomService " + "from from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()); return; } final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " "); if (mCallsManager != null) { pw.println("CallsManager: "); pw.increaseIndent(); mCallsManager.dump(pw); pw.decreaseIndent(); pw.println("PhoneAccountRegistrar: "); pw.increaseIndent(); mPhoneAccountRegistrar.dump(pw); pw.decreaseIndent(); } Log.dumpCallEvents(pw); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
dump
src/com/android/server/telecom/TelecomServiceImpl.java
2750faaa1ec819eed9acffea7bd3daf867fda444
0
Analyze the following code function for security vulnerabilities
private static <T> T withRequestLocale(Lang lang, Supplier<T> code) { try { LocaleContextHolder.setLocale(lang != null ? lang.toLocale() : null); } catch (Exception e) { // Just continue (Maybe there is no context or some internal error in LocaleContextHolder). // System default locale will be used. } try { return code.get(); } finally { LocaleContextHolder.resetLocaleContext(); // Clean up ThreadLocal } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withRequestLocale File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
withRequestLocale
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
public void fatalError(SAXParseException e) throws SAXException { addValidationException(e); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fatalError File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
fatalError
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
public void initContentCover(SysSite site, CmsContent entity) { entity.setCover(getUrl(site, true, entity.getCover())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initContentCover File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-20914
CRITICAL
9.8
sanluan/PublicCMS
initContentCover
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
0
Analyze the following code function for security vulnerabilities
protected boolean _hasCreatorAnnotation(DeserializationContext ctxt, Annotated ann) { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { JsonCreator.Mode mode = intr.findCreatorAnnotation(ctxt.getConfig(), ann); return (mode != null) && (mode != JsonCreator.Mode.DISABLED); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _hasCreatorAnnotation File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
_hasCreatorAnnotation
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
private RemoteViews makeNotificationHeader(StandardTemplateParams p) { // Headers on their own are never colorized p.disallowColorization(); RemoteViews header = new BuilderRemoteViews(mContext.getApplicationInfo(), R.layout.notification_template_header); resetNotificationHeader(header); bindNotificationHeader(header, p); return header; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeNotificationHeader File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
makeNotificationHeader
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Nullable public String line() { return line; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: line File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java Repository: crate The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
line
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
4e857d675683095945dd524d6ba03e692c70ecd6
0
Analyze the following code function for security vulnerabilities
protected Object transform(final Object obj) { return obj; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transform File: src/main/java/org/projectforge/web/core/JsonBuilder.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-7250
LOW
3.5
micromata/projectforge-webapp
transform
src/main/java/org/projectforge/web/core/JsonBuilder.java
5a6a25366491443b76e528a04a9e4ba26f08a83c
0
Analyze the following code function for security vulnerabilities
public List<ComponentName> getEnabledTrustAgents(int userId) { String serialized = getString(ENABLED_TRUST_AGENTS, userId); if (TextUtils.isEmpty(serialized)) { return null; } String[] split = serialized.split(","); ArrayList<ComponentName> activeTrustAgents = new ArrayList<ComponentName>(split.length); for (String s : split) { if (!TextUtils.isEmpty(s)) { activeTrustAgents.add(ComponentName.unflattenFromString(s)); } } return activeTrustAgents; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnabledTrustAgents 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
getEnabledTrustAgents
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@Override public SaReactorFilter setError(SaFilterErrorStrategy error) { this.error = error; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setError File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
setError
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
@Override public String getLowerFunctionSQL(Column column) { String columnSQL = getColumnSQL(column); return "LOWER(" + columnSQL + ")"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLowerFunctionSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getLowerFunctionSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
private void updateDateTimePosition() { // This one has its own because we have to rebuild it every time the alarm state changes. mAlarmTranslation = new TouchAnimator.Builder() .addFloat(mDateTimeAlarmGroup, "translationY", 0, mAlarmShowing ? mDateTimeAlarmTranslation : mDateTimeTranslation) .build(); mAlarmTranslation.setPosition(mExpansionAmount); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateDateTimePosition File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3886
HIGH
7.2
android
updateDateTimePosition
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
0
Analyze the following code function for security vulnerabilities
public BaseClass getXClass() { if (this.xClass == null) { BaseClass emptyClass = new BaseClass(); // Make sure not to cause any false document versions if this document is saved. emptyClass.setDirty(false); this.setXClass(emptyClass); } return this.xClass; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXClass 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
getXClass
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
static void boostPriorityForLockedSection() { sThreadPriorityBooster.boost(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: boostPriorityForLockedSection 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
boostPriorityForLockedSection
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public Document getTranslatedDocument() throws XWikiException { return this.doc.getTranslatedDocument(getXWikiContext()).newDocument(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTranslatedDocument 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
getTranslatedDocument
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
public boolean isReady() { return mNativePage != null || (mContentViewCore != null && mContentViewCore.isReady()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isReady 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
isReady
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
protected Map<AnnotatedWithParams,BeanPropertyDefinition[]> _findCreatorsFromProperties(DeserializationContext ctxt, BeanDescription beanDesc) throws JsonMappingException { Map<AnnotatedWithParams,BeanPropertyDefinition[]> result = Collections.emptyMap(); for (BeanPropertyDefinition propDef : beanDesc.findProperties()) { Iterator<AnnotatedParameter> it = propDef.getConstructorParameters(); while (it.hasNext()) { AnnotatedParameter param = it.next(); AnnotatedWithParams owner = param.getOwner(); BeanPropertyDefinition[] defs = result.get(owner); final int index = param.getIndex(); if (defs == null) { if (result.isEmpty()) { // since emptyMap is immutable need to create a 'real' one result = new LinkedHashMap<AnnotatedWithParams,BeanPropertyDefinition[]>(); } defs = new BeanPropertyDefinition[owner.getParameterCount()]; result.put(owner, defs); } else { if (defs[index] != null) { ctxt.reportBadTypeDefinition(beanDesc, "Conflict: parameter #%d of %s bound to more than one property; %s vs %s", index, owner, defs[index], propDef); } } defs[index] = propDef; } } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _findCreatorsFromProperties File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
_findCreatorsFromProperties
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
public void setTransWrappedSessionKey(String transWrappedSessionKey) { attributes.put(TRANS_WRAPPED_SESSION_KEY, transWrappedSessionKey); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTransWrappedSessionKey File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setTransWrappedSessionKey
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public boolean performDexOpt(String packageName, String instructionSet, boolean backgroundDexopt) { boolean dexopt = mLazyDexOpt || backgroundDexopt; boolean updateUsage = !backgroundDexopt; // Don't update usage if this is just a backgroundDexopt if (!dexopt && !updateUsage) { // We aren't going to dexopt or update usage, so bail early. return false; } PackageParser.Package p; final String targetInstructionSet; synchronized (mPackages) { p = mPackages.get(packageName); if (p == null) { return false; } if (updateUsage) { p.mLastPackageUsageTimeInMills = System.currentTimeMillis(); } mPackageUsage.write(false); if (!dexopt) { // We aren't going to dexopt, so bail early. return false; } targetInstructionSet = instructionSet != null ? instructionSet : getPrimaryInstructionSet(p.applicationInfo); if (p.mDexOptPerformed.contains(targetInstructionSet)) { return false; } } long callingId = Binder.clearCallingIdentity(); try { synchronized (mInstallLock) { final String[] instructionSets = new String[] { targetInstructionSet }; int result = mPackageDexOptimizer.performDexOpt(p, instructionSets, false /* forceDex */, false /* defer */, true /* inclDependencies */, true /* boot complete */); return result == PackageDexOptimizer.DEX_OPT_PERFORMED; } } finally { Binder.restoreCallingIdentity(callingId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: performDexOpt 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
performDexOpt
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings({"unchecked", "rawtypes"}) @Override public boolean isValid(Object value, ConstraintValidatorContext context) { final ViolationCollector collector = new ViolationCollector(context); context.disableDefaultConstraintViolation(); for (ValidationCaller caller : methodMap.computeIfAbsent(value.getClass(), this::findMethods)) { caller.setValidationObject(value); caller.call(collector); } return !collector.hasViolationOccurred(); }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2020-11002 - Severity: HIGH - CVSS Score: 9.0 Description: Disable message interpolation in ConstraintViolations by default (#3208) Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`. Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation. The message parameters will be escaped by default. Refs #3153 Refs #3157 Function: isValid File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java Repository: dropwizard Fixed Code: @SuppressWarnings({"unchecked", "rawtypes"}) @Override public boolean isValid(Object value, ConstraintValidatorContext context) { final ViolationCollector collector = new ViolationCollector(context, escapeExpressions); context.disableDefaultConstraintViolation(); for (ValidationCaller caller : methodMap.computeIfAbsent(value.getClass(), this::findMethods)) { caller.setValidationObject(value); caller.call(collector); } return !collector.hasViolationOccurred(); }
[ "CWE-74" ]
CVE-2020-11002
HIGH
9
dropwizard
isValid
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java
d5a512f7abf965275f2a6b913ac4fe778e424242
1
Analyze the following code function for security vulnerabilities
@Override public boolean canEditBoolean(Context context, Collection collection, boolean useInheritance) throws SQLException { try { canEdit(context, collection, useInheritance); return true; } catch (AuthorizeException e) { return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canEditBoolean File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41189
HIGH
9
DSpace
canEditBoolean
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
0
Analyze the following code function for security vulnerabilities
@Override public void setPasswordExpirationTimeout(ComponentName who, String callerPackageName, long timeout, boolean parent) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return; } if (!isPermissionCheckFlagEnabled()) { Objects.requireNonNull(who, "ComponentName is null"); } Preconditions.checkArgumentNonnegative(timeout, "Timeout must be >= 0 ms"); int userHandle = mInjector.userHandleGetCallingUserId(); int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle; synchronized (getLockObject()) { ActiveAdmin ap; if (isPermissionCheckFlagEnabled()) { CallerIdentity caller = getCallerIdentity(who, callerPackageName); ap = enforcePermissionAndGetEnforcingAdmin( who, MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS, caller.getPackageName(), affectedUserId) .getActiveAdmin(); } else { ap = getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_EXPIRE_PASSWORD, parent); } // Calling this API automatically bumps the expiration date final long expiration = timeout > 0L ? (timeout + System.currentTimeMillis()) : 0L; ap.passwordExpirationDate = expiration; ap.passwordExpirationTimeout = timeout; if (timeout > 0L) { Slogf.w(LOG_TAG, "setPasswordExpiration(): password will expire on " + DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT) .format(new Date(expiration))); } saveSettingsLocked(userHandle); // in case this is the first one, set the alarm on the appropriate user. setExpirationAlarmCheckLocked(mContext, userHandle, parent); } if (SecurityLog.isLoggingEnabled()) { SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_EXPIRATION_SET, callerPackageName, userHandle, affectedUserId, timeout); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPasswordExpirationTimeout 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
setPasswordExpirationTimeout
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void removeUsageRights() { PdfDictionary perms = catalog.getAsDict(PdfName.PERMS); if (perms == null) return; perms.remove(PdfName.UR); perms.remove(PdfName.UR3); if (perms.size() == 0) catalog.remove(PdfName.PERMS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUsageRights File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
removeUsageRights
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
final void add(CharSequence name, Iterable<String> values) { final AsciiString normalizedName = normalizeName(name); requireNonNull(values, "values"); final int h = normalizedName.hashCode(); final int i = index(h); for (String v : values) { requireNonNullElement(values, v); add0(h, i, normalizedName, v); } }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2019-16771 - Severity: MEDIUM - CVSS Score: 5.0 Description: Merge pull request from GHSA-35fr-h7jr-hh86 Motivation: An `HttpService` can produce a malformed HTTP response when a user specified a malformed HTTP header values, such as: ResponseHeaders.of(HttpStatus.OK "my-header", "foo\r\nbad-header: bar"); Modification: - Add strict header value validation to `HttpHeadersBase` - Add strict header name validation to `HttpHeaderNames.of()`, which is used by `HttpHeadersBase`. Result: - It is not possible anymore to send a bad header value which can be misused for sending additional headers or injecting arbitrary content. Function: add File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria Fixed Code: final void add(CharSequence name, Iterable<String> values) { final AsciiString normalizedName = HttpHeaderNames.of(name); requireNonNull(values, "values"); final int h = normalizedName.hashCode(); final int i = index(h); for (String v : values) { requireNonNullElement(values, v); add0(h, i, normalizedName, v); } }
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
add
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
1
Analyze the following code function for security vulnerabilities
@Nullable private String getConnectingBssidInternal() { return mTargetBssid; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnectingBssidInternal 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
getConnectingBssidInternal
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private boolean launchedFromSystemSurface() { return mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEM || mLaunchSourceType == LAUNCH_SOURCE_TYPE_HOME || mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEMUI; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: launchedFromSystemSurface 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
launchedFromSystemSurface
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public final synchronized DataSource getDataSource() throws SQLException { if (datasource == null) { // Force the creation of the underlying backing store. It will invokes // (indirectly) createBackingStore, which will fetch the DataSource. if (!super.isAvailable()) { // Connection failed, but the exception is not available. datasource = null; throw new SQLException(Errors.format(ErrorKeys.NO_DATA_SOURCE)); } } return datasource; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDataSource File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
getDataSource
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
public String getConcatFunctionSQL(Column[] columns, String begin, String end, String separator) { StringBuilder out = new StringBuilder(); out.append(begin); for (int i = 0; i < columns.length; i++) { if (i > 0) out.append(separator); Column column = columns[i]; ColumnType type = column.getType(); if (ColumnType.LABEL.equals(type) || ColumnType.TEXT.equals(type)) { out.append("'").append(column.getName()).append("'"); } else { // Cast needed out.append(getColumnCastSQL(column)); } } out.append(end); return out.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConcatFunctionSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getConcatFunctionSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
public static Element createElement(String tag) { return document.createElement(tag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createElement File: src/edu/stanford/nlp/time/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
createElement
src/edu/stanford/nlp/time/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
public boolean isApplyActivityFlagsForBubbles() { return mApplyActivityFlagsForBubbles; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isApplyActivityFlagsForBubbles File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
isApplyActivityFlagsForBubbles
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (obj instanceof XWikiAttachmentToRemove) { return this.attachment.equals(((XWikiAttachmentToRemove) obj).getAttachment()); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals 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
equals
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 <T> void doStreamGet( SQLConnection connection, boolean transactionMode, String table, Class<T> clazz, String fieldName, String where, boolean returnIdField, boolean setId, List<FacetField> facets, String distinctOn, Handler<T> streamHandler, Handler<AsyncResult<Void>> replyHandler ) { vertx.runOnContext(v1 -> { try { QueryHelper queryHelper = buildSelectQueryHelper(transactionMode, table, fieldName, where, returnIdField, facets, distinctOn); connection.queryStream(queryHelper.selectQuery, stream -> { if (stream.succeeded()) { SQLRowStream sqlRowStream = stream.result(); ResultsHelper<T> resultsHelper = new ResultsHelper<>(sqlRowStream, clazz, setId); boolean isAuditFlavored = isAuditFlavored(resultsHelper.clazz); Map<String, Method> externalColumnSettters = getExternalColumnSetters( resultsHelper.columnNames, resultsHelper.clazz, isAuditFlavored ); String idPropName = databaseFieldToPojoSetter(ID_FIELD); sqlRowStream.resultSetClosedHandler(v -> sqlRowStream.moreResults()).handler(r -> { JsonObject row = convertRowStreamArrayToObject(sqlRowStream, r); try { streamHandler.handle((T) deserializeRow(resultsHelper, externalColumnSettters, isAuditFlavored, idPropName, row)); } catch (Exception e) { sqlRowStream.close(); if (!transactionMode) { connection.close(); } log.error(e.getMessage(), e); replyHandler.handle(Future.failedFuture(e)); } }).endHandler(v2 -> { if (!transactionMode) { connection.close(); } replyHandler.handle(Future.succeededFuture()); }); } else { if (!transactionMode) { connection.close(); } log.error(stream.cause().getMessage(), stream.cause()); replyHandler.handle(Future.failedFuture(stream.cause())); } }); } catch (Exception e) { if (!transactionMode) { connection.close(); } log.error(e.getMessage(), e); replyHandler.handle(Future.failedFuture(e)); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doStreamGet 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
doStreamGet
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public String getEditorCancelCaption() { return getState(false).editorCancelCaption; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEditorCancelCaption 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
getEditorCancelCaption
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void assignApplicationRole(String applicationName, String username) throws IdentityApplicationManagementException { boolean validateRoles = ApplicationMgtUtil.validateRoles(); if (!validateRoles) { if (log.isDebugEnabled()) { log.debug("Validating user with application roles is disabled. Therefore, the application " + "role will not be assigned to user: " + username); } return; } String roleName = getAppRoleName(applicationName); String[] newRoles = {roleName}; try { // assign new application role to the user. UserRealm realm = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm(); if (realm != null) { if (((AbstractUserStoreManager) realm.getUserStoreManager()).isUserInRole(username, roleName)) { if (log.isDebugEnabled()) { log.debug("The user: " + username + " is already having the role: " + roleName); } } else { realm.getUserStoreManager().updateRoleListOfUser(username, null, newRoles); if (log.isDebugEnabled()) { log.debug("Assigning application role : " + roleName + " to the user : " + username); } } } } catch (UserStoreException e) { throw new IdentityApplicationManagementException("Error while assigning application role: " + roleName + " to the user: " + username, e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assignApplicationRole 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
assignApplicationRole
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 int getTokenExpirationAdvance() { return isExpireSessionWithToken() ? tokenExpirationAdvance : -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTokenExpirationAdvance File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
getTokenExpirationAdvance
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
@Override public void setInjectedCode(final String injectedCode) { this.injectedCode = injectedCode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInjectedCode File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java Repository: gchq/stroom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
setInjectedCode
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
0
Analyze the following code function for security vulnerabilities
public boolean isWifiPasspointEnabled() { return mEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWifiPasspointEnabled File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
isWifiPasspointEnabled
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public Object getObjectInstance(Object refObject, Name name, Context nameCtx, Hashtable environment) throws Exception { Object instance = null; if (refObject instanceof Reference) { Reference ref = (Reference) refObject; RefAddr addr = ref.get(SERVICE_CLASSNAME); Object obj = null; // If an explicit service classname is provided, then this is a // generated Service class. Just use its default constructor. if (addr != null && (obj = addr.getContent()) instanceof String) { instance = ClassUtils.forName((String) obj).newInstance(); } // else this is an instance of the Service class, so grab the // reference data... else { // Get the WSDL location... addr = ref.get(WSDL_LOCATION); if (addr != null && (obj = addr.getContent()) instanceof String) { URL wsdlLocation = new URL((String) obj); // Build the service qname... addr = ref.get(SERVICE_NAMESPACE); if (addr != null && (obj = addr.getContent()) instanceof String) { String namespace = (String) obj; addr = ref.get(SERVICE_LOCAL_PART); if (addr != null && (obj = addr.getContent()) instanceof String) { String localPart = (String) obj; QName serviceName = new QName(namespace, localPart); // Construct an instance of the service Class[] formalArgs = new Class[] {URL.class, QName.class}; Object[] actualArgs = new Object[] {wsdlLocation, serviceName}; Constructor ctor = Service.class.getDeclaredConstructor( formalArgs); instance = ctor.newInstance(actualArgs); } } } } // If maintainSession should be set to true, there will be an // addr for it. addr = ref.get(MAINTAIN_SESSION); if (addr != null && instance instanceof Service) { ((Service) instance).setMaintainSession(true); } } return instance; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObjectInstance File: axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java Repository: apache/axis-axis1-java The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-51441
HIGH
7.2
apache/axis-axis1-java
getObjectInstance
axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
685c309febc64aa393b2d64a05f90e7eb9f73e06
0
Analyze the following code function for security vulnerabilities
@Override public void addConferenceCall(String callId, ParcelableConference parcelableConference, Session.Info sessionInfo) { Log.startSession(sessionInfo, LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL, mPackageAbbreviation); if (parcelableConference.getConnectElapsedTimeMillis() != 0 && mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { Log.w(this, "addConferenceCall from caller without permission!"); parcelableConference = new ParcelableConference.Builder( parcelableConference.getPhoneAccount(), parcelableConference.getState()) .setConnectionCapabilities(parcelableConference.getConnectionCapabilities()) .setConnectionProperties(parcelableConference.getConnectionProperties()) .setConnectionIds(parcelableConference.getConnectionIds()) .setVideoAttributes(parcelableConference.getVideoProvider(), parcelableConference.getVideoState()) .setStatusHints(parcelableConference.getStatusHints()) .setExtras(parcelableConference.getExtras()) .setAddress(parcelableConference.getHandle(), parcelableConference.getHandlePresentation()) // no caller display name set. .setDisconnectCause(parcelableConference.getDisconnectCause()) .setRingbackRequested(parcelableConference.isRingbackRequested()) .build(); } long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { if (mCallIdMapper.getCall(callId) != null) { Log.w(this, "Attempting to add a conference call using an existing " + "call id %s", callId); return; } logIncoming("addConferenceCall %s %s [%s]", callId, parcelableConference, parcelableConference.getConnectionIds()); // Make sure that there's at least one valid call. For remote connections // we'll get a add conference msg from both the remote connection service // and from the real connection service. boolean hasValidCalls = false; for (String connId : parcelableConference.getConnectionIds()) { if (mCallIdMapper.getCall(connId) != null) { hasValidCalls = true; } } // But don't bail out if the connection count is 0, because that is a valid // IMS conference state. if (!hasValidCalls && parcelableConference.getConnectionIds().size() > 0) { Log.d(this, "Attempting to add a conference with no valid calls"); return; } PhoneAccountHandle phAcc = null; if (parcelableConference != null && parcelableConference.getPhoneAccount() != null) { phAcc = parcelableConference.getPhoneAccount(); } Bundle connectionExtras = parcelableConference.getExtras(); String connectIdToCheck = null; if (connectionExtras != null && connectionExtras .containsKey(Connection.EXTRA_ORIGINAL_CONNECTION_ID)) { // Conference was added via a connection manager, see if its original id is // known. connectIdToCheck = connectionExtras .getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID); } else { connectIdToCheck = callId; } Call conferenceCall; // Check to see if this conference has already been added. Call alreadyAddedConnection = mCallsManager .getAlreadyAddedConnection(connectIdToCheck); if (alreadyAddedConnection != null && mCallIdMapper.getCall(callId) == null) { // We are currently attempting to add the conference via a connection mgr, // and the originating ConnectionService has already added it. Instead of // making a new Telecom call, we will simply add it to the ID mapper here, // and replace the ConnectionService on the call. mCallIdMapper.addCall(alreadyAddedConnection, callId); alreadyAddedConnection.replaceConnectionService( ConnectionServiceWrapper.this); conferenceCall = alreadyAddedConnection; } else { // need to create a new Call Call newConferenceCall = mCallsManager.createConferenceCall(callId, phAcc, parcelableConference); mCallIdMapper.addCall(newConferenceCall, callId); newConferenceCall.setConnectionService(ConnectionServiceWrapper.this); conferenceCall = newConferenceCall; } Log.d(this, "adding children to conference %s phAcc %s", parcelableConference.getConnectionIds(), phAcc); for (String connId : parcelableConference.getConnectionIds()) { Call childCall = mCallIdMapper.getCall(connId); Log.d(this, "found child: %s", connId); if (childCall != null) { childCall.setParentAndChildCall(conferenceCall); } } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21283 - Severity: MEDIUM - CVSS Score: 5.5 Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15) Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Function: addConferenceCall File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android Fixed Code: @Override public void addConferenceCall(String callId, ParcelableConference parcelableConference, Session.Info sessionInfo) { Log.startSession(sessionInfo, LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL, mPackageAbbreviation); UserHandle callingUserHandle = Binder.getCallingUserHandle(); // Check status hints image for cross user access if (parcelableConference.getStatusHints() != null) { Icon icon = parcelableConference.getStatusHints().getIcon(); parcelableConference.getStatusHints().setIcon(StatusHints. validateAccountIconUserBoundary(icon, callingUserHandle)); } if (parcelableConference.getConnectElapsedTimeMillis() != 0 && mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { Log.w(this, "addConferenceCall from caller without permission!"); parcelableConference = new ParcelableConference.Builder( parcelableConference.getPhoneAccount(), parcelableConference.getState()) .setConnectionCapabilities(parcelableConference.getConnectionCapabilities()) .setConnectionProperties(parcelableConference.getConnectionProperties()) .setConnectionIds(parcelableConference.getConnectionIds()) .setVideoAttributes(parcelableConference.getVideoProvider(), parcelableConference.getVideoState()) .setStatusHints(parcelableConference.getStatusHints()) .setExtras(parcelableConference.getExtras()) .setAddress(parcelableConference.getHandle(), parcelableConference.getHandlePresentation()) // no caller display name set. .setDisconnectCause(parcelableConference.getDisconnectCause()) .setRingbackRequested(parcelableConference.isRingbackRequested()) .build(); } long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { if (mCallIdMapper.getCall(callId) != null) { Log.w(this, "Attempting to add a conference call using an existing " + "call id %s", callId); return; } logIncoming("addConferenceCall %s %s [%s]", callId, parcelableConference, parcelableConference.getConnectionIds()); // Make sure that there's at least one valid call. For remote connections // we'll get a add conference msg from both the remote connection service // and from the real connection service. boolean hasValidCalls = false; for (String connId : parcelableConference.getConnectionIds()) { if (mCallIdMapper.getCall(connId) != null) { hasValidCalls = true; } } // But don't bail out if the connection count is 0, because that is a valid // IMS conference state. if (!hasValidCalls && parcelableConference.getConnectionIds().size() > 0) { Log.d(this, "Attempting to add a conference with no valid calls"); return; } PhoneAccountHandle phAcc = null; if (parcelableConference != null && parcelableConference.getPhoneAccount() != null) { phAcc = parcelableConference.getPhoneAccount(); } Bundle connectionExtras = parcelableConference.getExtras(); String connectIdToCheck = null; if (connectionExtras != null && connectionExtras .containsKey(Connection.EXTRA_ORIGINAL_CONNECTION_ID)) { // Conference was added via a connection manager, see if its original id is // known. connectIdToCheck = connectionExtras .getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID); } else { connectIdToCheck = callId; } Call conferenceCall; // Check to see if this conference has already been added. Call alreadyAddedConnection = mCallsManager .getAlreadyAddedConnection(connectIdToCheck); if (alreadyAddedConnection != null && mCallIdMapper.getCall(callId) == null) { // We are currently attempting to add the conference via a connection mgr, // and the originating ConnectionService has already added it. Instead of // making a new Telecom call, we will simply add it to the ID mapper here, // and replace the ConnectionService on the call. mCallIdMapper.addCall(alreadyAddedConnection, callId); alreadyAddedConnection.replaceConnectionService( ConnectionServiceWrapper.this); conferenceCall = alreadyAddedConnection; } else { // need to create a new Call Call newConferenceCall = mCallsManager.createConferenceCall(callId, phAcc, parcelableConference); mCallIdMapper.addCall(newConferenceCall, callId); newConferenceCall.setConnectionService(ConnectionServiceWrapper.this); conferenceCall = newConferenceCall; } Log.d(this, "adding children to conference %s phAcc %s", parcelableConference.getConnectionIds(), phAcc); for (String connId : parcelableConference.getConnectionIds()) { Call childCall = mCallIdMapper.getCall(connId); Log.d(this, "found child: %s", connId); if (childCall != null) { childCall.setParentAndChildCall(conferenceCall); } } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
addConferenceCall
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
1
Analyze the following code function for security vulnerabilities
@Override protected JDBCDataStore createDataStoreInternal(JDBCDataStore dataStore, Map<String, ?> params) throws IOException { return delegate.createDataStoreInternal(dataStore, params); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createDataStoreInternal File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
createDataStoreInternal
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
@Override public void startLocalVoiceInteraction(IBinder callingActivity, Bundle options) throws RemoteException { Slog.i(TAG, "Activity tried to startVoiceInteraction"); synchronized (this) { ActivityRecord activity = getFocusedStack().getTopActivity(); if (ActivityRecord.forTokenLocked(callingActivity) != activity) { throw new SecurityException("Only focused activity can call startVoiceInteraction"); } if (mRunningVoice != null || activity.getTask().voiceSession != null || activity.voiceSession != null) { Slog.w(TAG, "Already in a voice interaction, cannot start new voice interaction"); return; } if (activity.pendingVoiceInteractionStart) { Slog.w(TAG, "Pending start of voice interaction already."); return; } activity.pendingVoiceInteractionStart = true; } LocalServices.getService(VoiceInteractionManagerInternal.class) .startLocalVoiceInteraction(callingActivity, options); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startLocalVoiceInteraction 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
startLocalVoiceInteraction
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void setIgnoreAttributesGeneration(Boolean ignoreAttributes) { if (ignoreAttributes == Boolean.TRUE) { this.attribManager = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIgnoreAttributesGeneration File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
setIgnoreAttributesGeneration
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
public void updateMultiTouchZoomSupport(boolean supportsMultiTouchZoom) { if (mNativeContentViewCore == 0) return; nativeSetMultiTouchZoomSupportEnabled(mNativeContentViewCore, supportsMultiTouchZoom); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateMultiTouchZoomSupport 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
updateMultiTouchZoomSupport
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public @NonNull String getUniqueId() { if (mCredential == null || mHomeSp == null || TextUtils.isEmpty(mHomeSp.getFqdn())) { throw new IllegalStateException("Credential or HomeSP are not initialized"); } StringBuilder sb = new StringBuilder(); sb.append(String.format("%s_%x%x", mHomeSp.getFqdn(), mHomeSp.getUniqueId(), mCredential.getUniqueId())); return sb.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUniqueId File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
getUniqueId
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public static X509Certificate[][] unsafeGetCertsWithoutVerification(String apkFile) throws SignatureNotFoundException, SecurityException, IOException { VerifiedSigner vSigner = verify(apkFile, false); return vSigner.certs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unsafeGetCertsWithoutVerification File: core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
unsafeGetCertsWithoutVerification
core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
84df68840b6f2407146e722ebd95a7d8bc6e3529
0
Analyze the following code function for security vulnerabilities
public int read(float[] 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
private void updateAgentDetailsIfNeeded(HttpServletRequest pReq) { // Lookup the Agent URL if needed AgentDetails details = backendManager.getAgentDetails(); if (details.isInitRequired()) { synchronized (details) { if (details.isInitRequired()) { if (details.isUrlMissing()) { String url = getBaseUrl(NetworkUtil.sanitizeLocalUrl(pReq.getRequestURL().toString()), extractServletPath(pReq)); details.setUrl(url); } if (details.isSecuredMissing()) { details.setSecured(pReq.getAuthType() != null); } details.seal(); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateAgentDetailsIfNeeded File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
updateAgentDetailsIfNeeded
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
String render(String templateContent, Map<String, Object> context);
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2022-24881 - Severity: HIGH - CVSS Score: 7.5 Description: :lock: 修改模板引擎的默认安全策略,以防止RCE Function: render File: ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/engine/TemplateEngine.java Repository: ballcat-projects/ballcat-codegen Fixed Code: String render(String templateContent, Map<String, Object> context) throws TemplateRenderException;
[ "CWE-20" ]
CVE-2022-24881
HIGH
7.5
ballcat-projects/ballcat-codegen
render
ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/engine/TemplateEngine.java
84a7cb38daf0295b93aba21d562ec627e4eb463b
1
Analyze the following code function for security vulnerabilities
PackageManager getPackageManager(int userId) { try { return createContextAsUser(UserHandle.of(userId)).getPackageManager(); } catch (NameNotFoundException e) { throw new IllegalStateException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageManager 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
getPackageManager
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public long getLong(String key, long defaultValue, int userId) throws RemoteException { checkReadPermission(key, userId); String value = getStringUnchecked(key, null, userId); return TextUtils.isEmpty(value) ? defaultValue : Long.parseLong(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLong File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
getLong
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@Deprecated @Override public void removeContentProviderExternal(String name, IBinder token) { traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "removeContentProviderExternal: ", name); try { removeContentProviderExternalAsUser(name, token, UserHandle.getCallingUserId()); } finally { Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeContentProviderExternal File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
removeContentProviderExternal
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public ShortcutInfo deleteLongLivedWithId(@NonNull String shortcutId, boolean ignoreInvisible) { final ShortcutInfo shortcut = findShortcutById(shortcutId); if (shortcut != null) { mutateShortcut(shortcutId, null, si -> si.clearFlags(ShortcutInfo.FLAG_CACHED_ALL)); } return deleteOrDisableWithId( shortcutId, /* disable =*/ false, /* overrideImmutable=*/ false, ignoreInvisible, ShortcutInfo.DISABLED_REASON_NOT_DISABLED, /*ignorePersistedShortcuts=*/ false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteLongLivedWithId 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
deleteLongLivedWithId
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") public List<SsurgeonPattern> readFromFile(File file) throws Exception { List<SsurgeonPattern> retList = new ArrayList<>(); Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file); if (VERBOSE) System.out.println("Reading ssurgeon file="+file.getAbsolutePath()); NodeList patternNodes = doc.getElementsByTagName(SsurgeonPattern.SSURGEON_ELEM_TAG); for (int i=0; i<patternNodes.getLength(); i++) { Node node = patternNodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Element elt = (Element) node; SsurgeonPattern pattern = ssurgeonPatternFromXML(elt); retList.add(pattern); } } NodeList resourceNodes = doc.getElementsByTagName(SsurgeonPattern.RESOURCE_TAG); for (int i=0; i < resourceNodes.getLength(); i++) { Node node = patternNodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Element resourceElt = (Element) node; SsurgeonWordlist wlRsrc = new SsurgeonWordlist(resourceElt); addResource(wlRsrc); } } return retList; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2021-3878 - Severity: HIGH - CVSS Score: 7.5 Description: Missed a couple possibly unsafe XMLUtils Function: readFromFile File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java Repository: stanfordnlp/CoreNLP Fixed Code: @SuppressWarnings("unchecked") public List<SsurgeonPattern> readFromFile(File file) throws Exception { List<SsurgeonPattern> retList = new ArrayList<>(); Document doc = XMLUtils.safeDocumentBuilderFactory().newDocumentBuilder().parse(file); if (VERBOSE) System.out.println("Reading ssurgeon file="+file.getAbsolutePath()); NodeList patternNodes = doc.getElementsByTagName(SsurgeonPattern.SSURGEON_ELEM_TAG); for (int i=0; i<patternNodes.getLength(); i++) { Node node = patternNodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Element elt = (Element) node; SsurgeonPattern pattern = ssurgeonPatternFromXML(elt); retList.add(pattern); } } NodeList resourceNodes = doc.getElementsByTagName(SsurgeonPattern.RESOURCE_TAG); for (int i=0; i < resourceNodes.getLength(); i++) { Node node = patternNodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { Element resourceElt = (Element) node; SsurgeonWordlist wlRsrc = new SsurgeonWordlist(resourceElt); addResource(wlRsrc); } } return retList; }
[ "CWE-611" ]
CVE-2021-3878
HIGH
7.5
stanfordnlp/CoreNLP
readFromFile
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
e5bbe135a02a74b952396751ed3015e8b8252e99
1
Analyze the following code function for security vulnerabilities
@Override public Experiment replace(K8sClient api) { try { // Using apply yaml patch, field manager must be set, and it must be forced. // https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management PatchOptions patchOptions = new PatchOptions(); patchOptions.setFieldManager(getExperimentId()); patchOptions.setForce(true); if (LOG.isDebugEnabled()) { LOG.debug("Patch PyTorchJob resource: \n{}", YamlUtils.toPrettyYaml(this)); } PyTorchJob pyTorchJob = api.getPyTorchJobClient() .patch(getMetadata().getNamespace(), getMetadata().getName(), V1Patch.PATCH_FORMAT_APPLY_YAML, new V1Patch(JsonUtils.toJson(this)), patchOptions) .throwsApiException().getObject(); return parseExperimentResponseObject(pyTorchJob, PyTorchJob.class); } catch (ApiException e) { throw new SubmarineRuntimeException(e.getCode(), e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: replace File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java Repository: apache/submarine The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-46302
CRITICAL
9.8
apache/submarine
replace
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
0
Analyze the following code function for security vulnerabilities
@Override protected boolean isScrolledToBottom() { if (!isInSettings()) { return mStatusBar.getBarState() == StatusBarState.KEYGUARD || mNotificationStackScroller.isScrolledToBottom(); } else { return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isScrolledToBottom File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isScrolledToBottom
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public String getXClassXML() { return this.xClassXML; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXClassXML 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
getXClassXML
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
void updateCpuStatsNow() { mAppProfiler.updateCpuStatsNow(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateCpuStatsNow File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
updateCpuStatsNow
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public synchronized void write(byte[] b) throws IOException { write(b, 0, b.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
write
guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
private static native boolean nativeResolveAttrs(long ptr, long themePtr, @AttrRes int defStyleAttr, @StyleRes int defStyleRes, @Nullable int[] inValues, @NonNull int[] inAttrs, @NonNull int[] outValues, @NonNull int[] outIndices);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeResolveAttrs File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeResolveAttrs
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public Map<KexProposalOption, String> getKexNegotiationResult() { return unmodNegotiationResult; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKexNegotiationResult File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
getKexNegotiationResult
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
public static final void killProcessQuiet(int pid) { sendSignalQuiet(pid, SIGNAL_KILL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killProcessQuiet File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
killProcessQuiet
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
private String quoted(final String dn) { String temp = dn.trim(); if (temp.startsWith("\"") && temp.endsWith("\"")) { return temp; } return "\"" + temp + "\""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: quoted File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java Repository: wildfly-security/jboss-negotiation The code follows secure coding practices.
[ "CWE-200" ]
CVE-2015-1849
MEDIUM
4.3
wildfly-security/jboss-negotiation
quoted
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
0
Analyze the following code function for security vulnerabilities
@Override @CacheEvict(value={CacheConstant.SYS_USERS_CACHE}, allEntries=true) public boolean revertLogicDeleted(List<String> userIds, SysUser updateEntity) { String ids = String.format("'%s'", String.join("','", userIds)); return userMapper.revertLogicDeleted(ids, updateEntity) > 0; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2022-45208 - Severity: MEDIUM - CVSS Score: 4.3 Description: /sys/user/putRecycleBin is affected by sql injection #4126 /sys/user/deleteRecycleBin is affected by sql injection #4125 Function: revertLogicDeleted File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java Repository: jeecgboot/jeecg-boot Fixed Code: @Override @CacheEvict(value={CacheConstant.SYS_USERS_CACHE}, allEntries=true) public boolean revertLogicDeleted(List<String> userIds, SysUser updateEntity) { return userMapper.revertLogicDeleted(userIds, updateEntity) > 0; }
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
revertLogicDeleted
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
1
Analyze the following code function for security vulnerabilities
@Override public void onCleanupUser(int userHandle) { mLockSettingsService.onCleanupUser(userHandle); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCleanupUser File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
onCleanupUser
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
boolean extractPkcs12(String password) { try { return extractPkcs12Internal(password); } catch (Exception e) { Log.w(TAG, "extractPkcs12(): " + e, e); return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractPkcs12 File: src/com/android/certinstaller/CredentialHelper.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2422
HIGH
9.3
android
extractPkcs12
src/com/android/certinstaller/CredentialHelper.java
70dde9870e9450e10418a32206ac1bb30f036b2c
0
Analyze the following code function for security vulnerabilities
@Override public void removeIssueParentLink(IssuesUpdateRequest request) { // 添加方法体逻辑可重写改方法 }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeIssueParentLink File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
removeIssueParentLink
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private FileVO[] getAttachments(Message mess, UriInfo uriInfo) { VFSContainer container = fom.getMessageContainer(mess.getForum().getKey(), mess.getKey()); List<FileVO> attachments = new ArrayList<>(); for(VFSItem item: container.getItems(new VFSSystemItemFilter())) { UriBuilder attachmentUri = uriInfo.getBaseUriBuilder().path("repo") .path("forums").path(mess.getForum().getKey().toString()) .path("posts").path(mess.getKey().toString()) .path("attachments").path(format(item.getName())); String uri = attachmentUri.build().toString(); if(item instanceof VFSLeaf) { attachments.add(new FileVO("self", uri, item.getName(), ((VFSLeaf)item).getSize())); } else { attachments.add(new FileVO("self", uri, item.getName())); } } FileVO[] attachmentArr = new FileVO[attachments.size()]; attachmentArr = attachments.toArray(attachmentArr); return attachmentArr; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttachments File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
getAttachments
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
@Override public Fragment create() { try { Fragment fragment = mClass.getConstructor().newInstance(); return fragment; } catch (Exception e) { Log.w(TAG, "Cannot show fragment", e); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: src/com/android/settings/homepage/SettingsHomepageActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21256
HIGH
7.8
android
create
src/com/android/settings/homepage/SettingsHomepageActivity.java
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
0
Analyze the following code function for security vulnerabilities
String getTextBreadCrumb(String html) throws IOException { HtmlCleaner cleaner = new HtmlCleaner(); return cleaner.cleanHtmlFragment(html); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTextBreadCrumb File: core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
getTextBreadCrumb
core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
public static String readInputStream(InputStream stream) throws IOException { BufferedReader reader = new BufferedReader( new InputStreamReader(stream)); StringBuffer result = new StringBuffer(); String tmp = reader.readLine(); while (tmp != null) { result.append(tmp.trim()); tmp = reader.readLine(); } reader.close(); return result.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readInputStream File: etc/build/Xml2Js.java Repository: jgraph/drawio The code follows secure coding practices.
[ "CWE-284", "CWE-79" ]
CVE-2022-3065
HIGH
7.5
jgraph/drawio
readInputStream
etc/build/Xml2Js.java
59887e45b36f06c8dd4919a32bacd994d9f084da
0
Analyze the following code function for security vulnerabilities
Builder setRequestCode(int reqCode) { mRequestCode = reqCode; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequestCode 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
setRequestCode
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@JsonProperty("KeyAlgorithmOID") public String getKeyAlgorithmOID() { return keyAlgorithmOID; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKeyAlgorithmOID 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
getKeyAlgorithmOID
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public CopyBuildTask inAsset(String assetsPath) { setName("copy asset: " + assetsPath); return inStream(context -> { try { return context.getResources().getAssets().open(assetsPath); } catch (IOException e) { e.printStackTrace(); return null; } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inAsset File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java Repository: Calsign/APDE The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36628
CRITICAL
9.8
Calsign/APDE
inAsset
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
c6d64cbe465348c1bfd211122d89e3117afadecf
0
Analyze the following code function for security vulnerabilities
public void selectStream(String sql, Handler<AsyncResult<SQLRowStream>> replyHandler) { client.getConnection(conn -> selectStream(conn, sql, closeAndHandleResult(conn, replyHandler))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectStream 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
selectStream
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0