Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
private void processCacheEvict( MethodInvocationContext context, AnnotationValue<CacheInvalidate> cacheConfig, CacheOperation cacheOperation, boolean async) { String[] cacheNames = cacheOperation.getCacheInvalidateNames(cacheConfig); CacheKeyGenerator keyGenerator = cacheOperation.getCacheInvalidateKeyGenerator(cacheConfig); boolean invalidateAll = cacheConfig.getRequiredValue(MEMBER_ALL, Boolean.class); Object key = null; String[] parameterNames = cacheConfig.get(MEMBER_PARAMETERS, String[].class, StringUtils.EMPTY_STRING_ARRAY); Object[] parameterValues = resolveParams(context, parameterNames); if (!invalidateAll) { key = keyGenerator.generateKey(context, parameterValues); } if (!ArrayUtils.isEmpty(cacheNames)) { for (String cacheName : cacheNames) { SyncCache syncCache = cacheManager.getCache(cacheName); if (async) { AsyncCache<?> asyncCache = syncCache.async(); if (invalidateAll) { CompletableFuture<Boolean> future = asyncCache.invalidateAll(); future.whenCompleteAsync((aBoolean, throwable) -> { if (throwable != null) { asyncCacheErrorHandler.handleInvalidateError(syncCache, asRuntimeException(throwable)); } }, ioExecutor); } else { Object finalKey = key; CompletableFuture<Boolean> future = asyncCache.invalidate(key); future.whenCompleteAsync((aBoolean, throwable) -> { if (throwable != null) { asyncCacheErrorHandler.handleInvalidateError(syncCache, finalKey, asRuntimeException(throwable)); } }, ioExecutor); } } else { if (invalidateAll) { try { syncCache.invalidateAll(); } catch (RuntimeException e) { if (errorHandler.handleInvalidateError(syncCache, e)) { throw e; } } } else { try { syncCache.invalidate(key); } catch (RuntimeException e) { if (errorHandler.handleInvalidateError(syncCache, key, e)) { throw e; } } } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processCacheEvict File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
processCacheEvict
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
@Override public Object getNativeGraphics(Object image) { AndroidGraphics g = new AndroidGraphics(this, new Canvas((Bitmap) image), true); g.setClip(0, 0, ((Bitmap)image).getWidth(), ((Bitmap)image).getHeight()); return g; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNativeGraphics File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getNativeGraphics
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private static Node migrateJobDependency(Element jobDependencyElement) { List<NodeTuple> tuples = new ArrayList<>(); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "jobName"), new ScalarNode(Tag.STR, jobDependencyElement.elementText("jobName").trim()))); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "requireSuccessful"), new ScalarNode(Tag.STR, jobDependencyElement.elementText("requireSuccessful").trim()))); Element artifactsElement = jobDependencyElement.element("artifacts"); if (artifactsElement != null) { tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "artifacts"), new ScalarNode(Tag.STR, artifactsElement.getText().trim()))); } List<Node> paramSupplyNodes = migrateParamSupplies(jobDependencyElement.element("jobParams").elements()); if (!paramSupplyNodes.isEmpty()) { tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "jobParams"), new SequenceNode(Tag.SEQ, paramSupplyNodes, FlowStyle.BLOCK))); } return new MappingNode(Tag.MAP, tuples, FlowStyle.BLOCK); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateJobDependency File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-538" ]
CVE-2021-21250
MEDIUM
4
theonedev/onedev
migrateJobDependency
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
9196fd795e87dab069b4260a3590a0ea886e770f
0
Analyze the following code function for security vulnerabilities
public static void init() { final Logging log = Logging.GEOTOOLS; try { log.setLoggerFactory("org.geotools.util.logging.CommonsLoggerFactory"); } catch (ClassNotFoundException commonsException) { try { log.setLoggerFactory("org.geotools.util.logging.Log4JLoggerFactory"); } catch (ClassNotFoundException log4jException) { // Nothing to do, we already tried our best. } } // If java logging is used, force monoline console output. if (log.getLoggerFactory() == null) { log.forceMonolineConsoleOutput(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
init
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
@JsonProperty(FIELD_CACHE_TTL_OVERRIDE_ENABLED) public abstract boolean cacheTTLOverrideEnabled();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cacheTTLOverrideEnabled File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
cacheTTLOverrideEnabled
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
public boolean navigateUpTo(IBinder token, Intent destIntent, int resultCode, Intent resultData) { synchronized (this) { final ActivityStack stack = ActivityRecord.getStackLocked(token); if (stack != null) { return stack.navigateUpToLocked(token, destIntent, resultCode, resultData); } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: navigateUpTo File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
navigateUpTo
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
protected void updateFooterLeftButton(Stage stage) { if (stage.leftMode == LeftButtonMode.Gone) { mSkipOrClearButton.setVisibility(View.GONE); } else { mSkipOrClearButton.setVisibility(View.VISIBLE); mSkipOrClearButton.setText(getActivity(), stage.leftMode.text); mSkipOrClearButton.setEnabled(stage.leftMode.enabled); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateFooterLeftButton File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
updateFooterLeftButton
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
private int getBigPictureLayoutResource() { return R.layout.notification_template_material_big_picture; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBigPictureLayoutResource File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getBigPictureLayoutResource
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void invalidateChanges(CommandRunnerParams params) throws IOException { if (changesPath == null) { return; } try (FileInputStream is = new FileInputStream(changesPath)) { JsonNode responseNode = ObjectMappers.READER.readTree(is); Iterator<JsonNode> iterator = responseNode.elements(); while (iterator.hasNext()) { JsonNode item = iterator.next(); String path = item.get("path").asText(); String status = item.get("status").asText(); boolean isAdded = false; boolean isRemoved = false; if (status.equals("A") || status.equals("?")) { isAdded = true; } else if (status.equals("R") || status.equals("!")) { isRemoved = true; } Path fullPath = params.getCell().getRoot().resolve(path).normalize(); params.getParser().invalidateBasedOnPath(fullPath, isAdded || isRemoved); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: invalidateChanges File: src/com/facebook/buck/cli/ParserCacheCommand.java Repository: facebook/buck The code follows secure coding practices.
[ "CWE-502" ]
CVE-2018-6331
HIGH
7.5
facebook/buck
invalidateChanges
src/com/facebook/buck/cli/ParserCacheCommand.java
8c5500981812564877bd122c0f8fab48d3528ddf
0
Analyze the following code function for security vulnerabilities
public void addPermission(TypePermission permission) { if (securityMapper != null) { securityMapper.addPermission(permission); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPermission File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
addPermission
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
private static final boolean shouldShowDialogs(Configuration config) { return !(config.keyboard == Configuration.KEYBOARD_NOKEYS && config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldShowDialogs File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
shouldShowDialogs
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public int getCameraLensCoverState() { int sw = mInputManager.getSwitchState(-1, InputDevice.SOURCE_ANY, InputManagerService.SW_CAMERA_LENS_COVER); if (sw > 0) { // Switch state: AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL. return CAMERA_LENS_COVERED; } else if (sw == 0) { // Switch state: AKEY_STATE_UP. return CAMERA_LENS_UNCOVERED; } else { // Switch state: AKEY_STATE_UNKNOWN. return CAMERA_LENS_COVER_ABSENT; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCameraLensCoverState File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
getCameraLensCoverState
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private @PackageManagerService.ScanFlags int adjustScanFlags( @PackageManagerService.ScanFlags int scanFlags, PackageSetting pkgSetting, PackageSetting disabledPkgSetting, UserHandle user, AndroidPackage pkg) { scanFlags = ScanPackageUtils.adjustScanFlagsWithPackageSetting(scanFlags, pkgSetting, disabledPkgSetting, user); // Exception for privileged apps that share a user with a priv-app. final boolean skipVendorPrivilegeScan = ((scanFlags & SCAN_AS_VENDOR) != 0) && ScanPackageUtils.getVendorPartitionVersion() < 28; if (((scanFlags & SCAN_AS_PRIVILEGED) == 0) && !pkg.isPrivileged() && (pkg.getSharedUserId() != null) && !skipVendorPrivilegeScan) { SharedUserSetting sharedUserSetting = null; synchronized (mPm.mLock) { try { sharedUserSetting = mPm.mSettings.getSharedUserLPw(pkg.getSharedUserId(), 0, 0, false); } catch (PackageManagerException ignore) { } if (sharedUserSetting != null && sharedUserSetting.isPrivileged()) { // Exempt SharedUsers signed with the platform key. // TODO(b/72378145) Fix this exemption. Force signature apps // to allowlist their privileged permissions just like other // priv-apps. PackageSetting platformPkgSetting = mPm.mSettings.getPackageLPr("android"); if ((compareSignatures( platformPkgSetting.getSigningDetails().getSignatures(), pkg.getSigningDetails().getSignatures()) != PackageManager.SIGNATURE_MATCH)) { scanFlags |= SCAN_AS_PRIVILEGED; } } } } return scanFlags; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adjustScanFlags File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
adjustScanFlags
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
@Provides @Singleton Signer signer(ClientSideSessionConfig config) { byte[] token = config.getSecretToken().getBytes(CharsetUtil.UTF_8); return new DefaultSigner(new SecretKeySpec(token, config.getMacAlgorithm())); }
Vulnerability Classification: - CWE: CWE-312 - CVE: CVE-2021-29481 - Severity: MEDIUM - CVSS Score: 5.0 Description: Encrypt client side session cookies by default Function: signer File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionModule.java Repository: ratpack Fixed Code: @Provides @Singleton Signer signer(ClientSideSessionConfig config) { byte[] token = config.getSecretToken().getBytes(CharsetUtil.ISO_8859_1); return new DefaultSigner(new SecretKeySpec(token, config.getMacAlgorithm())); }
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
signer
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionModule.java
d7d240c06536a8b89a917e4ac842c337f7ea31f0
1
Analyze the following code function for security vulnerabilities
@Override public int update(final Uri uri, final ContentValues values, final String where, final String[] whereArgs) { Helpers.validateSelection(where, sAppReadableColumnsSet); SQLiteDatabase db = mOpenHelper.getWritableDatabase(); int count; boolean startService = false; if (values.containsKey(Downloads.Impl.COLUMN_DELETED)) { if (values.getAsInteger(Downloads.Impl.COLUMN_DELETED) == 1) { // some rows are to be 'deleted'. need to start DownloadService. startService = true; } } ContentValues filteredValues; if (Binder.getCallingPid() != Process.myPid()) { filteredValues = new ContentValues(); copyString(Downloads.Impl.COLUMN_APP_DATA, values, filteredValues); copyInteger(Downloads.Impl.COLUMN_VISIBILITY, values, filteredValues); Integer i = values.getAsInteger(Downloads.Impl.COLUMN_CONTROL); if (i != null) { filteredValues.put(Downloads.Impl.COLUMN_CONTROL, i); startService = true; } copyInteger(Downloads.Impl.COLUMN_CONTROL, values, filteredValues); copyString(Downloads.Impl.COLUMN_TITLE, values, filteredValues); copyString(Downloads.Impl.COLUMN_MEDIAPROVIDER_URI, values, filteredValues); copyString(Downloads.Impl.COLUMN_DESCRIPTION, values, filteredValues); copyInteger(Downloads.Impl.COLUMN_DELETED, values, filteredValues); } else { filteredValues = values; String filename = values.getAsString(Downloads.Impl._DATA); if (filename != null) { Cursor c = null; try { c = query(uri, new String[] { Downloads.Impl.COLUMN_TITLE }, null, null, null); if (!c.moveToFirst() || c.getString(0).isEmpty()) { values.put(Downloads.Impl.COLUMN_TITLE, new File(filename).getName()); } } finally { IoUtils.closeQuietly(c); } } Integer status = values.getAsInteger(Downloads.Impl.COLUMN_STATUS); boolean isRestart = status != null && status == Downloads.Impl.STATUS_PENDING; boolean isUserBypassingSizeLimit = values.containsKey(Downloads.Impl.COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT); if (isRestart || isUserBypassingSizeLimit) { startService = true; } } int match = sURIMatcher.match(uri); switch (match) { case MY_DOWNLOADS: case MY_DOWNLOADS_ID: case ALL_DOWNLOADS: case ALL_DOWNLOADS_ID: SqlSelection selection = getWhereClause(uri, where, whereArgs, match); if (filteredValues.size() > 0) { count = db.update(DB_TABLE, filteredValues, selection.getSelection(), selection.getParameters()); } else { count = 0; } break; default: Log.d(Constants.TAG, "updating unknown/invalid URI: " + uri); throw new UnsupportedOperationException("Cannot update URI: " + uri); } notifyContentChanged(uri, match); if (startService) { Context context = getContext(); context.startService(new Intent(context, DownloadService.class)); } return count; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: update File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
update
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public String getUserName(String user) { return this.xwiki.getUserName(user, null, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserName File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getUserName
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
void finishSurfaceBehindRemoteAnimation(boolean cancelled) { if (!mSurfaceBehindRemoteAnimationRunning) { return; } mSurfaceBehindRemoteAnimationRunning = false; if (mSurfaceBehindRemoteAnimationFinishedCallback != null) { try { mSurfaceBehindRemoteAnimationFinishedCallback.onAnimationFinished(); mSurfaceBehindRemoteAnimationFinishedCallback = null; } catch (RemoteException e) { e.printStackTrace(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishSurfaceBehindRemoteAnimation File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
finishSurfaceBehindRemoteAnimation
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
void dispatchUserSwitch(final UserState uss, final int oldUserId, final int newUserId) { final int N = mUserSwitchObservers.beginBroadcast(); if (N > 0) { final IRemoteCallback callback = new IRemoteCallback.Stub() { int mCount = 0; @Override public void sendResult(Bundle data) throws RemoteException { synchronized (ActivityManagerService.this) { if (mCurUserSwitchCallback == this) { mCount++; if (mCount == N) { sendContinueUserSwitchLocked(uss, oldUserId, newUserId); } } } } }; synchronized (this) { uss.switching = true; mCurUserSwitchCallback = callback; } for (int i=0; i<N; i++) { try { mUserSwitchObservers.getBroadcastItem(i).onUserSwitching( newUserId, callback); } catch (RemoteException e) { } } } else { synchronized (this) { sendContinueUserSwitchLocked(uss, oldUserId, newUserId); } } mUserSwitchObservers.finishBroadcast(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchUserSwitch 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
dispatchUserSwitch
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public synchronized void onCmdResponse(CatResponseMessage resMsg) { if (resMsg == null) { return; } // queue a response message. Message msg = obtainMessage(MSG_ID_RESPONSE, resMsg); msg.sendToTarget(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCmdResponse File: src/java/com/android/internal/telephony/cat/CatService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3843
HIGH
9.3
android
onCmdResponse
src/java/com/android/internal/telephony/cat/CatService.java
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
0
Analyze the following code function for security vulnerabilities
public boolean equals(PendingOperation other) { return target.matchesSpec(other.target); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: services/core/java/com/android/server/content/SyncStorageEngine.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-2424
HIGH
7.1
android
equals
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
boolean cancelDiscovery() { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission"); return cancelDiscoveryNative(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelDiscovery File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
cancelDiscovery
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
private Task getOrCreateRootTask(ActivityRecord r, int launchFlags, Task task, ActivityOptions aOptions) { final boolean onTop = (aOptions == null || !aOptions.getAvoidMoveToFront()) && !mLaunchTaskBehind; final Task sourceTask = mSourceRecord != null ? mSourceRecord.getTask() : null; return mRootWindowContainer.getOrCreateRootTask(r, aOptions, task, sourceTask, onTop, mLaunchParams, launchFlags); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrCreateRootTask File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
getOrCreateRootTask
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!authConfigs.isAuthEnabled()) { chain.doFilter(request, response); return; } HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; if (authConfigs.isEnableUserAgentAuthWhite()) { String userAgent = WebUtils.getUserAgent(req); if (StringUtils.startsWith(userAgent, Constants.NACOS_SERVER_HEADER)) { chain.doFilter(request, response); return; } } else if (StringUtils.isNotBlank(authConfigs.getServerIdentityKey()) && StringUtils .isNotBlank(authConfigs.getServerIdentityValue())) { String serverIdentity = req.getHeader(authConfigs.getServerIdentityKey()); if (authConfigs.getServerIdentityValue().equals(serverIdentity)) { chain.doFilter(request, response); return; } Loggers.AUTH.warn("Invalid server identity value for {} from {}", authConfigs.getServerIdentityKey(), req.getRemoteHost()); } else { resp.sendError(HttpServletResponse.SC_FORBIDDEN, "Invalid server identity key or value, Please make sure set `nacos.core.auth.server.identity.key`" + " and `nacos.core.auth.server.identity.value`, or open `nacos.core.auth.enable.userAgentAuthWhite`"); return; } try { Method method = methodsCache.getMethod(req); if (method == null) { chain.doFilter(request, response); return; } if (method.isAnnotationPresent(Secured.class) && authConfigs.isAuthEnabled()) { if (Loggers.AUTH.isDebugEnabled()) { Loggers.AUTH.debug("auth start, request: {} {}", req.getMethod(), req.getRequestURI()); } Secured secured = method.getAnnotation(Secured.class); String action = secured.action().toString(); String resource = secured.resource(); if (StringUtils.isBlank(resource)) { ResourceParser parser = getResourceParser(secured.parser()); resource = parser.parseName(req); } if (StringUtils.isBlank(resource)) { // deny if we don't find any resource: throw new AccessException("resource name invalid!"); } authManager.auth(new Permission(resource, action), authManager.login(req)); } chain.doFilter(request, response); } catch (AccessException e) { if (Loggers.AUTH.isDebugEnabled()) { Loggers.AUTH.debug("access denied, request: {} {}, reason: {}", req.getMethod(), req.getRequestURI(), e.getErrMsg()); } resp.sendError(HttpServletResponse.SC_FORBIDDEN, e.getErrMsg()); return; } catch (IllegalArgumentException e) { resp.sendError(HttpServletResponse.SC_BAD_REQUEST, ExceptionUtil.getAllExceptionMsg(e)); return; } catch (Exception e) { resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Server failed," + e.getMessage()); return; } }
Vulnerability Classification: - CWE: CWE-290 - CVE: CVE-2021-29441 - Severity: HIGH - CVSS Score: 7.5 Description: Fix #4701 Function: doFilter File: core/src/main/java/com/alibaba/nacos/core/auth/AuthFilter.java Repository: alibaba/nacos Fixed Code: @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!authConfigs.isAuthEnabled()) { chain.doFilter(request, response); return; } HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; if (authConfigs.isEnableUserAgentAuthWhite()) { String userAgent = WebUtils.getUserAgent(req); if (StringUtils.startsWith(userAgent, Constants.NACOS_SERVER_HEADER)) { chain.doFilter(request, response); return; } } else if (StringUtils.isNotBlank(authConfigs.getServerIdentityKey()) && StringUtils .isNotBlank(authConfigs.getServerIdentityValue())) { String serverIdentity = req.getHeader(authConfigs.getServerIdentityKey()); if (authConfigs.getServerIdentityValue().equals(serverIdentity)) { chain.doFilter(request, response); return; } Loggers.AUTH.warn("Invalid server identity value for {} from {}", authConfigs.getServerIdentityKey(), req.getRemoteHost()); } else { resp.sendError(HttpServletResponse.SC_FORBIDDEN, "Invalid server identity key or value, Please make sure set `nacos.core.auth.server.identity.key`" + " and `nacos.core.auth.server.identity.value`, or open `nacos.core.auth.enable.userAgentAuthWhite`"); return; } try { Method method = methodsCache.getMethod(req); if (method == null) { // For #4701, Only support register API. resp.sendError(HttpServletResponse.SC_NOT_FOUND, "Not found mehtod for path " + req.getMethod() + " " + req.getRequestURI()); return; } if (method.isAnnotationPresent(Secured.class) && authConfigs.isAuthEnabled()) { if (Loggers.AUTH.isDebugEnabled()) { Loggers.AUTH.debug("auth start, request: {} {}", req.getMethod(), req.getRequestURI()); } Secured secured = method.getAnnotation(Secured.class); String action = secured.action().toString(); String resource = secured.resource(); if (StringUtils.isBlank(resource)) { ResourceParser parser = getResourceParser(secured.parser()); resource = parser.parseName(req); } if (StringUtils.isBlank(resource)) { // deny if we don't find any resource: throw new AccessException("resource name invalid!"); } authManager.auth(new Permission(resource, action), authManager.login(req)); } chain.doFilter(request, response); } catch (AccessException e) { if (Loggers.AUTH.isDebugEnabled()) { Loggers.AUTH.debug("access denied, request: {} {}, reason: {}", req.getMethod(), req.getRequestURI(), e.getErrMsg()); } resp.sendError(HttpServletResponse.SC_FORBIDDEN, e.getErrMsg()); return; } catch (IllegalArgumentException e) { resp.sendError(HttpServletResponse.SC_BAD_REQUEST, ExceptionUtil.getAllExceptionMsg(e)); return; } catch (Exception e) { resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Server failed," + e.getMessage()); return; } }
[ "CWE-290" ]
CVE-2021-29441
HIGH
7.5
alibaba/nacos
doFilter
core/src/main/java/com/alibaba/nacos/core/auth/AuthFilter.java
91d16023d91ea21a5e58722c751485a0b9bbeeb3
1
Analyze the following code function for security vulnerabilities
public static @NonNull File getVolumePath(@NonNull Context context, @NonNull String volumeName) throws FileNotFoundException { switch (volumeName) { case MediaStore.VOLUME_INTERNAL: case MediaStore.VOLUME_EXTERNAL: throw new FileNotFoundException(volumeName + " has no associated path"); } final Uri uri = MediaStore.Files.getContentUri(volumeName); File path = null; try { path = context.getSystemService(StorageManager.class).getStorageVolume(uri) .getDirectory(); } catch (IllegalStateException e) { Log.w("Ignoring volume not found exception", e); } if (path != null) { return path; } else { throw new FileNotFoundException(volumeName + " has no associated path"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getVolumePath File: src/com/android/providers/media/util/FileUtils.java Repository: android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35670
HIGH
7.8
android
getVolumePath
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
public static boolean isXMLContentType(String contentType) { return contentType.contains("application/xml") || contentType.contains("text/xml") || contentType.contains("+xml"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isXMLContentType File: vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java Repository: vert-x3/vertx-web The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-24815
MEDIUM
5.3
vert-x3/vertx-web
isXMLContentType
vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
9e3a783b1d1a731055e9049078b1b1494ece9c15
0
Analyze the following code function for security vulnerabilities
@Override public void startInPlaceAnimationOnFrontMostApplication(ActivityOptions options) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); if (options == null) { data.writeInt(0); } else { data.writeInt(1); data.writeBundle(options.toBundle()); } mRemote.transact(START_IN_PLACE_ANIMATION_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startInPlaceAnimationOnFrontMostApplication File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
startInPlaceAnimationOnFrontMostApplication
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) { pw.println("WINDOW MANAGER POLICY STATE (dumpsys window policy)"); mPolicy.dump(" ", pw, args); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpPolicyLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
dumpPolicyLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public static int getIntValue(String value, int defaultValue, String key) { int result; try { result = Integer.valueOf(value).intValue(); } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.ERR_UNABLE_TO_PARSE_INT_2, value, key)); } result = defaultValue; } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIntValue File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
getIntValue
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@Override public int countMediaPackages() throws SearchServiceDatabaseException { EntityManager em = emf.createEntityManager(); Query query = em.createNamedQuery("Search.getCount"); try { Long total = (Long) query.getSingleResult(); return total.intValue(); } catch (Exception e) { logger.error("Could not find number of mediapackages", e); throw new SearchServiceDatabaseException(e); } finally { em.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: countMediaPackages File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
countMediaPackages
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
public static String getNodeText(Node node, String... nodePath) { List<Node> nodes = getNodes(node, nodePath); if (nodes != null && nodes.size() > 0) { return nodes.get(0).getTextContent(); } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNodeText File: src/edu/stanford/nlp/time/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
getNodeText
src/edu/stanford/nlp/time/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
@Override public String buildInvalidTestingRedirectAuthnRequest(AuthenticationRequest request, String relayState, boolean sign, PrivateKey key, Algorithm algorithm) throws SAMLException { AuthnRequestType authnRequest = toAuthnRequest(request, "bad"); return buildRedirectAuthnRequest(authnRequest, relayState, sign, key, algorithm); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildInvalidTestingRedirectAuthnRequest File: src/main/java/io/fusionauth/samlv2/service/DefaultSAMLv2Service.java Repository: FusionAuth/fusionauth-samlv2 The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-27736
MEDIUM
4
FusionAuth/fusionauth-samlv2
buildInvalidTestingRedirectAuthnRequest
src/main/java/io/fusionauth/samlv2/service/DefaultSAMLv2Service.java
c66fb689d50010662f705d5b585c6388ce555dbd
0
Analyze the following code function for security vulnerabilities
public void handleLogEntry(SVNLogEntry logEntry) throws SVNException { if (filter.isIncluded(logEntry)) { changesFound = true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleLogEntry File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
handleLogEntry
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
@Override public String getDisplayName() { return name == null ? getUriForDisplay() : CaseInsensitiveString.str(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDisplayName File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
getDisplayName
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override public void configure(ServletContextHandler context) { context.setContextPath("/"); context.getSessionHandler().setMaxInactiveInterval(serverConfig.getSessionTimeout()); context.setInitParameter(EnvironmentLoader.ENVIRONMENT_CLASS_PARAM, DefaultWebEnvironment.class.getName()); context.addEventListener(new EnvironmentLoaderListener()); context.addFilter(new FilterHolder(shiroFilter), "/*", EnumSet.allOf(DispatcherType.class)); context.addFilter(new FilterHolder(gitFilter), "/*", EnumSet.allOf(DispatcherType.class)); context.addServlet(new ServletHolder(preReceiveServlet), GitPreReceiveCallback.PATH + "/*"); context.addServlet(new ServletHolder(postReceiveServlet), GitPostReceiveCallback.PATH + "/*"); /* * Add wicket servlet as the default servlet which will serve all requests failed to * match a path pattern */ context.addServlet(new ServletHolder(wicketServlet), "/"); context.addServlet(new ServletHolder(attachmentUploadServlet), "/attachment_upload"); context.addServlet(new ServletHolder(new ClasspathAssetServlet(ImageScope.class)), "/img/*"); context.addServlet(new ServletHolder(new ClasspathAssetServlet(IconScope.class)), "/icon/*"); context.getSessionHandler().addEventListener(new HttpSessionListener() { @Override public void sessionCreated(HttpSessionEvent se) { } @Override public void sessionDestroyed(HttpSessionEvent se) { webSocketManager.onDestroySession(se.getSession().getId()); } }); /* * Configure a servlet to serve contents under site folder. Site folder can be used * to hold site specific web assets. */ ServletHolder fileServletHolder = new ServletHolder(new FileAssetServlet(Bootstrap.getSiteDir())); context.addServlet(fileServletHolder, "/site/*"); context.addServlet(fileServletHolder, "/robots.txt"); context.addServlet(new ServletHolder(jerseyServlet), "/rest/*"); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2021-21242 - Severity: HIGH - CVSS Score: 7.5 Description: Do not use deserialized AttachmentSupport from client side to avoid security vulnerabilities Function: configure File: server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java Repository: theonedev/onedev Fixed Code: @Override public void configure(ServletContextHandler context) { context.setContextPath("/"); context.getSessionHandler().setMaxInactiveInterval(serverConfig.getSessionTimeout()); context.setInitParameter(EnvironmentLoader.ENVIRONMENT_CLASS_PARAM, DefaultWebEnvironment.class.getName()); context.addEventListener(new EnvironmentLoaderListener()); context.addFilter(new FilterHolder(shiroFilter), "/*", EnumSet.allOf(DispatcherType.class)); context.addFilter(new FilterHolder(gitFilter), "/*", EnumSet.allOf(DispatcherType.class)); context.addServlet(new ServletHolder(preReceiveServlet), GitPreReceiveCallback.PATH + "/*"); context.addServlet(new ServletHolder(postReceiveServlet), GitPostReceiveCallback.PATH + "/*"); /* * Add wicket servlet as the default servlet which will serve all requests failed to * match a path pattern */ context.addServlet(new ServletHolder(wicketServlet), "/"); context.addServlet(new ServletHolder(new ClasspathAssetServlet(ImageScope.class)), "/img/*"); context.addServlet(new ServletHolder(new ClasspathAssetServlet(IconScope.class)), "/icon/*"); context.getSessionHandler().addEventListener(new HttpSessionListener() { @Override public void sessionCreated(HttpSessionEvent se) { } @Override public void sessionDestroyed(HttpSessionEvent se) { webSocketManager.onDestroySession(se.getSession().getId()); } }); /* * Configure a servlet to serve contents under site folder. Site folder can be used * to hold site specific web assets. */ ServletHolder fileServletHolder = new ServletHolder(new FileAssetServlet(Bootstrap.getSiteDir())); context.addServlet(fileServletHolder, "/site/*"); context.addServlet(fileServletHolder, "/robots.txt"); context.addServlet(new ServletHolder(jerseyServlet), "/rest/*"); }
[ "CWE-502" ]
CVE-2021-21242
HIGH
7.5
theonedev/onedev
configure
server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java
f864053176c08f59ef2d97fea192ceca46a4d9be
1
Analyze the following code function for security vulnerabilities
public String toString() { return "'this' reference (XThis) to Bsh object: " + namespace; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/bsh/XThis.java Repository: beanshell The code follows secure coding practices.
[ "CWE-19" ]
CVE-2016-2510
MEDIUM
6.8
beanshell
toString
src/bsh/XThis.java
1ccc66bb693d4e46a34a904db8eeff07808d2ced
0
Analyze the following code function for security vulnerabilities
void notifyTaskPersisterLocked(TaskRecord task, boolean flush) { if (task != null && task.stack != null && task.stack.isHomeStack()) { // Never persist the home stack. return; } mTaskPersister.wakeup(task, flush); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyTaskPersisterLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
notifyTaskPersisterLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
protected void setDefaultClassLoader() { try { setClassLoader( VaadinServiceClassLoaderUtil.findDefaultClassLoader()); } catch (SecurityException e) { getLogger().log(Level.SEVERE, Constants.CANNOT_ACQUIRE_CLASSLOADER_SEVERE, e); throw e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDefaultClassLoader File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
setDefaultClassLoader
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
public boolean convertSyntax(String targetSyntaxId) throws XWikiException { try { getDoc().convertSyntax(targetSyntaxId, this.context); } catch (Exception ex) { LOGGER.error( "Failed to convert document [" + getPrefixedFullName() + "] to syntax [" + targetSyntaxId + "]", ex); return false; } finally { updateAuthor(); updateContentAuthor(); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertSyntax 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
convertSyntax
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 int getKeyguardStoredPasswordQuality(int userHandle) { return (int) getLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, userHandle); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKeyguardStoredPasswordQuality 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
getKeyguardStoredPasswordQuality
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public ApiClient setServerVariables(Map<String, String> serverVariables) { this.serverVariables = serverVariables; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServerVariables File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setServerVariables
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void pollUiThread(final Callable<Boolean> callable) throws Exception { pollInstrumentationThread(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return runTestOnUiThreadAndGetResult(callable); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pollUiThread File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
pollUiThread
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
public OUser getAccount() { return account; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAccount File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java Repository: orientechnologies/orientdb The code follows secure coding practices.
[ "CWE-352" ]
CVE-2015-2912
MEDIUM
6.8
orientechnologies/orientdb
getAccount
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
d5a45e608ba8764fd817c1bdd7cf966564e828e9
0
Analyze the following code function for security vulnerabilities
private void registerSerializerHooks(InternalSerializationService ss) { SerializerHookLoader serializerHookLoader = new SerializerHookLoader(config, classLoader); Map<Class, Object> serializers = serializerHookLoader.getSerializers(); for (Map.Entry<Class, Object> entry : serializers.entrySet()) { Class serializationType = entry.getKey(); Object value = entry.getValue(); Serializer serializer; if (value instanceof SerializerHook) { serializer = ((SerializerHook) value).createSerializer(); } else { serializer = (Serializer) value; } if (value instanceof HazelcastInstanceAware) { ((HazelcastInstanceAware) value).setHazelcastInstance(hazelcastInstance); } if (ClassLoaderUtil.isInternalType(value.getClass())) { ((AbstractSerializationService) ss).safeRegister(serializationType, serializer); } else { ((AbstractSerializationService) ss).register(serializationType, serializer); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerSerializerHooks File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
registerSerializerHooks
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mIsEmbeddingActivityEnabled = ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this); if (mIsEmbeddingActivityEnabled) { final UserManager um = getSystemService(UserManager.class); final UserInfo userInfo = um.getUserInfo(getUser().getIdentifier()); if (userInfo.isManagedProfile()) { final Intent intent = new Intent(getIntent()) .setClass(this, DeepLinkHomepageActivityInternal.class) .addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT) .putExtra(EXTRA_USER_HANDLE, getUser()); intent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivityAsUser(intent, um.getPrimaryUser().getUserHandle()); finish(); return; } } setupEdgeToEdge(); setContentView(R.layout.settings_homepage_container); mSplitController = SplitController.getInstance(); mIsTwoPane = mSplitController.isActivityEmbedded(this); updateAppBarMinHeight(); initHomepageContainer(); updateHomepageAppBar(); updateHomepageBackground(); mLoadedListeners = new ArraySet<>(); initSearchBarView(); getLifecycle().addObserver(new HideNonSystemOverlayMixin(this)); mCategoryMixin = new CategoryMixin(this); getLifecycle().addObserver(mCategoryMixin); final String highlightMenuKey = getHighlightMenuKey(); // Only allow features on high ram devices. if (!getSystemService(ActivityManager.class).isLowRamDevice()) { initAvatarView(); final boolean scrollNeeded = mIsEmbeddingActivityEnabled && !TextUtils.equals(getString(DEFAULT_HIGHLIGHT_MENU_KEY), highlightMenuKey); showSuggestionFragment(scrollNeeded); if (FeatureFlagUtils.isEnabled(this, FeatureFlags.CONTEXTUAL_HOME)) { showFragment(() -> new ContextualCardsFragment(), R.id.contextual_cards_content); ((FrameLayout) findViewById(R.id.main_content)) .getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING); } } mMainFragment = showFragment(() -> { final TopLevelSettings fragment = new TopLevelSettings(); fragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY, highlightMenuKey); return fragment; }, R.id.main_content); // Launch the intent from deep link for large screen devices. launchDeepLinkIntentToRight(); updateHomepagePaddings(); updateSplitLayout(); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21256 - Severity: HIGH - CVSS Score: 7.8 Description: Refine permission check process of 2-pane deep link - Check the deep link activity instance before redirecting to the internal activity for the managed profile invocation, so the caller can't bypass the permission check. - Get the referrer as the caller so that onNewIntent can recognize the new caller and check if it has a permission to open the target page. Test: robotest & manual Bug: 268193384 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0f13f70655099543ba34eb8aeaa74b34a3993a3b) Merged-In: Ie69742983fb74ee2316b7aad16461db95ed927c2 Change-Id: Ie69742983fb74ee2316b7aad16461db95ed927c2 Function: onCreate File: src/com/android/settings/homepage/SettingsHomepageActivity.java Repository: android Fixed Code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mIsEmbeddingActivityEnabled = ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this); if (mIsEmbeddingActivityEnabled) { final UserManager um = getSystemService(UserManager.class); final UserInfo userInfo = um.getUserInfo(getUserId()); if (userInfo.isManagedProfile()) { final Intent intent = new Intent(getIntent()) .addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT) .putExtra(EXTRA_USER_HANDLE, getUser()) .putExtra(EXTRA_INITIAL_REFERRER, getCurrentReferrer()); if (TextUtils.equals(intent.getAction(), ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY) && this instanceof DeepLinkHomepageActivity) { intent.setClass(this, DeepLinkHomepageActivityInternal.class); } intent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivityAsUser(intent, um.getPrimaryUser().getUserHandle()); finish(); return; } } setupEdgeToEdge(); setContentView(R.layout.settings_homepage_container); mSplitController = SplitController.getInstance(); mIsTwoPane = mSplitController.isActivityEmbedded(this); updateAppBarMinHeight(); initHomepageContainer(); updateHomepageAppBar(); updateHomepageBackground(); mLoadedListeners = new ArraySet<>(); initSearchBarView(); getLifecycle().addObserver(new HideNonSystemOverlayMixin(this)); mCategoryMixin = new CategoryMixin(this); getLifecycle().addObserver(mCategoryMixin); final String highlightMenuKey = getHighlightMenuKey(); // Only allow features on high ram devices. if (!getSystemService(ActivityManager.class).isLowRamDevice()) { initAvatarView(); final boolean scrollNeeded = mIsEmbeddingActivityEnabled && !TextUtils.equals(getString(DEFAULT_HIGHLIGHT_MENU_KEY), highlightMenuKey); showSuggestionFragment(scrollNeeded); if (FeatureFlagUtils.isEnabled(this, FeatureFlags.CONTEXTUAL_HOME)) { showFragment(() -> new ContextualCardsFragment(), R.id.contextual_cards_content); ((FrameLayout) findViewById(R.id.main_content)) .getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING); } } mMainFragment = showFragment(() -> { final TopLevelSettings fragment = new TopLevelSettings(); fragment.getArguments().putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY, highlightMenuKey); return fragment; }, R.id.main_content); // Launch the intent from deep link for large screen devices. launchDeepLinkIntentToRight(); updateHomepagePaddings(); updateSplitLayout(); }
[ "CWE-Other" ]
CVE-2023-21256
HIGH
7.8
android
onCreate
src/com/android/settings/homepage/SettingsHomepageActivity.java
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
1
Analyze the following code function for security vulnerabilities
@Override public int read() throws IOException { int readLen = read(singleByteBuffer); if (readLen == -1) { return -1; } return singleByteBuffer[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
read
src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
private void tryToShallowUpdateSubmodules() { if (updateSubmoduleWithDepth(1)) { return; } LOG.warn("git submodule update with --depth=1 failed. Attempting again with --depth={}", UNSHALLOW_TRYOUT_STEP); if (updateSubmoduleWithDepth(UNSHALLOW_TRYOUT_STEP)) { return; } LOG.warn("git submodule update with depth={} failed. Attempting again with --depth=Integer.MAX", UNSHALLOW_TRYOUT_STEP); if (!updateSubmoduleWithDepth(Integer.MAX_VALUE)) { bomb("Failed to update submodule"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tryToShallowUpdateSubmodules File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
tryToShallowUpdateSubmodules
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public void setXObjectsToRemove(List<BaseObject> objectsToRemove) { this.xObjectsToRemove = objectsToRemove; setMetaDataDirty(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setXObjectsToRemove 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
setXObjectsToRemove
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 Provider findProviderLocked(ComponentName componentName, int userId) { final int providerCount = mProviders.size(); for (int i = 0; i < providerCount; i++) { Provider provider = mProviders.get(i); if (provider.getUserId() == userId && provider.id.componentName.equals(componentName)) { return provider; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findProviderLocked File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
findProviderLocked
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public int compareTo(SvnInfo that) { int r = this.url.compareTo(that.url); if(r!=0) return r; if(this.revision<that.revision) return -1; if(this.revision>that.revision) return +1; return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareTo File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
compareTo
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
private static String hash(String s) { return Base64.getEncoder().encodeToString(SHA256.digest(s.getBytes(StandardCharsets.UTF_8))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hash File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
hash
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
private void doStartDevModeServer(ApplicationConfiguration config) throws ExecutionFailedException { // If port is defined, means that webpack is already running if (port > 0) { if (!checkWebpackConnection()) { throw new IllegalStateException(format( "%s webpack-dev-server port '%d' is defined but it's not working properly", START_FAILURE, port)); } reuseExistingPort(port); return; } port = getRunningDevServerPort(npmFolder); if (port > 0) { if (checkWebpackConnection()) { reuseExistingPort(port); return; } else { getLogger().warn( "webpack-dev-server port '%d' is defined but it's not working properly. Using a new free port...", port); port = 0; } } // here the port == 0 Pair<File, File> webPackFiles = validateFiles(npmFolder); long start = System.nanoTime(); getLogger().info("Starting webpack-dev-server"); watchDog.set(new DevServerWatchDog()); // Look for a free port port = getFreePort(); // save the port immediately before start a webpack server, see #8981 saveRunningDevServerPort(); boolean success = false; try { success = doStartWebpack(config, webPackFiles, start); } finally { if (!success) { removeRunningDevServerPort(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doStartDevModeServer File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-172" ]
CVE-2021-33604
LOW
1.2
vaadin/flow
doStartDevModeServer
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
0
Analyze the following code function for security vulnerabilities
public String getParaAppId() { return StringUtils.removeStart(CONF.paraAccessKey(), "app:"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParaAppId File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getParaAppId
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public void onDisplayAdded(int displayId) { mH.sendMessage(mH.obtainMessage(H.DO_DISPLAY_ADDED, displayId, 0)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDisplayAdded File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
onDisplayAdded
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private void applyStudyEventDef(MetaDataVersionBean metadata,String formVersionOID) { StudyEventDefBean studyEventDef = new StudyEventDefBean(); studyEventDef.setOid(MetadataUnit.FAKE_STUDY_EVENT_OID); studyEventDef.setName(MetadataUnit.FAKE_SE_NAME); studyEventDef.setRepeating(MetadataUnit.FAKE_SE_REPEATING); ElementRefBean formRefBean = new ElementRefBean(); formRefBean.setElementDefOID(formVersionOID); studyEventDef.getFormRefs().add(formRefBean); metadata.getStudyEventDefs().add(studyEventDef); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyStudyEventDef File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
applyStudyEventDef
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
public Section getSection() { return section; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSection 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
getSection
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public static Jiffle.RuntimeModel get(Class<? extends JiffleRuntime> clazz) { for (Jiffle.RuntimeModel t : Jiffle.RuntimeModel.values()) { if (t.runtimeClass.isAssignableFrom(clazz)) { return t; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java Repository: geosolutions-it/jai-ext The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-24816
HIGH
7.5
geosolutions-it/jai-ext
get
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
cb1d6565d38954676b0a366da4f965fef38da1cb
0
Analyze the following code function for security vulnerabilities
private static short[] init__puma_parser_key_offsets_0() { return new short [] { 0, 0, 8, 17, 27, 29, 30, 31, 32, 33, 34, 36, 39, 41, 44, 45, 61, 62, 78, 80, 81, 89, 97, 107, 115, 124, 132, 140, 149, 158, 167, 176, 185, 194, 203, 212, 221, 230, 239, 248, 257, 266, 275, 284, 293, 302, 303 }; }
Vulnerability Classification: - CWE: CWE-444 - CVE: CVE-2021-41136 - Severity: LOW - CVSS Score: 3.6 Description: Merge pull request from GHSA-48w2-rm65-62xx * Fix HTTP request smuggling vulnerability See GHSA-48w2-rm65-62xx or CVE-2021-41136 for more info. * 4.3.9 release note * 5.5.1 release note * 5.5.1 Function: init__puma_parser_key_offsets_0 File: ext/puma_http11/org/jruby/puma/Http11Parser.java Repository: puma Fixed Code: private static short[] init__puma_parser_key_offsets_0() { return new short [] { 0, 0, 8, 17, 27, 29, 30, 31, 32, 33, 34, 36, 39, 41, 44, 45, 61, 62, 78, 83, 87, 95, 103, 113, 121, 130, 138, 146, 155, 164, 173, 182, 191, 200, 209, 218, 227, 236, 245, 254, 263, 272, 281, 290, 299, 308, 309 }; }
[ "CWE-444" ]
CVE-2021-41136
LOW
3.6
puma
init__puma_parser_key_offsets_0
ext/puma_http11/org/jruby/puma/Http11Parser.java
acdc3ae571dfae0e045cf09a295280127db65c7f
1
Analyze the following code function for security vulnerabilities
public Element toDOM(Document document) { Element element = document.createElement("ProfileDataInfos"); Element totalElement = document.createElement("total"); totalElement.appendChild(document.createTextNode(Integer.toString(total))); element.appendChild(totalElement); for (ProfileDataInfo profileDataInfo : getEntries()) { Element infoElement = profileDataInfo.toDOM(document); element.appendChild(infoElement); } return element; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toDOM File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toDOM
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public Result<Map<String, String>> authenticate(String userId, String password, String extra) { Result<Map<String, String>> result = new Result<>(); User user = login(userId, password, extra); if (user == null) { if (Objects.equals(securityConfig.getType(), AuthenticationType.CASDOOR_SSO.name())) { log.error("State or code entered incorrectly."); result.setCode(Status.STATE_CODE_ERROR.getCode()); result.setMsg(Status.STATE_CODE_ERROR.getMsg()); } else { log.error("Username or password entered incorrectly."); result.setCode(Status.USER_NAME_PASSWD_ERROR.getCode()); result.setMsg(Status.USER_NAME_PASSWD_ERROR.getMsg()); } return result; } // check user state if (user.getState() == Flag.NO.ordinal()) { log.error("The current user is deactivated, userName:{}.", user.getUserName()); result.setCode(Status.USER_DISABLED.getCode()); result.setMsg(Status.USER_DISABLED.getMsg()); return result; } // create session String sessionId = sessionService.createSession(user, extra); if (sessionId == null) { log.error("Failed to create session, userName:{}.", user.getUserName()); result.setCode(Status.LOGIN_SESSION_FAILED.getCode()); result.setMsg(Status.LOGIN_SESSION_FAILED.getMsg()); return result; } log.info("Session is created and sessionId is :{}.", sessionId); Map<String, String> data = new HashMap<>(); data.put(Constants.SESSION_ID, sessionId); data.put(Constants.SECURITY_CONFIG_TYPE, securityConfig.getType()); result.setData(data); result.setCode(Status.SUCCESS.getCode()); result.setMsg(Status.LOGIN_SUCCESS.getMsg()); return result; }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2023-49068 - Severity: HIGH - CVSS Score: 7.5 Description: fix security issue Function: authenticate File: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java Repository: apache/dolphinscheduler Fixed Code: @Override public Result<Map<String, String>> authenticate(String userId, String password, String extra) { Result<Map<String, String>> result = new Result<>(); User user = login(userId, password, extra); if (user == null) { if (Objects.equals(securityConfig.getType(), AuthenticationType.CASDOOR_SSO.name())) { log.error("State or code entered incorrectly."); result.setCode(Status.STATE_CODE_ERROR.getCode()); result.setMsg(Status.STATE_CODE_ERROR.getMsg()); } else { log.error("Username or password entered incorrectly."); result.setCode(Status.USER_NAME_PASSWD_ERROR.getCode()); result.setMsg(Status.USER_NAME_PASSWD_ERROR.getMsg()); } return result; } // check user state if (user.getState() == Flag.NO.ordinal()) { log.error("The current user is deactivated, userName:{}.", user.getUserName()); result.setCode(Status.USER_DISABLED.getCode()); result.setMsg(Status.USER_DISABLED.getMsg()); return result; } // create session String sessionId = sessionService.createSession(user, extra); if (sessionId == null) { log.error("Failed to create session, userName:{}.", user.getUserName()); result.setCode(Status.LOGIN_SESSION_FAILED.getCode()); result.setMsg(Status.LOGIN_SESSION_FAILED.getMsg()); return result; } log.info("Session is created, userName:{}.", user.getUserName()); Map<String, String> data = new HashMap<>(); data.put(Constants.SESSION_ID, sessionId); data.put(Constants.SECURITY_CONFIG_TYPE, securityConfig.getType()); result.setData(data); result.setCode(Status.SUCCESS.getCode()); result.setMsg(Status.LOGIN_SUCCESS.getMsg()); return result; }
[ "CWE-200" ]
CVE-2023-49068
HIGH
7.5
apache/dolphinscheduler
authenticate
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/security/impl/AbstractAuthenticator.java
359b1a7e5bb72790d2583971dc2d44a8481e3a10
1
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") @Override public String getWikiName() { return getDatabase(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWikiName File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getWikiName
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private void aliasDynamically(String alias, String className) { Class type = JVM.loadClassForName(className); if (type != null) { alias(alias, type); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: aliasDynamically File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
aliasDynamically
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public String getCancelAction() { return DIALOG_CANCEL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCancelAction File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
getCancelAction
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "JENKINS-14814"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: core/src/main/java/hudson/model/Cause.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2067
LOW
3.5
jenkinsci/jenkins
toString
core/src/main/java/hudson/model/Cause.java
5d57c855f3147bfc5e7fda9252317b428a700014
0
Analyze the following code function for security vulnerabilities
public final AppWidgetHostView createView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget) { AppWidgetHostView view = onCreateView(context, appWidgetId, appWidget); view.setOnClickHandler(mOnClickHandler); view.setAppWidget(appWidgetId, appWidget); synchronized (mViews) { mViews.put(appWidgetId, view); } RemoteViews views; try { views = sService.getAppWidgetViews(mContextOpPackageName, appWidgetId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); } view.updateAppWidget(views); return view; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createView File: core/java/android/appwidget/AppWidgetHost.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
createView
core/java/android/appwidget/AppWidgetHost.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public boolean isUseLegacySearchBuilder() { return myUseLegacySearchBuilder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUseLegacySearchBuilder File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isUseLegacySearchBuilder
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public void setAudioOutputChannel(MagicAudioManager.AudioDevice selectedAudioDevice) { if (audioManager != null) { audioManager.selectAudioDevice(selectedAudioDevice); updateAudioOutputButton(audioManager.getCurrentAudioDevice()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAudioOutputChannel File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
setAudioOutputChannel
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
protected boolean isSnoozedPackage(StatusBarNotification sbn) { return mHeadsUpManager.isSnoozed(sbn.getPackageName()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSnoozedPackage File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isSnoozedPackage
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public int getNearbyAppStreamingPolicy(final int userId) { if (!mHasFeature) { return NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY; } final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization( isProfileOwner(caller) || isDefaultDeviceOwner(caller) || hasCallingOrSelfPermission(permission.READ_NEARBY_STREAMING_POLICY)); Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId)); synchronized (getLockObject()) { final ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userId); return admin != null ? admin.mNearbyAppStreamingPolicy : NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNearbyAppStreamingPolicy 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
getNearbyAppStreamingPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
boolean hasKeyPair() { return mBundle.containsKey(Credentials.EXTRA_PUBLIC_KEY) && mBundle.containsKey(Credentials.EXTRA_PRIVATE_KEY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasKeyPair File: src/com/android/certinstaller/CredentialHelper.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2422
HIGH
9.3
android
hasKeyPair
src/com/android/certinstaller/CredentialHelper.java
70dde9870e9450e10418a32206ac1bb30f036b2c
0
Analyze the following code function for security vulnerabilities
final void dumpDbInfo(FileDescriptor fd, PrintWriter pw, String[] args) { ArrayList<ProcessRecord> procs = collectProcesses(pw, 0, false, args); if (procs == null) { pw.println("No process found for: " + args[0]); return; } pw.println("Applications Database Info:"); for (int i = procs.size() - 1 ; i >= 0 ; i--) { ProcessRecord r = procs.get(i); final int pid = r.getPid(); final IApplicationThread thread = r.getThread(); if (thread != null) { pw.println("\n** Database info for pid " + pid + " [" + r.processName + "] **"); pw.flush(); try { TransferPipe tp = new TransferPipe(); try { thread.dumpDbInfo(tp.getWriteFd(), args); tp.go(fd); } finally { tp.kill(); } } catch (IOException e) { pw.println("Failure while dumping the app: " + r); pw.flush(); } catch (RemoteException e) { pw.println("Got a RemoteException while dumping the app " + r); pw.flush(); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpDbInfo 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
dumpDbInfo
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private static void printTitle() { outStream.println(); outStream.println("Ballerina Central"); outStream.println("================="); outStream.println(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: printTitle File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java Repository: ballerina-platform/ballerina-lang The code follows secure coding practices.
[ "CWE-306" ]
CVE-2021-32700
MEDIUM
5.8
ballerina-platform/ballerina-lang
printTitle
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
4609ffee1744ecd16aac09303b1783bf0a525816
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder reference(String name) { super.referenceImpl(name); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reference File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
reference
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public boolean isMinimized() { return getActivity() == null || ((CodenameOneActivity)getActivity()).isBackground(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMinimized File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isMinimized
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void logAddAccountExplicitlyMetrics( String callerPackage, String accountType, @Nullable Map<String, Integer> accountVisibility) { // Although this is not a 'device policy' API, enterprise is the current use case. DevicePolicyEventLogger .createEvent(DevicePolicyEnums.ADD_ACCOUNT_EXPLICITLY) .setStrings( TextUtils.emptyIfNull(accountType), TextUtils.emptyIfNull(callerPackage), findPackagesPerVisibility(accountVisibility)) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logAddAccountExplicitlyMetrics File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
logAddAccountExplicitlyMetrics
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
private void registerBroadcastReceiver() { // Register for configuration changes so we can update the names // of the widgets when the locale changes. IntentFilter configFilter = new IntentFilter(); configFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, configFilter, null, null); // Register for broadcasts about package install, etc., so we can // update the provider list. IntentFilter packageFilter = new IntentFilter(); packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED); packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED); packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED); packageFilter.addDataScheme("package"); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, packageFilter, null, null); // Register for events related to sdcard installation. IntentFilter sdFilter = new IntentFilter(); sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE); sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, sdFilter, null, null); IntentFilter userFilter = new IntentFilter(); userFilter.addAction(Intent.ACTION_USER_STARTED); userFilter.addAction(Intent.ACTION_USER_STOPPED); mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, userFilter, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerBroadcastReceiver File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
registerBroadcastReceiver
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public Connection getConnection(DatabaseConfiguration databaseConfiguration) throws DatabaseServiceException { try { if (connection != null) { connection.close(); } Class.forName(type.getClassPath()); String dbURL = getDatabaseUrl(databaseConfiguration); connection = DriverManager.getConnection(dbURL); logger.debug("*** Acquired New connection for ::{} **** ", dbURL); return connection; } catch (ClassNotFoundException e) { logger.error("Jdbc Driver not found", e); throw new DatabaseServiceException(e.getMessage()); } catch (SQLException e) { logger.error("SQLException::Couldn't get a Connection!", e); throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnection File: extensions/database/src/com/google/refine/extension/database/sqlite/SQLiteConnectionManager.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-41886
HIGH
7.5
OpenRefine
getConnection
extensions/database/src/com/google/refine/extension/database/sqlite/SQLiteConnectionManager.java
2de1439f5be63d9d0e89bbacbd24fa28c8c3e29d
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { StringBuilder builder = new StringBuilder().append("ClickHouseNode [uri=").append(baseUri) .append(config.getDatabase()); if (!cluster.isEmpty()) { builder.append(", cluster=").append(cluster).append("(s").append(shardNum).append(",w").append(shardWeight) .append(",r").append(replicaNum).append(')'); } StringBuilder optsBuilder = new StringBuilder(); for (Entry<String, String> option : options.entrySet()) { String key = option.getKey(); if (!ClickHouseClientOption.DATABASE.getKey().equals(key) && !ClickHouseClientOption.SSL.getKey().equals(key)) { optsBuilder.append(key).append('=').append(option.getValue()).append(","); } } if (optsBuilder.length() > 0) { optsBuilder.setLength(optsBuilder.length() - 1); builder.append(", options={").append(optsBuilder).append('}'); } if (!tags.isEmpty()) { builder.append(", tags=").append(tags); } return builder.append("]@").append(hashCode()).toString(); }
Vulnerability Classification: - CWE: CWE-209 - CVE: CVE-2024-23689 - Severity: HIGH - CVSS Score: 8.8 Description: Mask sensitive option in log Function: toString File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java Fixed Code: @Override public String toString() { StringBuilder builder = new StringBuilder().append("ClickHouseNode [uri=").append(baseUri) .append(config.getDatabase()); if (!cluster.isEmpty()) { builder.append(", cluster=").append(cluster).append("(s").append(shardNum).append(",w").append(shardWeight) .append(",r").append(replicaNum).append(')'); } Map<String, ClickHouseOption> m = ClickHouseConfig.ClientOptions.INSTANCE.sensitiveOptions; StringBuilder optsBuilder = new StringBuilder(); for (Entry<String, String> option : options.entrySet()) { String key = option.getKey(); if (!ClickHouseClientOption.DATABASE.getKey().equals(key) && !ClickHouseClientOption.SSL.getKey().equals(key)) { optsBuilder.append(key).append('=').append(m.containsKey(key) ? "*" : option.getValue()).append(','); } } if (optsBuilder.length() > 0) { optsBuilder.setLength(optsBuilder.length() - 1); builder.append(", options={").append(optsBuilder).append('}'); } if (!tags.isEmpty()) { builder.append(", tags=").append(tags); } return builder.append("]@").append(hashCode()).toString(); }
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
toString
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
1
Analyze the following code function for security vulnerabilities
private Syntax getObjectDocumentSyntax(BaseCollection object, XWikiContext context) { XWikiDocument doc = getObjectDocument(object, context); return doc != null && doc.getSyntax() != null ? doc.getSyntax() : Syntax.XWIKI_1_0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObjectDocumentSyntax File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-41046
MEDIUM
6.3
xwiki/xwiki-platform
getObjectDocumentSyntax
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
edc52579eeaab1b4514785c134044671a1ecd839
0
Analyze the following code function for security vulnerabilities
private LayoutInflater getInflater() { if (mInflater == null) { mInflater = LayoutInflater.from(mContext); } return mInflater; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInflater File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
getInflater
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public String getLogDetails(String id) { ApiScenarioWithBLOBs bloBs = apiScenarioMapper.selectByPrimaryKey(id); if (bloBs != null) { List<DetailColumn> columns = ReflexObjectUtil.getColumns(bloBs, AutomationReference.automationColumns); OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(id), bloBs.getProjectId(), bloBs.getName(), bloBs.getCreateUser(), columns); return JSON.toJSONString(details); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLogDetails File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
getLogDetails
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
public String getParamIsPopup() { return m_paramIsPopup; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParamIsPopup File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
getParamIsPopup
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@Override protected String getBaseCipherName() { return "AES"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseCipherName File: src/main/java/org/conscrypt/OpenSSLCipher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2461
HIGH
7.6
android
getBaseCipherName
src/main/java/org/conscrypt/OpenSSLCipher.java
1638945d4ed9403790962ec7abed1b7a232a9ff8
0
Analyze the following code function for security vulnerabilities
public void setColumnOrder(Object... propertyIds) { if (SharedUtil.containsDuplicates(propertyIds)) { throw new IllegalArgumentException( "The propertyIds array contains duplicates: " + SharedUtil.getDuplicates(propertyIds)); } List<String> columnOrder = new ArrayList<String>(); for (Object propertyId : propertyIds) { if (columns.containsKey(propertyId)) { columnOrder.add(columnKeys.key(propertyId)); } else { throw new IllegalArgumentException( "Grid does not contain column for property " + String.valueOf(propertyId)); } } List<String> stateColumnOrder = getState().columnOrder; if (stateColumnOrder.size() != columnOrder.size()) { stateColumnOrder.removeAll(columnOrder); columnOrder.addAll(stateColumnOrder); } getState().columnOrder = columnOrder; fireColumnReorderEvent(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setColumnOrder 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
setColumnOrder
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public void renameRosterGroup(String group, String newGroup) { RosterGroup groupToRename = mRoster.getGroup(group); groupToRename.setName(newGroup); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: renameRosterGroup File: src/org/yaxim/androidclient/service/SmackableImp.java Repository: ge0rg/yaxim The code follows secure coding practices.
[ "CWE-20", "CWE-346" ]
CVE-2017-5589
MEDIUM
4.3
ge0rg/yaxim
renameRosterGroup
src/org/yaxim/androidclient/service/SmackableImp.java
65a38dc77545d9568732189e86089390f0ceaf9f
0
Analyze the following code function for security vulnerabilities
public IndexEnabledEnum getIndexMissingFields() { return myIndexMissingFieldsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIndexMissingFields File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getIndexMissingFields
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@Override public Short getShort(CharSequence name) { return headers.getShort(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShort File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
getShort
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
public static boolean hasTextAhead(XMLEventReader xmlEventReader) throws ParsingException { XMLEvent event = peek(xmlEventReader); return event.getEventType() == XMLEvent.CHARACTERS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasTextAhead File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java Repository: keycloak The code follows secure coding practices.
[ "CWE-200" ]
CVE-2017-2582
MEDIUM
4
keycloak
hasTextAhead
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
0cb5ba0f6e83162d221681f47b470c3042eef237
0
Analyze the following code function for security vulnerabilities
protected final boolean _checkNextIsEndArray() throws IOException { // We know we are in array, with length prefix, and this is where we should be: if (!_parsingContext.expectMoreValues()) { _tagValue = -1; _parsingContext = _parsingContext.getParent(); _currToken = JsonToken.END_ARRAY; return true; } // But while we otherwise could bail out we should check what follows for better // error reporting... yet we ALSO must avoid direct call to `nextToken()` to avoid // [dataformats-binary#185] int ch = _inputBuffer[_inputPtr++]; int type = (ch >> 5) & 0x7; // No use for tag but removing it is necessary int tagValue = -1; if (type == 6) { tagValue = _decodeTag(ch & 0x1F); if ((_inputPtr >= _inputEnd) && !loadMore()) { _handleCBOREOF(); return false; } ch = _inputBuffer[_inputPtr++]; type = (ch >> 5) & 0x7; // including but not limited to nested tags (which we do not allow) if (type == 6) { _reportError("Multiple tags not allowed per value (first tag: "+tagValue+")"); } } // and that's what we need to do for safety; now can drop to generic handling: // Important! Need to push back the last byte read (but not consumed) --_inputPtr; return nextToken() == JsonToken.END_ARRAY; // should never match }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _checkNextIsEndArray File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_checkNextIsEndArray
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
@PermissionCheckerManager.PermissionResult @RequiresPermission(value = Manifest.permission.UPDATE_APP_OPS_STATS, conditional = true) public int checkPermissionForDataDeliveryFromDataSource(@NonNull String permission, @NonNull AttributionSource attributionSource, @Nullable String message) { return PermissionChecker.checkPermissionForDataDeliveryFromDataSource(mContext, permission, PermissionChecker.PID_UNKNOWN, attributionSource, message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPermissionForDataDeliveryFromDataSource File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
checkPermissionForDataDeliveryFromDataSource
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
public JSONObject put(String key, long value) throws JSONException { return this.put(key, Long.valueOf(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
put
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
private static SecurityException failedVerification(String jarName, String signatureFile, Throwable e) { throw new SecurityException(jarName + " failed verification of " + signatureFile, e); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: failedVerification File: core/java/android/util/jar/StrictJarVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
failedVerification
core/java/android/util/jar/StrictJarVerifier.java
84df68840b6f2407146e722ebd95a7d8bc6e3529
0
Analyze the following code function for security vulnerabilities
public BaseObject addXObjectFromRequest(DocumentReference classReference, int num, XWikiContext context) throws XWikiException { return addXObjectFromRequest(classReference, "", num, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addXObjectFromRequest 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
addXObjectFromRequest
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 updateUserConfigurationLocked() { Configuration configuration = new Configuration(mConfiguration); Settings.System.adjustConfigurationForUser(mContext.getContentResolver(), configuration, mUserController.getCurrentUserIdLocked(), Settings.System.canWrite(mContext)); updateConfigurationLocked(configuration, null, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUserConfigurationLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
updateUserConfigurationLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("deprecation") @Override public void fixAfterFastMode(Iterable<BlockVector2> chunks) { World world = getWorld(); for (BlockVector2 chunkPos : chunks) { world.refreshChunk(chunkPos.getBlockX(), chunkPos.getBlockZ()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fixAfterFastMode File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
fixAfterFastMode
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
private boolean handleConfigStoreFailure(boolean onlyUserStore) { // On eng/userdebug builds, return failure to leave the device in a debuggable state. if (!mBuildProperties.isUserBuild()) return false; // On user builds, ignore the failure and let the user create new networks. Log.w(TAG, "Ignoring config store errors on user build"); if (!onlyUserStore) { loadInternalData(Collections.emptyList(), Collections.emptyList(), Collections.emptyMap()); } else { loadInternalDataFromUserStore(Collections.emptyList()); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleConfigStoreFailure File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
handleConfigStoreFailure
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public String getValidNotBeforeTo() { return validNotBeforeTo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValidNotBeforeTo File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getValidNotBeforeTo
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public boolean isDeleteEnabled() { return myDeleteEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeleteEnabled File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isDeleteEnabled
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public List<ProcedureArgument> getProcedureArguments(String packageName, String procedureName, String overLoadNo) { return jdbcTemplate.query( GET_PROCEDURE_ARGUMENTS, new Object[]{packageName, procedureName, overLoadNo}, (resultSet, i) -> new ProcedureArgument( resultSet.getString("argument_name"), resultSet.getString("data_type"), resultSet.getString("type_name"), resultSet.getString("in_out").contains("IN"), resultSet.getString("in_out").contains("OUT"), resultSet.getString("orig_type_name") ) ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProcedureArguments File: obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java Repository: karsany/obridge The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-25075
MEDIUM
4
karsany/obridge
getProcedureArguments
obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java
52eca4ad05f3c292aed3178b2f58977686ffa376
0
Analyze the following code function for security vulnerabilities
public IssuesDao getZentaoAssignedAndBuilds(IssuesDao issue) { Map zentaoIssue = (Map) zentaoClient.getBugById(issue.getPlatformId()); String assignedTo = zentaoIssue.get("assignedTo").toString(); String openedBuild = zentaoIssue.get("openedBuild").toString(); List<String> zentaoBuilds = new ArrayList<>(); if (Strings.isNotBlank(openedBuild)) { zentaoBuilds = Arrays.asList(openedBuild.split(",")); } issue.setZentaoAssigned(assignedTo); issue.setZentaoBuilds(zentaoBuilds); return issue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getZentaoAssignedAndBuilds File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getZentaoAssignedAndBuilds
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private void registerDataSerializableFactories(Map<Integer, DataSerializableFactory> dataSerializableFactories, SerializationConfig config) { for (Map.Entry<Integer, DataSerializableFactory> entry : config.getDataSerializableFactories().entrySet()) { int factoryId = entry.getKey(); DataSerializableFactory factory = entry.getValue(); if (factoryId <= 0) { throw new IllegalArgumentException("DataSerializableFactory factoryId must be positive! -> " + factory); } if (dataSerializableFactories.containsKey(factoryId)) { throw new IllegalArgumentException( "DataSerializableFactory with factoryId '" + factoryId + "' is already registered!"); } dataSerializableFactories.put(factoryId, factory); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerDataSerializableFactories File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
registerDataSerializableFactories
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
21