instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public static List<Descriptor<BuildWrapper>> getBuildWrapperDescriptors(AbstractProject<?,?> project) { return BuildWrappers.getFor(project); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBuildWrapperDescriptors File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
getBuildWrapperDescriptors
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public long getUserPreferenceAsLong(String preference, XWikiContext context) { return Long.parseLong(getUserPreference(preference, context)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserPreferenceAsLong File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getUserPreferenceAsLong
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private float getKeyguardContentsAlpha() { float alpha; if (mStatusBar.getBarState() == StatusBarState.KEYGUARD) { // When on Keyguard, we hide the header as soon as the top card of the notification // stack scroller is close enough (collision distance) to the bottom of the header. alpha = getNotificationsTopY() / (mKeyguardStatusBar.getHeight() + mNotificationsHeaderCollideDistance); } else { // In SHADE_LOCKED, the top card is already really close to the header. Hide it as // soon as we start translating the stack. alpha = getNotificationsTopY() / mKeyguardStatusBar.getHeight(); } alpha = MathUtils.constrain(alpha, 0, 1); alpha = (float) Math.pow(alpha, 0.75); return alpha; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKeyguardContentsAlpha File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
getKeyguardContentsAlpha
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
protected SecretKey lookupKey(final String alias) { final Key key; try { key = keyStore.getKey(alias, keyPassword.toCharArray()); } catch (Exception e) { throw new CryptoException("Error accessing keystore entry " + alias, e); } if (key instanceof SecretKey) { return (SecretKey) key; } throw new CryptoException(alias + " is not a secret key"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lookupKey File: src/main/java/org/cryptacular/bean/AbstractCipherBean.java Repository: vt-middleware/cryptacular The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-7226
MEDIUM
5
vt-middleware/cryptacular
lookupKey
src/main/java/org/cryptacular/bean/AbstractCipherBean.java
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
0
Analyze the following code function for security vulnerabilities
public static BufferedImage getBufferedImageFromWebpButHeader(InputStream is) { if (is == null) return null; try { final Class<?> clVP8Decoder = Class.forName("net.sourceforge.plantuml.webp.VP8Decoder"); final Object vp8Decoder = clVP8Decoder.getDeclaredConstructor().newInstance(); // final VP8Decoder vp8Decoder = new VP8Decoder(); final Method decodeFrame = clVP8Decoder.getMethod("decodeFrame", ImageInputStream.class); final ImageInputStream iis = SImageIO.createImageInputStream(is); decodeFrame.invoke(vp8Decoder, iis); // vp8Decoder.decodeFrame(iis); iis.close(); final Object frame = clVP8Decoder.getMethod("getFrame").invoke(vp8Decoder); return (BufferedImage) frame.getClass().getMethod("getBufferedImage").invoke(frame); // final VP8Frame frame = vp8Decoder.getFrame(); // return frame.getBufferedImage(); } catch (Exception e) { Logme.error(e); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBufferedImageFromWebpButHeader File: src/net/sourceforge/plantuml/security/SFile.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
getBufferedImageFromWebpButHeader
src/net/sourceforge/plantuml/security/SFile.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public Container get() { return get(ContainerType.CACHED); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: src/main/java/uk/q3c/krail/jpa/user/opt/DefaultJpaOptionContainerProvider.java Repository: KrailOrg/krail-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
get
src/main/java/uk/q3c/krail/jpa/user/opt/DefaultJpaOptionContainerProvider.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
0
Analyze the following code function for security vulnerabilities
private SearchManager getSearchManager() { if (mSearchManager == null) { mSearchManager = (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE); } return mSearchManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSearchManager File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
getSearchManager
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
protected Lock getConnectionLock() { return connectionLock; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnectionLock File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
getConnectionLock
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
private void broadcastIntentToDevicePolicyManagerRoleHolder( Intent intent, UserHandle userHandle) { final int userId = userHandle.getIdentifier(); final String packageName = getDevicePolicyManagementRoleHolderPackageName(mContext); if (packageName == null) { return; } try { final Intent packageIntent = new Intent(intent) .setPackage(packageName); final List<ResolveInfo> receivers = mIPackageManager.queryIntentReceivers( packageIntent, /* resolvedType= */ null, STOCK_PM_FLAGS, userId).getList(); if (receivers.isEmpty()) { return; } for (ResolveInfo receiver : receivers) { final Intent componentIntent = new Intent(packageIntent) .setComponent(receiver.getComponentInfo().getComponentName()) .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcastAsUser(componentIntent, userHandle); } } catch (RemoteException ex) { Slogf.w(LOG_TAG, "Cannot get list of broadcast receivers for %s because: %s.", intent.getAction(), ex); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastIntentToDevicePolicyManagerRoleHolder File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
broadcastIntentToDevicePolicyManagerRoleHolder
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private boolean isAdminOf(Long identityKey, HttpServletRequest httpRequest) { if(identityKey == null) return false; Roles managerRoles = RestSecurityHelper.getRoles(httpRequest); if(!managerRoles.isAdministrator()) { return false; } Roles identityRoles = securityManager.getRoles(new IdentityRefImpl(identityKey)); return managerRoles.isManagerOf(OrganisationRoles.administrator, identityRoles); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAdminOf File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
isAdminOf
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
@Pure public @Nullable Time getTime(@Positive int columnIndex) throws SQLException { connection.getLogger().log(Level.FINEST, " getTime columnIndex: {0}", columnIndex); return getTime(columnIndex, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTime File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getTime
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
void setNativeDebuggingAppLocked(ApplicationInfo app, String processName) { enforceDebuggable(app); mNativeDebuggingApp = processName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNativeDebuggingAppLocked 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
setNativeDebuggingAppLocked
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
static <T> Queue<T> newChunkedMpscQueue(final int chunkSize, final int capacity) { return USE_MPSC_CHUNKED_ARRAY_QUEUE ? new MpscChunkedArrayQueue<T>(chunkSize, capacity) : new MpscChunkedAtomicArrayQueue<T>(chunkSize, capacity); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newChunkedMpscQueue File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
newChunkedMpscQueue
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Column(name = "file_path", nullable = false, length = 500) public String getFilePath() { return this.filePath; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFilePath File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getFilePath
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasFeature(String element, String namespace) { return getFeature(element, namespace) != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasFeature File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
hasFeature
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public void removeRep(int rep) { if (getVotes() == null) { setVotes(0); } setVotes(getVotes() - rep); updateVoteGains(-rep); if (getVotes() < 0) { setVotes(0); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeRep File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
removeRep
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private void registerOnCrossProfileProvidersChangedListener() { DevicePolicyManagerInternal devicePolicyManager = LocalServices.getService( DevicePolicyManagerInternal.class); // The device policy is an optional component. if (devicePolicyManager != null) { devicePolicyManager.addOnCrossProfileWidgetProvidersChangeListener(this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerOnCrossProfileProvidersChangedListener 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
registerOnCrossProfileProvidersChangedListener
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
private ShortcutInfo forceDeleteShortcutInner(@NonNull String id) { final ShortcutInfo shortcut; synchronized (mLock) { shortcut = mShortcuts.remove(id); if (shortcut != null) { removeIcon(shortcut); shortcut.clearFlags(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_MANIFEST | ShortcutInfo.FLAG_CACHED_ALL); } } return shortcut; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forceDeleteShortcutInner File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
forceDeleteShortcutInner
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
private void loadMediaPackages(ArrayMap<AsecInstallArgs, String> processCids, int[] uidArr, boolean externalStorage) { ArrayList<String> pkgList = new ArrayList<String>(); Set<AsecInstallArgs> keys = processCids.keySet(); for (AsecInstallArgs args : keys) { String codePath = processCids.get(args); if (DEBUG_SD_INSTALL) Log.i(TAG, "Loading container : " + args.cid); int retCode = PackageManager.INSTALL_FAILED_CONTAINER_ERROR; try { // Make sure there are no container errors first. if (args.doPreInstall(PackageManager.INSTALL_SUCCEEDED) != PackageManager.INSTALL_SUCCEEDED) { Slog.e(TAG, "Failed to mount cid : " + args.cid + " when installing from sdcard"); continue; } // Check code path here. if (codePath == null || !codePath.startsWith(args.getCodePath())) { Slog.e(TAG, "Container " + args.cid + " cachepath " + args.getCodePath() + " does not match one in settings " + codePath); continue; } // Parse package int parseFlags = mDefParseFlags; if (args.isExternalAsec()) { parseFlags |= PackageParser.PARSE_EXTERNAL_STORAGE; } if (args.isFwdLocked()) { parseFlags |= PackageParser.PARSE_FORWARD_LOCK; } synchronized (mInstallLock) { PackageParser.Package pkg = null; try { pkg = scanPackageLI(new File(codePath), parseFlags, 0, 0, null); } catch (PackageManagerException e) { Slog.w(TAG, "Failed to scan " + codePath + ": " + e.getMessage()); } // Scan the package if (pkg != null) { /* * TODO why is the lock being held? doPostInstall is * called in other places without the lock. This needs * to be straightened out. */ // writer synchronized (mPackages) { retCode = PackageManager.INSTALL_SUCCEEDED; pkgList.add(pkg.packageName); // Post process args args.doPostInstall(PackageManager.INSTALL_SUCCEEDED, pkg.applicationInfo.uid); } } else { Slog.i(TAG, "Failed to install pkg from " + codePath + " from sdcard"); } } } finally { if (retCode != PackageManager.INSTALL_SUCCEEDED) { Log.w(TAG, "Container " + args.cid + " is stale, retCode=" + retCode); } } } // writer synchronized (mPackages) { // If the platform SDK has changed since the last time we booted, // we need to re-grant app permission to catch any new ones that // appear. This is really a hack, and means that apps can in some // cases get permissions that the user didn't initially explicitly // allow... it would be nice to have some better way to handle // this situation. final VersionInfo ver = externalStorage ? mSettings.getExternalVersion() : mSettings.getInternalVersion(); final String volumeUuid = externalStorage ? StorageManager.UUID_PRIMARY_PHYSICAL : StorageManager.UUID_PRIVATE_INTERNAL; int updateFlags = UPDATE_PERMISSIONS_ALL; if (ver.sdkVersion != mSdkVersion) { logCriticalInfo(Log.INFO, "Platform changed from " + ver.sdkVersion + " to " + mSdkVersion + "; regranting permissions for external"); updateFlags |= UPDATE_PERMISSIONS_REPLACE_PKG | UPDATE_PERMISSIONS_REPLACE_ALL; } updatePermissionsLPw(null, null, volumeUuid, updateFlags); // Yay, everything is now upgraded ver.forceCurrent(); // can downgrade to reader // Persist settings mSettings.writeLPr(); } // Send a broadcast to let everyone know we are done processing if (pkgList.size() > 0) { sendResourcesChangedBroadcast(true, false, pkgList, uidArr, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadMediaPackages File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
loadMediaPackages
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public String getContextPath() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContextPath File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getContextPath
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public void addObject(String space, String page, String className, Object... properties) { gotoPage(space, page, "objectadd", toQueryParameters(className, null, properties)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObject File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
addObject
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private native void nativeOnHide(long nativeContentViewCoreImpl);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeOnHide File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
nativeOnHide
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public void setCertId(CertId certId) { this.certId = certId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCertId File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setCertId
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
boolean showForAllUsers() { // If this switch statement is modified, modify the comment in the declarations of // the type in {@link WindowManager.LayoutParams} as well. switch (mAttrs.type) { default: // These are the windows that by default are shown only to the user that created // them. If this needs to be overridden, set // {@link WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS} in // {@link WindowManager.LayoutParams}. Note that permission // {@link android.Manifest.permission.INTERNAL_SYSTEM_WINDOW} is required as well. if ((mAttrs.privateFlags & SYSTEM_FLAG_SHOW_FOR_ALL_USERS) == 0) { return false; } break; // These are the windows that by default are shown to all users. However, to // protect against spoofing, check permissions below. case TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY: case TYPE_APPLICATION_STARTING: case TYPE_BOOT_PROGRESS: case TYPE_DISPLAY_OVERLAY: case TYPE_INPUT_CONSUMER: case TYPE_KEYGUARD_DIALOG: case TYPE_MAGNIFICATION_OVERLAY: case TYPE_NAVIGATION_BAR: case TYPE_NAVIGATION_BAR_PANEL: case TYPE_PHONE: case TYPE_POINTER: case TYPE_PRIORITY_PHONE: case TYPE_SEARCH_BAR: case TYPE_STATUS_BAR: case TYPE_NOTIFICATION_SHADE: case TYPE_STATUS_BAR_ADDITIONAL: case TYPE_STATUS_BAR_SUB_PANEL: case TYPE_SYSTEM_DIALOG: case TYPE_VOLUME_OVERLAY: case TYPE_PRESENTATION: case TYPE_PRIVATE_PRESENTATION: case TYPE_DOCK_DIVIDER: break; } // Only the system can show free windows to all users. return mOwnerCanAddInternalSystemWindow; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showForAllUsers File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
showForAllUsers
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
protected List<DependencyFilter> initDependencyFilters( List<DependencyFilter> sessionInitFilters) throws ServiceException { assert sessionInitFilters != null; return sessionInitFilters; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initDependencyFilters 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
initDependencyFilters
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
public List<BaseClass> getXClasses(XWikiContext context) { List<BaseClass> list = new ArrayList<BaseClass>(); // getXObjects() is a TreeMap, with elements sorted by className reference for (DocumentReference classReference : getXObjects().keySet()) { BaseClass bclass = null; List<BaseObject> objects = getXObjects(classReference); for (BaseObject obj : objects) { if (obj != null) { bclass = obj.getXClass(context); if (bclass != null) { break; } } } if (bclass != null) { list.add(bclass); } } return list; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXClasses 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
getXClasses
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 moveHomeStack(boolean toFront, String reason) { moveHomeStack(toFront, reason, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveHomeStack File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
moveHomeStack
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public Set<Integer> handleUserSwitch(int userId) { if (mVerboseLoggingEnabled) { Log.v(TAG, "Handling user switch for " + userId); } if (userId == mCurrentUserId) { Log.w(TAG, "User already in foreground " + userId); return new HashSet<>(); } if (mPendingStoreRead) { Log.w(TAG, "User switch before store is read!"); mConfiguredNetworks.setNewUser(userId); mCurrentUserId = userId; // Reset any state from previous user unlock. mDeferredUserUnlockRead = false; // Cannot read data from new user's CE store file before they log-in. mPendingUnlockStoreRead = true; return new HashSet<>(); } if (mUserManager.isUserUnlockingOrUnlocked(UserHandle.of(mCurrentUserId))) { saveToStore(true); } // Remove any private networks of the old user before switching the userId. Set<Integer> removedNetworkIds = clearInternalDataForUser(mCurrentUserId); mConfiguredNetworks.setNewUser(userId); mCurrentUserId = userId; if (mUserManager.isUserUnlockingOrUnlocked(UserHandle.of(mCurrentUserId))) { handleUserUnlockOrSwitch(mCurrentUserId); // only handle the switching of unlocked users in {@link WifiCarrierInfoManager}. mWifiCarrierInfoManager.onUnlockedUserSwitching(mCurrentUserId); } else { // Cannot read data from new user's CE store file before they log-in. mPendingUnlockStoreRead = true; Log.i(TAG, "Waiting for user unlock to load from store"); } return removedNetworkIds; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleUserSwitch 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
handleUserSwitch
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
default File getTempFileFromInputStream(InputStream inputStream, String prefix, String suffix) throws IOException { File tmp = File.createTempFile(prefix, suffix); tmp.deleteOnExit(); Files.copy(inputStream, tmp.toPath(), StandardCopyOption.REPLACE_EXISTING); return tmp; }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2021-22572 - Severity: LOW - CVSS Score: 2.1 Description: Switch to using Files.createTempFile Function: getTempFileFromInputStream File: portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java Repository: google/data-transfer-project Fixed Code: default File getTempFileFromInputStream(InputStream inputStream, String prefix, String suffix) throws IOException { File tmp = Files.createTempFile(prefix, suffix); tmp.deleteOnExit(); Files.copy(inputStream, tmp.toPath(), StandardCopyOption.REPLACE_EXISTING); return tmp; }
[ "CWE-668" ]
CVE-2021-22572
LOW
2.1
google/data-transfer-project
getTempFileFromInputStream
portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java
013edb6c2d5a4e472988ea29a7cb5b1fdaf9c635
1
Analyze the following code function for security vulnerabilities
private void testAlreadyRunning() throws Exception { Server server = Server.createWebServer( "-webPort", "8182", "-properties", "null"); server.start(); try { assertContains(server.getStatus(), "server running"); Server server2 = Server.createWebServer( "-webPort", "8182", "-properties", "null"); assertEquals("Not started", server2.getStatus()); try { server2.start(); fail(); } catch (Exception e) { assertContains(e.toString(), "port may be in use"); assertContains(server2.getStatus(), "could not be started"); } finally { server2.stop(); } } finally { server.stop(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testAlreadyRunning File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
testAlreadyRunning
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
@Override public Boolean load(Tuple<User, String> key) { return loadUrlAccess(key.getB()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: load File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
load
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
void destroyed(String reason) { removeDestroyTimeout(); ProtoLog.d(WM_DEBUG_CONTAINERS, "activityDestroyedLocked: r=%s", this); if (!isState(DESTROYING, DESTROYED)) { throw new IllegalStateException( "Reported destroyed for activity that is not destroying: r=" + this); } if (isInRootTaskLocked()) { cleanUp(true /* cleanServices */, false /* setState */); removeFromHistory(reason); } mRootWindowContainer.resumeFocusedTasksTopActivities(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: destroyed File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
destroyed
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@FinishRequest int finishIfPossible(String reason, boolean oomAdj) { return finishIfPossible(Activity.RESULT_CANCELED, null /* resultData */, null /* resultGrants */, reason, oomAdj); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishIfPossible File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
finishIfPossible
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { if (code == SYSPROPS_TRANSACTION) { // We need to tell all apps about the system property change. ArrayList<IBinder> procs = new ArrayList<IBinder>(); synchronized(this) { final int NP = mProcessNames.getMap().size(); for (int ip=0; ip<NP; ip++) { SparseArray<ProcessRecord> apps = mProcessNames.getMap().valueAt(ip); final int NA = apps.size(); for (int ia=0; ia<NA; ia++) { ProcessRecord app = apps.valueAt(ia); if (app.thread != null) { procs.add(app.thread.asBinder()); } } } } int N = procs.size(); for (int i=0; i<N; i++) { Parcel data2 = Parcel.obtain(); try { procs.get(i).transact(IBinder.SYSPROPS_TRANSACTION, data2, null, 0); } catch (RemoteException e) { } data2.recycle(); } } try { return super.onTransact(code, data, reply, flags); } catch (RuntimeException e) { // The activity manager only throws security exceptions, so let's // log all others. if (!(e instanceof SecurityException)) { Slog.wtf(TAG, "Activity Manager Crash", e); } throw e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTransact 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
onTransact
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private boolean isDeviceOwnerLocked(CallerIdentity caller) { if (!mOwners.hasDeviceOwner() || mOwners.getDeviceOwnerUserId() != caller.getUserId()) { return false; } if (caller.hasAdminComponent()) { return mOwners.getDeviceOwnerComponent().equals(caller.getComponentName()); } else { return isUidDeviceOwnerLocked(caller.getUid()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceOwnerLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
isDeviceOwnerLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting void onUserUnlocked(Intent intent) { onUnlockUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUserUnlocked 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
onUserUnlocked
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public boolean isCurrentLocalUserPage() { return this.doc.isCurrentLocalUserPage(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCurrentLocalUserPage 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
isCurrentLocalUserPage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Override public final boolean isEnumType() { // 29-Sep-2019, tatu: `Class.isEnum()` not enough to detect custom subtypes, // but for some reason this fix will break couple of unit tests: // return ClassUtil.isEnumType(_class); return _class.isEnum(); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2019-16942 - Severity: HIGH - CVSS Score: 7.5 Description: More clean up after #2478 Function: isEnumType File: src/main/java/com/fasterxml/jackson/databind/JavaType.java Repository: FasterXML/jackson-databind Fixed Code: @Override public final boolean isEnumType() { // 29-Sep-2019, tatu: `Class.isEnum()` not enough to detect custom subtypes, // but for some reason this fix will break couple of unit tests: // See [databind#2480]: // return ClassUtil.isEnumType(_class); return _class.isEnum(); }
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
isEnumType
src/main/java/com/fasterxml/jackson/databind/JavaType.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
1
Analyze the following code function for security vulnerabilities
@Override public Reader getCharacterStream() throws SQLException { return super.getCharacterStream(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCharacterStream File: h2/src/main/org/h2/jdbc/JdbcSQLXML.java Repository: h2database The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-23463
MEDIUM
6.4
h2database
getCharacterStream
h2/src/main/org/h2/jdbc/JdbcSQLXML.java
d83285fd2e48fb075780ee95badee6f5a15ea7f8
0
Analyze the following code function for security vulnerabilities
public String getDefaultEditURL() throws XWikiException { return this.doc.getDefaultEditURL(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultEditURL 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
getDefaultEditURL
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
static OriginInfo fromStagedFile(File file) { return new OriginInfo(file, null, true, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromStagedFile File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
fromStagedFile
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void setWebhookUrl(@Nullable URI webhookUrl) { this.webhookUrl = webhookUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWebhookUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setWebhookUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
private BigInteger validate(BigInteger y, DHParameters dhParams) { if (y == null) { throw new NullPointerException("y value cannot be null"); } if (dhParams.getQ() != null) { if (ONE.equals(y.modPow(dhParams.getQ(), dhParams.getP()))) { return y; } throw new IllegalArgumentException("Y value does not appear to be in correct group"); } else { // TLS check if (y.compareTo(TWO) < 0 || y.compareTo(dhParams.getP().subtract(TWO)) > 0) { throw new IllegalArgumentException("invalid DH public key"); } return y; // we can't validate without Q. } }
Vulnerability Classification: - CWE: CWE-310 - CVE: CVE-2016-1000339 - Severity: MEDIUM - CVSS Score: 5.0 Description: added better support for DH domain parameters added s box allocation to AESEngine reduced use of AESFastEngine. Function: validate File: core/src/main/java/org/bouncycastle/crypto/params/DHPublicKeyParameters.java Repository: bcgit/bc-java Fixed Code: private BigInteger validate(BigInteger y, DHParameters dhParams) { if (y == null) { throw new NullPointerException("y value cannot be null"); } // TLS check if (y.compareTo(TWO) < 0 || y.compareTo(dhParams.getP().subtract(TWO)) > 0) { throw new IllegalArgumentException("invalid DH public key"); } if (dhParams.getQ() != null) { if (ONE.equals(y.modPow(dhParams.getQ(), dhParams.getP()))) { return y; } throw new IllegalArgumentException("Y value does not appear to be in correct group"); } else { return y; // we can't validate without Q. } }
[ "CWE-310" ]
CVE-2016-1000339
MEDIUM
5
bcgit/bc-java
validate
core/src/main/java/org/bouncycastle/crypto/params/DHPublicKeyParameters.java
413b42f4d770456508585c830cfcde95f9b0e93b
1
Analyze the following code function for security vulnerabilities
@Override public Uri insert(Uri uri, ContentValues values) { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insert File: provider_src/com/android/email/provider/AttachmentProvider.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3918
MEDIUM
4.3
android
insert
provider_src/com/android/email/provider/AttachmentProvider.java
6b2b0bd7c771c698f11d7be89c2c57c8722c7454
0
Analyze the following code function for security vulnerabilities
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[], @NonNull int[] grantResults) { if (grantResults.length > 0) if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { ScanActivity.onRequestPermissionResult(this, requestCode, grantResults); if (requestCode == REQUEST_SYNC_CONTACTS && xmppConnectionServiceBound) { xmppConnectionService.loadPhoneContacts(); xmppConnectionService.startContactObserver(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRequestPermissionsResult File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
onRequestPermissionsResult
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public boolean getBoolean(String key) throws JSONException { return doGetBoolean(key, get(key)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBoolean File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
getBoolean
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public boolean isSelectionEditable() { return mHasSelection ? mSelectionEditable : false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSelectionEditable File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
isSelectionEditable
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
boolean isEligibleForLetterboxEducation() { return mWmService.mLetterboxConfiguration.getIsEducationEnabled() && mIsEligibleForFixedOrientationLetterbox && getWindowingMode() == WINDOWING_MODE_FULLSCREEN && getRequestedConfigurationOrientation() == ORIENTATION_PORTRAIT && mStartingWindow == null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEligibleForLetterboxEducation File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
isEligibleForLetterboxEducation
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public R getNearestOldBuild(int n) { return builds.search(n, Direction.DESC); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNearestOldBuild File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getNearestOldBuild
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public String fragment() { return fragment; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fragment File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
fragment
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
private static int findSPLenient(AppendableCharSequence sb, int offset) { for (int result = offset; result < sb.length(); ++result) { if (isSPLenient(sb.charAtUnsafe(result))) { return result; } } return sb.length(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findSPLenient File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
findSPLenient
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
public void asyncRpc(Method m, CompletableFuture<Command> future) throws IOException { synchronized (_channelMutex) { ensureIsOpen(); quiescingAsyncRpc(m, future); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asyncRpc File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
asyncRpc
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public final Assertion validate(final String ticket, final String service) throws TicketValidationException { final String validationUrl = constructValidationUrl(ticket, service); logger.debug("Constructing validation url: {}", validationUrl); try { logger.debug("Retrieving response from server."); final String serverResponse = retrieveResponseFromServer(new URL(validationUrl), ticket); if (serverResponse == null) { throw new TicketValidationException("The CAS server returned no response."); } logger.debug("Server response: {}", serverResponse); return parseResponseFromServer(serverResponse); } catch (final MalformedURLException e) { throw new TicketValidationException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validate File: cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java Repository: apereo/java-cas-client The code follows secure coding practices.
[ "CWE-74" ]
CVE-2014-4172
HIGH
7.5
apereo/java-cas-client
validate
cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
ae37092100c8eaec610dab6d83e5e05a8ee58814
0
Analyze the following code function for security vulnerabilities
public void removePeriodicSync(EndPoint info, Bundle extras) { synchronized(mAuthorities) { try { AuthorityInfo authority = getOrCreateAuthorityLocked(info, -1, false); // Remove any periodic syncs that match the target and extras. SyncStatusInfo status = mSyncStatus.get(authority.ident); boolean changed = false; Iterator<PeriodicSync> iterator = authority.periodicSyncs.iterator(); int i = 0; while (iterator.hasNext()) { PeriodicSync syncInfo = iterator.next(); if (SyncManager.syncExtrasEquals(syncInfo.extras, extras, true /* includeSyncSettings */)) { iterator.remove(); changed = true; // If we removed an entry from the periodicSyncs array also // remove the corresponding entry from the status if (status != null) { status.removePeriodicSyncTime(i); } else { Log.e(TAG, "Tried removing sync status on remove periodic sync but" + " did not find it."); } } else { i++; } } if (!changed) { return; } } finally { writeAccountInfoLocked(); writeStatusLocked(); } } reportChange(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removePeriodicSync 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
removePeriodicSync
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
protected String getFontSizeController(Map<String, Object> data) { String fontController = "<div class=\"adjustfontSize\">\n" + " <div style=\"float:right\">\n" + " <span> "+ ResourceBundleUtil.getMessage("theme.universal.fontSize") +":</span>\n" + " <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n" + " <button id=\"smallFont\" type=\"button\" class=\"buttonFontSize\"><i class=\"fas fa-font\" style=\"font-size:13px\"></i></button>\n" + " <button id=\"mediumFont\" type=\"button\" class=\"buttonFontSize\"><i class=\"fas fa-font\" style=\"font-size:17px\"></i></button>\n" + " <button id=\"bigFont\" type=\"button\" class=\"buttonFontSize\"><i class=\"fas fa-font\" style=\"font-size:20px\"></i></button>\n" + " </div>\n" + " </div>\n" + " <div style=\"clear:both\"></div>\n" + "</div>"; if ((Boolean) data.get("is_login_page") || (Boolean) data.get("embed")) { return ""; } else { return fontController; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFontSizeController File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
getFontSizeController
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public void modifySubscription(ServiceRequest service) throws UaException { ModifySubscriptionRequest request = (ModifySubscriptionRequest) service.getRequest(); UInteger subscriptionId = request.getSubscriptionId(); Subscription subscription = subscriptions.get(subscriptionId); if (subscription == null) { throw new UaException(StatusCodes.Bad_SubscriptionIdInvalid); } subscription.modifySubscription(request); ResponseHeader header = service.createResponseHeader(); ModifySubscriptionResponse response = new ModifySubscriptionResponse( header, subscription.getPublishingInterval(), uint(subscription.getLifetimeCount()), uint(subscription.getMaxKeepAliveCount()) ); service.setResponse(response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: modifySubscription File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java Repository: eclipse/milo The code follows secure coding practices.
[ "CWE-770" ]
CVE-2022-25897
HIGH
7.5
eclipse/milo
modifySubscription
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
0
Analyze the following code function for security vulnerabilities
@Override public final DeserializerFactory withAdditionalKeyDeserializers(KeyDeserializers additional) { return withConfig(_factoryConfig.withAdditionalKeyDeserializers(additional)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withAdditionalKeyDeserializers File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
withAdditionalKeyDeserializers
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
public void onGesture(int gestureId) { Message message = mCaller.obtainMessageI(DO_ON_GESTURE, gestureId); mCaller.sendMessage(message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onGesture File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
onGesture
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
private void deleteAllTags() { db.delete(MySQLiteHelper.TABLE_TAGS, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAllTags File: app/src/main/java/com/dimtion/shaarlier/TagsSource.java Repository: dimtion/Shaarlier The code follows secure coding practices.
[ "CWE-89" ]
CVE-2015-10076
MEDIUM
5.2
dimtion/Shaarlier
deleteAllTags
app/src/main/java/com/dimtion/shaarlier/TagsSource.java
3d1d9b239d9b3cd87e8bed45a0f02da583ad371e
0
Analyze the following code function for security vulnerabilities
final void applyUpdateVrModeLocked(ActivityRecord r) { // VR apps are expected to run in a main display. If an app is turning on VR for // itself, but lives in a dynamic stack, then make sure that it is moved to the main // fullscreen stack before enabling VR Mode. // TODO: The goal of this code is to keep the VR app on the main display. When the // stack implementation changes in the future, keep in mind that the use of the fullscreen // stack is a means to move the activity to the main display and a moveActivityToDisplay() // option would be a better choice here. if (r.requestedVrComponent != null && r.getDisplayId() != DEFAULT_DISPLAY) { Slog.i(TAG, "Moving " + r.shortComponentName + " from stack " + r.getStackId() + " to main stack for VR"); final ActivityStack stack = mStackSupervisor.getDefaultDisplay().getOrCreateStack( WINDOWING_MODE_FULLSCREEN, r.getActivityType(), true /* toTop */); moveTaskToStack(r.getTask().taskId, stack.mStackId, true /* toTop */); } mHandler.sendMessage( mHandler.obtainMessage(VR_MODE_CHANGE_MSG, 0, 0, r)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyUpdateVrModeLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
applyUpdateVrModeLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void onAnimationToSideStarted(boolean rightPage, float translation, float vel) { boolean start = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? rightPage : !rightPage; mIsLaunchTransitionRunning = true; mLaunchAnimationEndRunnable = null; float displayDensity = mStatusBar.getDisplayDensity(); int lengthDp = Math.abs((int) (translation / displayDensity)); int velocityDp = Math.abs((int) (vel / displayDensity)); if (start) { mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_DIALER, lengthDp, velocityDp); mFalsingManager.onLeftAffordanceOn(); if (mFalsingManager.shouldEnforceBouncer()) { mStatusBar.executeRunnableDismissingKeyguard(new Runnable() { @Override public void run() { mKeyguardBottomArea.launchLeftAffordance(); } }, null, true /* dismissShade */, false /* afterKeyguardGone */, true /* deferred */); } else { mKeyguardBottomArea.launchLeftAffordance(); } } else { if (KeyguardBottomAreaView.CAMERA_LAUNCH_SOURCE_AFFORDANCE.equals( mLastCameraLaunchSource)) { mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_CAMERA, lengthDp, velocityDp); } mFalsingManager.onCameraOn(); if (mFalsingManager.shouldEnforceBouncer()) { mStatusBar.executeRunnableDismissingKeyguard(new Runnable() { @Override public void run() { mKeyguardBottomArea.launchCamera(mLastCameraLaunchSource); } }, null, true /* dismissShade */, false /* afterKeyguardGone */, true /* deferred */); } else { mKeyguardBottomArea.launchCamera(mLastCameraLaunchSource); } } mStatusBar.startLaunchTransitionTimeout(); mBlockTouches = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAnimationToSideStarted File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onAnimationToSideStarted
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public String getExternalURL(String action, String queryString) { return this.doc.getExternalURL(action, queryString, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalURL 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
getExternalURL
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
private void removeLockoutResetCallback( FingerprintServiceLockoutResetMonitor monitor) { mLockoutMonitors.remove(monitor); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeLockoutResetCallback File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
removeLockoutResetCallback
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public Bundle call(String method, String name, Bundle args) { final int requestingUserId = getRequestingUserId(args); switch (method) { case Settings.CALL_METHOD_GET_GLOBAL: { Setting setting = getGlobalSetting(name); return packageValueForCallResult(setting, isTrackingGeneration(args)); } case Settings.CALL_METHOD_GET_SECURE: { Setting setting = getSecureSetting(name, requestingUserId); return packageValueForCallResult(setting, isTrackingGeneration(args)); } case Settings.CALL_METHOD_GET_SYSTEM: { Setting setting = getSystemSetting(name, requestingUserId); return packageValueForCallResult(setting, isTrackingGeneration(args)); } case Settings.CALL_METHOD_PUT_GLOBAL: { String value = getSettingValue(args); insertGlobalSetting(name, value, requestingUserId, false); break; } case Settings.CALL_METHOD_PUT_SECURE: { String value = getSettingValue(args); insertSecureSetting(name, value, requestingUserId, false); break; } case Settings.CALL_METHOD_PUT_SYSTEM: { String value = getSettingValue(args); insertSystemSetting(name, value, requestingUserId); break; } default: { Slog.w(LOG_TAG, "call() with invalid method: " + method); } break; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: call File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
call
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
@Test public void findsExistingOrderByIndependentOfCase() { Sort sort = new Sort("lastname"); String query = applySorting("select p from Person p ORDER BY p.firstname", sort, "p"); assertThat(query, endsWith("ORDER BY p.firstname, p.lastname asc")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findsExistingOrderByIndependentOfCase File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
findsExistingOrderByIndependentOfCase
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public void setCurrentAccessPoint(String id) { if (apIds == null) { getAPIds(); } NetworkInfo info = (NetworkInfo) apIds.get(id); if (info == null || info.isConnectedOrConnecting()) { return; } ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); cm.setNetworkPreference(info.getType()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCurrentAccessPoint 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
setCurrentAccessPoint
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private int digits(int number) { if (number < 100) { return number < 10 ? 1 : 2; } else if (number < 1000) { return 3; } else { return number < 10000 ? 4 : 5; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: digits File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
digits
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
@Override public void run() { String msg = "SIGNAL received. Shutting down."; LOG.info(msg); activityWriter.write(new Activity(msg, Main.class)); auditEventSender.success(AuditActor.system(nodeId), NODE_SHUTDOWN_INITIATE); gracefulShutdown.runWithoutExit(); serviceManager.stopAsync().awaitStopped(); leaderElectionService.stopAsync().awaitTerminated(); // Some services might continue performing processing // after the Journal service being down. Therefore it's // important to flush the most actual journal offset value // right before shutting down to avoid repetitive processing // and duplicates. journal.flush(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: graylog2-server/src/main/java/org/graylog2/commands/Server.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
run
graylog2-server/src/main/java/org/graylog2/commands/Server.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
private ObjectStreamClass readEnumDescInternal() throws IOException, ClassNotFoundException { ObjectStreamClass classDesc; primitiveData = input; int oldHandle = descriptorHandle; descriptorHandle = nextHandle(); classDesc = readClassDescriptor(); registerObjectRead(classDesc, descriptorHandle, false); descriptorHandle = oldHandle; primitiveData = emptyStream; classDesc.setClass(resolveClass(classDesc)); // Consume unread class annotation data and TC_ENDBLOCKDATA discardData(); ObjectStreamClass superClass = readClassDesc(); checkedSetSuperClassDesc(classDesc, superClass); // Check SUIDs, note all SUID for Enum is 0L if (0L != classDesc.getSerialVersionUID() || 0L != superClass.getSerialVersionUID()) { throw new InvalidClassException(superClass.getName(), "Incompatible class (SUID): " + superClass + " but expected " + superClass); } byte tc = nextTC(); // discard TC_ENDBLOCKDATA after classDesc if any if (tc == TC_ENDBLOCKDATA) { // read next parent class. For enum, it may be null superClass.setSuperclass(readClassDesc()); } else { // not TC_ENDBLOCKDATA, push back for next read pushbackTC(); } return classDesc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readEnumDescInternal File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readEnumDescInternal
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
public ApiClient setAccessToken(String accessToken) { for (Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).setAccessToken(accessToken); return this; } } throw new RuntimeException("No OAuth2 authentication configured!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAccessToken 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
setAccessToken
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
private void setup(byte[] ad) { // Check for nonce wrap-around. if (n == -1L) throw new IllegalStateException("Nonce has wrapped around"); // Format the counter/IV block. iv[0] = 0; iv[1] = 0; iv[2] = 0; iv[3] = 0; iv[4] = (byte)(n >> 56); iv[5] = (byte)(n >> 48); iv[6] = (byte)(n >> 40); iv[7] = (byte)(n >> 32); iv[8] = (byte)(n >> 24); iv[9] = (byte)(n >> 16); iv[10] = (byte)(n >> 8); iv[11] = (byte)n; iv[12] = 0; iv[13] = 0; iv[14] = 0; iv[15] = 1; ++n; // Encrypt a block of zeroes to generate the hash key to XOR // the GHASH tag with at the end of the encrypt/decrypt operation. Arrays.fill(hashKey, (byte)0); aes.encrypt(iv, 0, hashKey, 0); // Initialize the GHASH with the associated data value. ghash.reset(); if (ad != null) { ghash.update(ad, 0, ad.length); ghash.pad(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setup File: src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java Repository: rweather/noise-java The code follows secure coding practices.
[ "CWE-125", "CWE-787" ]
CVE-2020-25021
HIGH
7.5
rweather/noise-java
setup
src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java
18e86b6f8bea7326934109aa9ffa705ebf4bde90
0
Analyze the following code function for security vulnerabilities
public static Intent getHelpIntent(Context context, String helpUriString, String backupContext) { // Try to handle as Intent Uri, otherwise just treat as Uri. try { Intent intent = Intent.parseUri(helpUriString, Intent.URI_ANDROID_APP_SCHEME | Intent.URI_INTENT_SCHEME); addIntentParameters(context, intent, backupContext); ComponentName component = intent.resolveActivity(context.getPackageManager()); if (component != null) { return intent; } else if (intent.hasExtra(EXTRA_BACKUP_URI)) { // This extra contains a backup URI for when the intent isn't available. return getHelpIntent(context, intent.getStringExtra(EXTRA_BACKUP_URI), backupContext); } else { return null; } } catch (URISyntaxException e) { } // The help url string exists, so first add in some extra query parameters. final Uri fullUri = uriWithAddedParameters(context, Uri.parse(helpUriString)); // Then, create an intent that will be fired when the user // selects this help menu item. Intent intent = new Intent(Intent.ACTION_VIEW, fullUri); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); return intent; }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2016-3889 - Severity: HIGH - CVSS Score: 7.2 Description: Pre-setup restrictions - Prevent external tiles from system apps - Disable help Bug: 29194585 Change-Id: I92da498110db49f7a523d6f775f191c4b52a4ad6 Function: getHelpIntent File: packages/SettingsLib/src/com/android/settingslib/HelpUtils.java Repository: android Fixed Code: public static Intent getHelpIntent(Context context, String helpUriString, String backupContext) { if (Global.getInt(context.getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) { return null; } // Try to handle as Intent Uri, otherwise just treat as Uri. try { Intent intent = Intent.parseUri(helpUriString, Intent.URI_ANDROID_APP_SCHEME | Intent.URI_INTENT_SCHEME); addIntentParameters(context, intent, backupContext); ComponentName component = intent.resolveActivity(context.getPackageManager()); if (component != null) { return intent; } else if (intent.hasExtra(EXTRA_BACKUP_URI)) { // This extra contains a backup URI for when the intent isn't available. return getHelpIntent(context, intent.getStringExtra(EXTRA_BACKUP_URI), backupContext); } else { return null; } } catch (URISyntaxException e) { } // The help url string exists, so first add in some extra query parameters. final Uri fullUri = uriWithAddedParameters(context, Uri.parse(helpUriString)); // Then, create an intent that will be fired when the user // selects this help menu item. Intent intent = new Intent(Intent.ACTION_VIEW, fullUri); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); return intent; }
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
getHelpIntent
packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
e206f02d46ae5e38c74d138b51f6e1637e261abe
1
Analyze the following code function for security vulnerabilities
@Override public String getParameterSQL(Object param) { if (param == null) { return "null"; } if (param instanceof Number) { return getNumberParameterSQL((Number) param); } if (param instanceof Date) { return getDateParameterSQL((Date) param); } return getStringParameterSQL(param.toString()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParameterSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getParameterSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
@Override public StatusBarNotification[] getHistoricalNotifications(String callingPkg, int count) { // enforce() will ensure the calling uid has the correct permission getContext().enforceCallingOrSelfPermission( android.Manifest.permission.ACCESS_NOTIFICATIONS, "NotificationManagerService.getHistoricalNotifications"); StatusBarNotification[] tmp = null; int uid = Binder.getCallingUid(); // noteOp will check to make sure the callingPkg matches the uid if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ACCESS_NOTIFICATIONS, uid, callingPkg) == AppOpsManager.MODE_ALLOWED) { synchronized (mArchive) { tmp = mArchive.getArray(count); } } return tmp; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHistoricalNotifications File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
getHistoricalNotifications
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Override public boolean isPlaybackTypeLocal() { return mVolumeType == PlaybackInfo.PLAYBACK_TYPE_LOCAL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPlaybackTypeLocal File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
isPlaybackTypeLocal
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
public boolean test(ResolveInfo ri) { return !ri.activityInfo.exported; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: test File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
test
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public boolean isVerifiedUsingV1Scheme() { return mVerifiedUsingV1Scheme; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isVerifiedUsingV1Scheme File: src/main/java/com/android/apksig/ApkVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
isVerifiedUsingV1Scheme
src/main/java/com/android/apksig/ApkVerifier.java
039f815895f62c9f8af23df66622b66246f3f61e
0
Analyze the following code function for security vulnerabilities
public Slave.JnlpJar getJnlpJars(String fileName) { return new Slave.JnlpJar(fileName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJnlpJars File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getJnlpJars
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public static boolean copyResource(File file, String filename, File targetDirectory, PathMatcher filter) { try { Path path = getResource(file, filename); if(path == null) { return false; } Path destDir = targetDirectory.toPath(); Files.walkFileTree(path, new CopyVisitor(path, destDir, filter)); PathUtils.closeSubsequentFS(path); return true; } catch (IOException e) { log.error("", e); return false; } }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2021-39180 - Severity: HIGH - CVSS Score: 9.0 Description: OO-5549: fix the wiki import and add some unit tests Function: copyResource File: src/main/java/org/olat/fileresource/types/FileResource.java Repository: OpenOLAT Fixed Code: public static boolean copyResource(File file, String filename, File targetDirectory, PathMatcher filter) { try { Path path = getResource(file, filename); if(path == null) { return false; } Path destDir = targetDirectory.toPath(); Files.walkFileTree(path, EnumSet.noneOf(FileVisitOption.class), 24, new CopyVisitor(path, destDir, filter)); PathUtils.closeSubsequentFS(path); return true; } catch (IOException e) { log.error("", e); return false; } }
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
copyResource
src/main/java/org/olat/fileresource/types/FileResource.java
699490be8e931af0ef1f135c55384db1f4232637
1
Analyze the following code function for security vulnerabilities
@PostMapping("/{modelId}/deploy") @ApiOperation("发布模型") @Authorize(action = "deploy") public ResponseMessage<Deployment> deployModel(@PathVariable String modelId) throws Exception { Model modelData = repositoryService.getModel(modelId); if (modelData == null) { throw new NotFoundException("模型不存在!"); } ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId())); BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode); byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(model); String processName = modelData.getName() + ".bpmn20.xml"; Deployment deployment = repositoryService.createDeployment() .name(modelData.getName()) .addString(processName, new String(bpmnBytes, "utf8")) .deploy(); return ResponseMessage.ok(deployment).include(Deployment.class, "id", "name", "new"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deployModel File: hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/web/FlowableModelManagerController.java Repository: hs-web/hsweb-framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20594
MEDIUM
4.3
hs-web/hsweb-framework
deployModel
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/web/FlowableModelManagerController.java
b72a2275ed21240296c6539bae1049c56abb542f
0
Analyze the following code function for security vulnerabilities
private boolean verifySignature(byte[] sig, byte[] hostkey) throws IOException { SSHSignature sshSignature; if (kxs.np.server_host_key_algo.equals(Ed25519Verify.get().getKeyFormat())) { sshSignature = Ed25519Verify.get(); } else if (kxs.np.server_host_key_algo.equals(ECDSASHA2Verify.ECDSASHA2NISTP256Verify.get().getKeyFormat())) { sshSignature = ECDSASHA2Verify.ECDSASHA2NISTP256Verify.get(); } else if (kxs.np.server_host_key_algo.equals(ECDSASHA2Verify.ECDSASHA2NISTP384Verify.get().getKeyFormat())) { sshSignature = ECDSASHA2Verify.ECDSASHA2NISTP384Verify.get(); } else if (kxs.np.server_host_key_algo.equals(ECDSASHA2Verify.ECDSASHA2NISTP521Verify.get().getKeyFormat())) { sshSignature = ECDSASHA2Verify.ECDSASHA2NISTP521Verify.get(); } else if (kxs.np.server_host_key_algo.equals(RSASHA512Verify.get().getKeyFormat())) { sshSignature = RSASHA512Verify.get(); } else if (kxs.np.server_host_key_algo.equals(RSASHA256Verify.get().getKeyFormat())) { sshSignature = RSASHA256Verify.get(); } else if (kxs.np.server_host_key_algo.equals(RSASHA1Verify.get().getKeyFormat())) { sshSignature = RSASHA1Verify.get(); } else if (kxs.np.server_host_key_algo.equals(DSASHA1Verify.get().getKeyFormat())) { sshSignature = DSASHA1Verify.get(); } else { throw new IOException("Unknown server host key algorithm '" + kxs.np.server_host_key_algo + "'"); } PublicKey publicKey = sshSignature.decodePublicKey(hostkey); log.log(50, "Verifying " + sshSignature.getKeyFormat() + " signature"); return sshSignature.verifySignature(kxs.H, sig, publicKey); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifySignature File: src/main/java/com/trilead/ssh2/transport/KexManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
verifySignature
src/main/java/com/trilead/ssh2/transport/KexManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
public boolean isSelectionEditable() { return mHasSelection ? mFocusedNodeEditable : false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSelectionEditable File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
isSelectionEditable
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
public String getFormat() { return format; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFormat File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java Repository: umlet The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000548
MEDIUM
6.8
umlet
getFormat
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
0
Analyze the following code function for security vulnerabilities
@NonNull ActiveAdmin getOrganizationOwnedProfileOwnerLocked(final CallerIdentity caller) { final ActiveAdmin profileOwner = getProfileOwnerLocked(caller); Preconditions.checkCallAuthorization( mOwners.isProfileOwnerOfOrganizationOwnedDevice(caller.getUserId()), "Admin %s is not of an org-owned device", profileOwner.info.getComponent()); return profileOwner; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationOwnedProfileOwnerLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getOrganizationOwnedProfileOwnerLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public String getBaseURI() { return fBaseSystemId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseURI File: ext/java/nokogiri/XmlSchema.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-26247
MEDIUM
4
sparklemotion/nokogiri
getBaseURI
ext/java/nokogiri/XmlSchema.java
9c87439d9afa14a365ff13e73adc809cb2c3d97b
0
Analyze the following code function for security vulnerabilities
private void updateApplicationPermissions(ServiceProvider updatedApp, String updatedAppName, String storedAppName) throws RegistryException, IdentityApplicationManagementException { String applicationNode = ApplicationMgtUtil.getApplicationPermissionPath() + RegistryConstants .PATH_SEPARATOR + storedAppName; org.wso2.carbon.registry.api.Registry tenantGovReg = CarbonContext.getThreadLocalCarbonContext() .getRegistry(RegistryType.USER_GOVERNANCE); boolean exist = tenantGovReg.resourceExists(applicationNode); if (exist && !StringUtils.equals(storedAppName, updatedAppName)) { ApplicationMgtUtil.renameAppPermissionPathNode(storedAppName, updatedAppName); } if (updatedApp.getPermissionAndRoleConfig() != null && ArrayUtils.isNotEmpty(updatedApp.getPermissionAndRoleConfig().getPermissions())) { ApplicationMgtUtil.updatePermissions(updatedAppName, updatedApp.getPermissionAndRoleConfig().getPermissions()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateApplicationPermissions File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
updateApplicationPermissions
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
@Test public void getByIdEmpty(TestContext context) { Async async = context.async(); createFoo(context).getByIdAsString(FOO, randomUuid(), res -> { assertSuccess(context, res); context.assertNull(res.result()); async.complete(); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getByIdEmpty File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
getByIdEmpty
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public void setCurrentWiki(String currentWiki) { this.currentWiki = currentWiki; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCurrentWiki File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
setCurrentWiki
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
@Unstable public static boolean containsElementText(CharSequence content) { return StringUtils.containsAny(content, ELEMENT_SYNTAX); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsElementText File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java Repository: xwiki/xwiki-commons The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-24898
MEDIUM
4
xwiki/xwiki-commons
containsElementText
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
947e8921ebd95462d5a7928f397dd1b64f77c7d5
0
Analyze the following code function for security vulnerabilities
public @CheckForNull PropertyType getPropertyType(@Nonnull Object instance, @Nonnull String field) { // in global.jelly, instance==descriptor return instance==this ? getGlobalPropertyType(field) : getPropertyType(field); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPropertyType File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getPropertyType
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
private static HashMap extractExtensionsFromLevel(Element elem) { HashMap out = new HashMap(); NodeList nl = DomParseUtils.immediateChildElementsByTagName(elem, "extensions"); for (int i = 0, len = nl.getLength(); i < len; ++i) { Element extensionsElem = (Element) nl.item(i); out.putAll( extractPropertiesFromLevel( extensionsElem ) ); } return out; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractExtensionsFromLevel File: src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java Repository: zhutougg/c3p0 The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20433
HIGH
7.5
zhutougg/c3p0
extractExtensionsFromLevel
src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java
2eb0ea97f745740b18dd45e4a909112d4685f87b
0
Analyze the following code function for security vulnerabilities
static String valueToString(Object value, int indentFactor, int indent, boolean escapeForwardSlash) throws JSONException { if (value == null || value.equals(null)) { return "null"; } try { if (value instanceof JSONString) { return ((JSONString)value).toJSONString(); } } catch (Exception e) { /* forget about it */ } if (value instanceof Number) { return numberToString((Number) value); } if (value instanceof Boolean) { return value.toString(); } if (value instanceof JSONObject) { return ((JSONObject)value).toString(indentFactor, indent); } if (value instanceof JSONArray) { return ((JSONArray)value).toString(indentFactor, indent); } return quote(value.toString(), escapeForwardSlash); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: valueToString File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
valueToString
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
Method getMethodWriteReplace() { return methodWriteReplace; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMethodWriteReplace File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
getMethodWriteReplace
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public void onClick(DialogInterface dialog, int which) { try { if (mVm.prepareVpn(null, mPackage, UserHandle.myUserId())) { // Authorize this app to initiate VPN connections in the future without user // intervention. mVm.setVpnPackageAuthorization(mPackage, UserHandle.myUserId(), mVpnType); setResult(RESULT_OK); } } catch (Exception e) { Log.e(TAG, "onClick", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onClick File: packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21251
HIGH
7.3
android
onClick
packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java
57946e2bb73850e817b3c01fa5350d705e178e39
0
Analyze the following code function for security vulnerabilities
void recordPssSample(ProcessRecord proc, int procState, long pss, long uss, long now) { proc.lastPssTime = now; proc.baseProcessTracker.addPss(pss, uss, true, proc.pkgList); if (DEBUG_PSS) Slog.d(TAG, "PSS of " + proc.toShortString() + ": " + pss + " lastPss=" + proc.lastPss + " state=" + ProcessList.makeProcStateString(procState)); if (proc.initialIdlePss == 0) { proc.initialIdlePss = pss; } proc.lastPss = pss; if (procState >= ActivityManager.PROCESS_STATE_HOME) { proc.lastCachedPss = pss; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recordPssSample 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
recordPssSample
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public FileAndDescription getHomeDir(ServletContextEvent event) { // check JNDI for the home directory first for (String name : HOME_NAMES) { try { InitialContext iniCtxt = new InitialContext(); Context env = (Context) iniCtxt.lookup("java:comp/env"); String value = (String) env.lookup(name); if(value!=null && value.trim().length()>0) return new FileAndDescription(new File(value.trim()),"JNDI/java:comp/env/"+name); // look at one more place. See issue #1314 value = (String) iniCtxt.lookup(name); if(value!=null && value.trim().length()>0) return new FileAndDescription(new File(value.trim()),"JNDI/"+name); } catch (NamingException e) { // ignore } } // next the system property for (String name : HOME_NAMES) { String sysProp = System.getProperty(name); if(sysProp!=null) return new FileAndDescription(new File(sysProp.trim()),"System.getProperty(\""+name+"\")"); } // look at the env var next for (String name : HOME_NAMES) { String env = EnvVars.masterEnvVars.get(name); if(env!=null) return new FileAndDescription(new File(env.trim()).getAbsoluteFile(),"EnvVars.masterEnvVars.get(\""+name+"\")"); } // otherwise pick a place by ourselves String root = event.getServletContext().getRealPath("/WEB-INF/workspace"); if(root!=null) { File ws = new File(root.trim()); if(ws.exists()) // Hudson <1.42 used to prefer this before ~/.hudson, so // check the existence and if it's there, use it. // otherwise if this is a new installation, prefer ~/.hudson return new FileAndDescription(ws,"getServletContext().getRealPath(\"/WEB-INF/workspace\")"); } File legacyHome = new File(new File(System.getProperty("user.home")),".hudson"); if (legacyHome.exists()) { return new FileAndDescription(legacyHome,"$user.home/.hudson"); // before rename, this is where it was stored } File newHome = new File(new File(System.getProperty("user.home")),".jenkins"); return new FileAndDescription(newHome,"$user.home/.jenkins"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHomeDir File: core/src/main/java/hudson/WebAppMain.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-254" ]
CVE-2014-9634
MEDIUM
5
jenkinsci/jenkins
getHomeDir
core/src/main/java/hudson/WebAppMain.java
582128b9ac179a788d43c1478be8a5224dc19710
0
Analyze the following code function for security vulnerabilities
@Editable(order=300, description="" + "To authenticate user against LDAP and retrieve associated attributes and groups, OneDev would have to " + "first authenticate itself against the LDAP server and OneDev does that by sending 'manager' DN and " + "password") @NotEmpty public String getManagerDN() { return managerDN; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getManagerDN File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-90" ]
CVE-2021-32651
MEDIUM
4.3
theonedev/onedev
getManagerDN
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
4440f0c57e440488d7e653417b2547eaae8ad19c
0
Analyze the following code function for security vulnerabilities
@Override public String getStartUserSessionMessage(ComponentName admin) { if (!mHasFeature) { return null; } Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)); synchronized (getLockObject()) { final ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked(); return deviceOwner.startUserSessionMessage; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStartUserSessionMessage File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getStartUserSessionMessage
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private int getTempQsMaxExpansion() { return mQsMaxExpansionHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTempQsMaxExpansion File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
getTempQsMaxExpansion
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public ArtemisSecurityConfigurationBuilder withPathWhitelist(Collection<PathRule> whitelistedPaths) { this.whitelistedPaths = Set.copyOf(whitelistedPaths); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withPathWhitelist File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-501", "CWE-653" ]
CVE-2024-23682
HIGH
8.2
ls1intum/Ares
withPathWhitelist
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
4c146ff85a0fa6022087fb0cffa6b8021d51101f
0