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 void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyCleartextNetwork File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
notifyCleartextNetwork
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public ApiClient addDefaultCookie(String key, String value) { defaultCookieMap.put(key, value); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDefaultCookie File: samples/client/petstore/java/okhttp-gson/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
addDefaultCookie
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static Set<String> normalizedLinuxClassifiers() { return LINUX_OS_CLASSIFIERS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: normalizedLinuxClassifiers 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
normalizedLinuxClassifiers
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public static boolean isBreakpointAvailable(final int id, final FileDownloadModel model, final Boolean outputStreamSupportSeek) { if (model == null) { if (FileDownloadLog.NEED_LOG) { FileDownloadLog.d(FileDownloadUtils.class, "can't continue %d model == null", id); } return false; } if (model.getTempFilePath() == null) { if (FileDownloadLog.NEED_LOG) { FileDownloadLog .d(FileDownloadUtils.class, "can't continue %d temp path == null", id); } return false; } return isBreakpointAvailable(id, model, model.getTempFilePath(), outputStreamSupportSeek); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBreakpointAvailable File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
isBreakpointAvailable
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
@GuardedBy("mProcLock") private boolean processSanityChecksLPr(ProcessRecord process, IApplicationThread thread) { if (process == null || thread == null) { return false; } return Build.IS_DEBUGGABLE || process.isDebuggable(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processSanityChecksLPr 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
processSanityChecksLPr
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public String getPassword(Account account) { int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "getPassword: " + account + ", caller's uid " + Binder.getCallingUid() + ", pid " + Binder.getCallingPid()); } if (account == null) throw new IllegalArgumentException("account is null"); int userId = UserHandle.getCallingUserId(); if (!isAccountManagedByCaller(account.type, callingUid, userId)) { String msg = String.format( "uid %s cannot get secrets for accounts of type: %s", callingUid, account.type); throw new SecurityException(msg); } final long identityToken = clearCallingIdentity(); try { UserAccounts accounts = getUserAccounts(userId); return readPasswordInternal(accounts, account); } finally { restoreCallingIdentity(identityToken); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPassword 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
getPassword
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting void injectRegisterUidObserver(IUidObserver observer, int which) { try { ActivityManager.getService().registerUidObserver(observer, which, ActivityManager.PROCESS_STATE_UNKNOWN, null); } catch (RemoteException shouldntHappen) { } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectRegisterUidObserver 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
injectRegisterUidObserver
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("WeakerAccess") protected void setSearchEntity(Search theSearchEntity) { mySearchEntity = theSearchEntity; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSearchEntity File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setSearchEntity
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
public static Path getMediaFolder(String pi) throws PresentationException, IndexUnreachableException { return getDataFolder(pi, DataManager.getInstance().getConfiguration().getMediaFolder()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMediaFolder File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-15124
MEDIUM
4
intranda/goobi-viewer-core
getMediaFolder
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
44ceb8e2e7e888391e8a941127171d6366770df3
0
Analyze the following code function for security vulnerabilities
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) { menuInflater.inflate(R.menu.fragment_conversation, menu); final MenuItem menuMucDetails = menu.findItem(R.id.action_muc_details); final MenuItem menuContactDetails = menu.findItem(R.id.action_contact_details); final MenuItem menuInviteContact = menu.findItem(R.id.action_invite); final MenuItem menuMute = menu.findItem(R.id.action_mute); final MenuItem menuUnmute = menu.findItem(R.id.action_unmute); if (conversation != null) { if (conversation.getMode() == Conversation.MODE_MULTI) { menuContactDetails.setVisible(false); menuInviteContact.setVisible(conversation.getMucOptions().canInvite()); } else { menuContactDetails.setVisible(!this.conversation.withSelf()); menuMucDetails.setVisible(false); final XmppConnectionService service = activity.xmppConnectionService; menuInviteContact.setVisible(service != null && service.findConferenceServer(conversation.getAccount()) != null); } if (conversation.isMuted()) { menuMute.setVisible(false); } else { menuUnmute.setVisible(false); } ConversationMenuConfigurator.configureAttachmentMenu(conversation, menu); ConversationMenuConfigurator.configureEncryptionMenu(conversation, menu); } super.onCreateOptionsMenu(menu, menuInflater); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCreateOptionsMenu File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
onCreateOptionsMenu
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
protected final Object clone() { return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clone 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
clone
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@Override public void setRequiredStrongAuthTimeout(ComponentName who, long timeoutMs, boolean parent) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return; } Objects.requireNonNull(who, "ComponentName is null"); Preconditions.checkArgument(timeoutMs >= 0, "Timeout must not be a negative number."); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); // timeoutMs with value 0 means that the admin doesn't participate // timeoutMs is clamped to the interval in case the internal constants change in the future final long minimumStrongAuthTimeout = getMinimumStrongAuthTimeoutMs(); if (timeoutMs != 0 && timeoutMs < minimumStrongAuthTimeout) { timeoutMs = minimumStrongAuthTimeout; } if (timeoutMs > DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS) { timeoutMs = DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS; } final int userHandle = caller.getUserId(); boolean changed = false; synchronized (getLockObject()) { ActiveAdmin ap = getParentOfAdminIfRequired(getProfileOwnerOrDeviceOwnerLocked(caller), parent); if (ap.strongAuthUnlockTimeout != timeoutMs) { ap.strongAuthUnlockTimeout = timeoutMs; saveSettingsLocked(userHandle); changed = true; } } if (changed) { mLockSettingsInternal.refreshStrongAuthTimeout(userHandle); // Refreshes the parent if profile has unified challenge, since the timeout would // also affect the parent user in this case. if (isManagedProfile(userHandle) && !isSeparateProfileChallengeEnabled(userHandle)) { mLockSettingsInternal.refreshStrongAuthTimeout(getProfileParentId(userHandle)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequiredStrongAuthTimeout 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
setRequiredStrongAuthTimeout
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public TrustAnchor index(X509Certificate cert) { TrustAnchor anchor = new TrustAnchor(cert, null); index(anchor); return anchor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: index File: src/platform/java/org/conscrypt/TrustedCertificateIndex.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-345" ]
CVE-2016-0818
MEDIUM
4.3
android
index
src/platform/java/org/conscrypt/TrustedCertificateIndex.java
4c9f9c2201116acf790fca25af43995d29980ee0
0
Analyze the following code function for security vulnerabilities
@Exported public boolean isUseSecurity() { return securityRealm!=SecurityRealm.NO_AUTHENTICATION || authorizationStrategy!=AuthorizationStrategy.UNSECURED; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUseSecurity 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
isUseSecurity
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void setShow4All(boolean value) { show4all=value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setShow4All File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4040
MEDIUM
6.5
dotCMS/core
setShow4All
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return getWorld().hashCode(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
hashCode
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
@Override public void init(XWikiContext context) { super.init(context); this.alwaysUsedExtensions = new HashMap<>(); getExtensionClass(context); Utils.getComponent(ObservationManager.class).addListener(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29206
MEDIUM
5.4
xwiki/xwiki-platform
init
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
0
Analyze the following code function for security vulnerabilities
private boolean removeAccountInternal(UserAccounts accounts, Account account, int callingUid) { boolean isChanged = false; boolean userUnlocked = isLocalUnlockedUser(accounts.userId); if (!userUnlocked) { Slog.i(TAG, "Removing account " + account.toSafeString() + " while user " + accounts.userId + " is still locked. CE data will be removed later"); } synchronized (accounts.dbLock) { synchronized (accounts.cacheLock) { Map<String, Integer> packagesToVisibility = getRequestingPackages(account, accounts); List<String> accountRemovedReceivers = getAccountRemovedReceivers(account, accounts); accounts.accountsDb.beginTransaction(); // Set to a placeholder value, this will only be used if the database // transaction succeeds. long accountId = -1; try { accountId = accounts.accountsDb.findDeAccountId(account); if (accountId >= 0) { isChanged = accounts.accountsDb.deleteDeAccount(accountId); } // always delete from CE table if CE storage is available // DE account could be removed while CE was locked if (userUnlocked) { long ceAccountId = accounts.accountsDb.findCeAccountId(account); if (ceAccountId >= 0) { accounts.accountsDb.deleteCeAccount(ceAccountId); } } accounts.accountsDb.setTransactionSuccessful(); } finally { accounts.accountsDb.endTransaction(); } if (isChanged) { removeAccountFromCacheLocked(accounts, account); for (Entry<String, Integer> packageToVisibility : packagesToVisibility .entrySet()) { if ((packageToVisibility.getValue() == AccountManager.VISIBILITY_VISIBLE) || (packageToVisibility.getValue() == AccountManager.VISIBILITY_USER_MANAGED_VISIBLE)) { notifyPackage(packageToVisibility.getKey(), accounts); } } // Only broadcast LOGIN_ACCOUNTS_CHANGED if a change occurred. sendAccountsChangedBroadcast(accounts.userId); for (String packageName : accountRemovedReceivers) { sendAccountRemovedBroadcast(account, packageName, accounts.userId); } String action = userUnlocked ? AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE : AccountsDb.DEBUG_ACTION_ACCOUNT_REMOVE_DE; logRecord(action, AccountsDb.TABLE_ACCOUNTS, accountId, accounts); } } } final long id = Binder.clearCallingIdentity(); try { int parentUserId = accounts.userId; if (canHaveProfile(parentUserId)) { // Remove from any restricted profiles that are sharing this account. List<UserInfo> users = getUserManager().getAliveUsers(); for (UserInfo user : users) { if (user.isRestricted() && parentUserId == (user.restrictedProfileParentId)) { removeSharedAccountAsUser(account, user.id, callingUid); } } } } finally { Binder.restoreCallingIdentity(id); } if (isChanged) { synchronized (accounts.credentialsPermissionNotificationIds) { for (Pair<Pair<Account, String>, Integer> key : accounts.credentialsPermissionNotificationIds.keySet()) { if (account.equals(key.first.first) && AccountManager.ACCOUNT_ACCESS_TOKEN_TYPE.equals(key.first.second)) { final int uid = (Integer) key.second; mHandler.post(() -> cancelAccountAccessRequestNotificationIfNeeded( account, uid, false)); } } } } AccountManager.invalidateLocalAccountUserDataCaches(); return isChanged; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAccountInternal 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
removeAccountInternal
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public ROWTYPE addRowAt(int index) { if (index > rows.size() || index < 0) { throw new IllegalArgumentException( "Unable to add row at index " + index); } ROWTYPE row = createRow(); rows.add(index, row); getSectionState().rows.add(index, row.getRowState()); for (Object id : grid.columns.keySet()) { row.addCell(id); } markAsDirty(); return row; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addRowAt File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
addRowAt
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public @TransitionOldType int getTransit() { return mTransit; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTransit 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
getTransit
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private IntValues orderWithDefault0(IntValues origin, List<String> expectedOrder) { IntValues intValues = new IntValues(); expectedOrder.forEach(id -> { KVInt e = new KVInt(); e.setId(id); e.setValue(origin.findValue(id, 0)); intValues.addKVInt(e); }); return intValues; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: orderWithDefault0 File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java Repository: apache/skywalking The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-9483
MEDIUM
5
apache/skywalking
orderWithDefault0
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
2b6aae3b733f9dbeae1d6eff4f1975c723e1e7d1
0
Analyze the following code function for security vulnerabilities
public HttpRequest open(final HttpConnection httpConnection) { if (this.httpConnection != null) { throw new HttpException("Connection already opened"); } this.httpConnection = httpConnection; this.httpConnectionProvider = null; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: open 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
open
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
public void setCredentialRequiredToDecrypt(boolean required) { if (!(getUserManager().isSystemUser() || getUserManager().isPrimaryUser())) { throw new IllegalStateException( "Only the system or primary user may call setCredentialRequiredForDecrypt()"); } if (isDeviceEncryptionEnabled()){ Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCredentialRequiredToDecrypt File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
setCredentialRequiredToDecrypt
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private static void addOpenUpgradableSecurityTypeIfNecessary(WifiConfiguration config) { if (!config.isSecurityType(WifiConfiguration.SECURITY_TYPE_OPEN)) return; if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_OWE)) return; Log.d(TAG, "Add upgradable OWE configuration."); SecurityParams oweParams = SecurityParams.createSecurityParamsBySecurityType( WifiConfiguration.SECURITY_TYPE_OWE); oweParams.setIsAddedByAutoUpgrade(true); config.addSecurityParams(oweParams); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addOpenUpgradableSecurityTypeIfNecessary File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
addOpenUpgradableSecurityTypeIfNecessary
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
private static List<Route> findRoutes(final Set<Route.Definition> routeDefs, final String method, final String path, final MediaType type, final List<MediaType> accept) { List<Route> routes = new ArrayList<>(); for (Route.Definition routeDef : routeDefs) { Optional<Route> route = routeDef.matches(method, path, type, accept); if (route.isPresent()) { routes.add(route.get()); } } return routes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findRoutes File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-15477
MEDIUM
4.3
jooby-project/jooby
findRoutes
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
34856a738829d8fedca4ed27bd6ff413af87186f
0
Analyze the following code function for security vulnerabilities
@Override public boolean isRuntimePermission(String permission) { try { PermissionInfo info = mActivityManagerService.mContext.getPackageManager() .getPermissionInfo(permission, 0); return info.protectionLevel == PermissionInfo.PROTECTION_DANGEROUS; } catch (NameNotFoundException nnfe) { Slog.e(TAG, "No such permission: "+ permission, nnfe); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRuntimePermission File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
isRuntimePermission
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public void remove() { removeAllComponents(); super.remove(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remove File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
remove
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public ClientConfig getClientConfig() { return clientConfig; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClientConfig File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getClientConfig
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private void onUserConnectChoiceSet(List<WifiConfiguration> networks, String choiceKey, int rssi) { for (WifiConfiguration config : networks) { PasspointProvider provider = mProviders.get(config.getProfileKey()); if (provider != null) { provider.setUserConnectChoice(choiceKey, rssi); } } PasspointProvider provider = mProviders.get(choiceKey); if (provider != null) { provider.setUserConnectChoice(null, 0); } mWifiConfigManager.saveToStore(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUserConnectChoiceSet File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
onUserConnectChoiceSet
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public static void parseDirectives(String directives, BiConsumer<String, String> callback) { final int len = directives.length(); for (int i = 0; i < len;) { final int nameStart = i; final String name; final String value; // Find the name. for (; i < len; i++) { final char ch = directives.charAt(i); if (ch == ',' || ch == '=') { break; } } name = directives.substring(nameStart, i).trim(); // Find the value. if (i == len || directives.charAt(i) == ',') { // Skip comma or go beyond 'len' to break the loop. i++; value = null; } else { // Skip '='. i++; // Skip whitespaces. for (; i < len; i++) { final char ch = directives.charAt(i); if (ch != ' ' && ch != '\t') { break; } } if (i < len && directives.charAt(i) == '\"') { // Handle quoted string. // Skip the opening quote. i++; final int valueStart = i; // Find the closing quote. for (; i < len; i++) { if (directives.charAt(i) == '\"') { break; } } value = directives.substring(valueStart, i); // Skip the closing quote. i++; // Find the comma and skip it. for (; i < len; i++) { if (directives.charAt(i) == ',') { i++; break; } } } else { // Handle unquoted string. final int valueStart = i; // Find the comma. for (; i < len; i++) { if (directives.charAt(i) == ',') { break; } } value = directives.substring(valueStart, i).trim(); // Skip the comma. i++; } } if (!name.isEmpty()) { callback.accept(Ascii.toLowerCase(name), Strings.emptyToNull(value)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseDirectives File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
parseDirectives
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public static boolean clearCache() { // clear all cache CacheLRUWrapper lruHandler = CacheLRUWrapper.getInstance(); File cacheDir = lruHandler.getCacheDir().getFile(); if (!checkToClearCache()) { return false; } LOG.debug("Clearing cache directory: {}", cacheDir); synchronized (lruHandler) { lruHandler.lock(); try { cacheDir = cacheDir.getCanonicalFile(); // remove windows shortcuts before cache dir is gone if (OsUtil.isWindows()) { removeWindowsShortcuts("ALL"); } FileUtils.recursiveDelete(cacheDir, cacheDir); cacheDir.mkdir(); lruHandler.clearLRUSortedEntries(); lruHandler.store(); } catch (IOException e) { throw new RuntimeException(e); } finally { lruHandler.unlock(); } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearCache File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
clearCache
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
private void migrate87(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Settings.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { String key = element.elementTextTrim("key"); if (key.equals("JOB_EXECUTORS")) { Element valueElement = element.element("value"); if (valueElement != null) { for (Element executorElement: valueElement.elements()) { if (executorElement.getName().contains("DockerExecutor")) executorElement.addElement("mountDockerSock").setText("false"); else if (executorElement.getName().contains("KubernetesExecutor")) executorElement.addElement("mountContainerSock").setText("false"); Element jobRequirementElement = executorElement.element("jobRequirement"); if (jobRequirementElement != null) jobRequirementElement.setName("jobAuthorization"); } } } } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate87 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrate87
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
protected Optional<String> parseAzpClaim(JwtClaims claims) { return parseClaimString(claims, AUTHORIZED_PARTY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseAzpClaim File: security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java Repository: micronaut-projects/micronaut-security The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-36820
MEDIUM
6.5
micronaut-projects/micronaut-security
parseAzpClaim
security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
9728b925221a0d87798ccf250657a3c214b7e980
0
Analyze the following code function for security vulnerabilities
void reset() { numInteresting = 0; numVisible = 0; numDrawn = 0; nowGone = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reset 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
reset
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public AwTestContainerView createAwTestContainerView( final AwContentsClient awContentsClient, boolean supportsLegacyQuirks) { AwTestContainerView testContainerView = createDetachedAwTestContainerView(awContentsClient, supportsLegacyQuirks); getActivity().addView(testContainerView); testContainerView.requestFocus(); return testContainerView; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createAwTestContainerView File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
createAwTestContainerView
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
public void setAuthorizationStrategy(AuthorizationStrategy a) { if (a == null) a = AuthorizationStrategy.UNSECURED; useSecurity = true; authorizationStrategy = a; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAuthorizationStrategy 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
setAuthorizationStrategy
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public void userAuth(UserDTO.PlatformInfo userInfo) { setUserConfig(userInfo); zentaoClient.login(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userAuth File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
userAuth
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public void setSessionCookieName(String sessionCookieName) { this.sessionCookieName = sessionCookieName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSessionCookieName File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java Repository: ratpack The code follows secure coding practices.
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
setSessionCookieName
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
60302fae7ef26897b9a0ec0def6281a9425344cf
0
Analyze the following code function for security vulnerabilities
@Override public int checkOperation(int code, int uid, String packageName, String attributionTag, boolean raw, QuintFunction<Integer, Integer, String, String, Boolean, Integer> superImpl) { if (uid == mTargetUid && isTargetOp(code)) { final int shellUid = UserHandle.getUid(UserHandle.getUserId(uid), Process.SHELL_UID); final long identity = Binder.clearCallingIdentity(); try { return superImpl.apply(code, shellUid, "com.android.shell", null, raw); } finally { Binder.restoreCallingIdentity(identity); } } return superImpl.apply(code, uid, packageName, attributionTag, raw); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkOperation 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
checkOperation
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void setAppointmentType(AppointmentType appointmentType) { this.appointmentType = appointmentType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAppointmentType File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java Repository: openmrs/openmrs-module-appointmentscheduling The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4727
MEDIUM
6.1
openmrs/openmrs-module-appointmentscheduling
setAppointmentType
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
0
Analyze the following code function for security vulnerabilities
@Override @Deprecated public String encodeRedirectUrl(String s) { return this.response.encodeRedirectUrl(s); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encodeRedirectUrl File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
encodeRedirectUrl
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
protected AnnotatedConstructor constructDefaultConstructor(ClassUtil.Ctor ctor, ClassUtil.Ctor mixin) { if (_intr == null) { // when annotation processing is disabled return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), _emptyAnnotationMap(), NO_ANNOTATION_MAPS); } return new AnnotatedConstructor(_typeContext, ctor.getConstructor(), collectAnnotations(ctor, mixin), // 16-Jun-2019, tatu: default is zero-args, so can't have parameter annotations NO_ANNOTATION_MAPS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: constructDefaultConstructor File: src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
constructDefaultConstructor
src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
@Override public MediaPackage addTrack(InputStream in, String fileName, MediaPackageElementFlavor flavor, String[] tags, MediaPackage mediaPackage) throws IOException, IngestException { Job job = null; try { job = serviceRegistry.createJob(JOB_TYPE, INGEST_TRACK, null, null, false, ingestFileJobLoad); job.setStatus(Status.RUNNING); job = serviceRegistry.updateJob(job); String elementId = UUID.randomUUID().toString(); logger.info("Start adding track {} from input stream on mediapackage {}", elementId, mediaPackage); if (fileName.length() > FILENAME_LENGTH_MAX) { final String extension = "." + FilenameUtils.getExtension(fileName); final int length = Math.max(0, FILENAME_LENGTH_MAX - extension.length()); fileName = fileName.substring(0, length) + extension; } URI newUrl = addContentToRepo(mediaPackage, elementId, fileName, in); MediaPackage mp = addContentToMediaPackage(mediaPackage, elementId, newUrl, MediaPackageElement.Type.Track, flavor); if (tags != null && tags.length > 0) { MediaPackageElement trackElement = mp.getTrack(elementId); for (String tag : tags) { logger.debug("Adding tag `{}` to element {}", tag, elementId); trackElement.addTag(tag); } } job.setStatus(Job.Status.FINISHED); logger.info("Successful added track {} on mediapackage {} at URL {}", elementId, mediaPackage, newUrl); return mp; } catch (IOException e) { throw e; } catch (ServiceRegistryException e) { throw new IngestException(e); } catch (NotFoundException e) { throw new IngestException("Unable to update ingest job", e); } finally { finallyUpdateJob(job); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addTrack File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
addTrack
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
public <T extends AccessibleObject> T setAccessible(T object, boolean accessible) { checkTrusted(); Root.OpenAccess.openAccess0(object, accessible); return object; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAccessible File: api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java Repository: Karlatemp/UnsafeAccessor The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-31139
MEDIUM
4.3
Karlatemp/UnsafeAccessor
setAccessible
api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java
4ef83000184e8f13239a1ea2847ee401d81585fd
0
Analyze the following code function for security vulnerabilities
public CaptureType find( String url_suffix ) { return em.find( CaptureType.class, url_suffix ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: find File: src/main/java/com/rtds/svc/CaptureTypeService.java Repository: jdhwpgmbca/pcapture The code follows secure coding practices.
[ "CWE-754" ]
CVE-2021-39196
MEDIUM
6.8
jdhwpgmbca/pcapture
find
src/main/java/com/rtds/svc/CaptureTypeService.java
0f74f431e0970a2e5784dbd955cfa4760e3b1ef7
0
Analyze the following code function for security vulnerabilities
@Override public List<Event> getEvents() { return WIKIEVENTS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEvents File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29510
HIGH
8.8
xwiki/xwiki-platform
getEvents
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
d06ff8a58480abc7f63eb1d4b8b366024d990643
0
Analyze the following code function for security vulnerabilities
private List<ActiveAdmin> getNonDPCActiveAdminsForPolicyLocked(String policyIdentifier) { Integer activeAdminPolicy = POLICY_IDENTIFIER_TO_ACTIVE_ADMIN_POLICY.get(policyIdentifier); if (activeAdminPolicy == null) { Slogf.e(LOG_TAG, "Can't find a active admin policy for %s in POLICY_IDENTIFIER_TO_PERMISSION", policyIdentifier); return new ArrayList<>(); } List<ActiveAdmin> admins = new ArrayList<>(); for (UserInfo userInfo : mUserManager.getUsers()) { List<ComponentName> activeAdmins = getActiveAdmins(userInfo.id); for (ComponentName admin : activeAdmins) { if (isDeviceOwner(admin, userInfo.id) || isProfileOwner(admin, userInfo.id)) { continue; } DevicePolicyData policy = getUserDataUnchecked(userInfo.id); if (isActiveAdminWithPolicyForUserLocked( policy.mAdminMap.get(admin), activeAdminPolicy, userInfo.id)) { admins.add(policy.mAdminMap.get(admin)); } } } return admins; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNonDPCActiveAdminsForPolicyLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getNonDPCActiveAdminsForPolicyLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void requestRows(int firstRowIndex, int numberOfRows, int firstCachedRowIndex, int cacheSize) { onRequestRows(firstRowIndex, numberOfRows, firstCachedRowIndex, cacheSize); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestRows File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-20" ]
CVE-2021-33609
MEDIUM
4
vaadin/framework
requestRows
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
0
Analyze the following code function for security vulnerabilities
@Override public final boolean isFinal() { return Modifier.isFinal(_class.getModifiers()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFinal File: src/main/java/com/fasterxml/jackson/databind/JavaType.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
isFinal
src/main/java/com/fasterxml/jackson/databind/JavaType.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
private void _setToBigDecimal(BigDecimal n) { int fracLength = n.scale(); n = n.scaleByPowerOfTen(fracLength); BigInteger bi = n.toBigInteger(); _setToBigInteger(bi); scale -= fracLength; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _setToBigDecimal File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
_setToBigDecimal
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
private ShortcutUser loadUserInternal(@UserIdInt int userId, InputStream is, boolean fromBackup) throws XmlPullParserException, IOException, InvalidFileFormatException { ShortcutUser ret = null; TypedXmlPullParser parser; if (fromBackup) { parser = Xml.newFastPullParser(); parser.setInput(is, StandardCharsets.UTF_8.name()); } else { parser = Xml.resolvePullParser(is); } int type; while ((type = parser.next()) != XmlPullParser.END_DOCUMENT) { if (type != XmlPullParser.START_TAG) { continue; } final int depth = parser.getDepth(); final String tag = parser.getName(); if (DEBUG_LOAD || DEBUG_REBOOT) { Slog.d(TAG, String.format("depth=%d type=%d name=%s", depth, type, tag)); } if ((depth == 1) && ShortcutUser.TAG_ROOT.equals(tag)) { ret = ShortcutUser.loadFromXml(this, parser, userId, fromBackup); continue; } throwForInvalidTag(depth, tag); } return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadUserInternal 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
loadUserInternal
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public ServerBuilder tls(PrivateKey key, X509Certificate... keyCertChain) { return (ServerBuilder) TlsSetters.super.tls(key, keyCertChain); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tls File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
tls
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
@POST @Path("/WorkSpaceClientEnqueue.action") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public Response workspaceClientEnqueue(@FormParam(WorkSpaceAdapter.CLIENT_NAME) String clientName, @FormParam(WorkSpaceAdapter.WORK_BUNDLE_OBJ) String workBundleString) { logger.debug("TPWorker incoming execute! check prio={}", Thread.currentThread().getPriority()); // TODO Doesn't look like anything is actually calling this, should we remove this? final boolean success; try { // Look up the place reference final String nsName = KeyManipulator.getServiceLocation(clientName); final IPickUpSpace place = (IPickUpSpace) Namespace.lookup(nsName); if (place == null) { throw new IllegalArgumentException("No client place found using name " + clientName); } final ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(workBundleString.getBytes("8859_1"))); WorkBundle paths = (WorkBundle) ois.readObject(); success = place.enque(paths); } catch (Exception e) { logger.warn("WorkSpaceClientEnqueWorker exception", e); return Response.serverError().entity("WorkSpaceClientEnqueWorker exception:\n" + e.getMessage()).build(); } if (success) { // old success from WorkSpaceClientEnqueWorker // return WORKER_SUCCESS; return Response.ok().entity("Successful add to the PickUpPlaceClient queue").build(); } else { // old failure from WorkSpaceClientEnqueWorker // return new WorkerStatus(WorkerStatus.FAILURE, "WorkSpaceClientEnqueWorker failed, queue full"); return Response.serverError().entity("WorkSpaceClientEnqueWorker failed, queue full").build(); } }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2021-32634 - Severity: MEDIUM - CVSS Score: 6.5 Description: Merge pull request from GHSA-m5qf-gfmp-7638 * Remove unsafe serialization from PayloadUtil * This code will likely be removed wholesale, but this change should be used as a departure point for future development if we end up re-implementing moveTo and friends. * Removed vestigial MoveTo related code. * Remove unsafe serialization in WorkSpace infra. * Favor DataInput/DataOutputStream over ObjectInput/ObjectOutputStream * Implement lightweight serialization in WorkBundle/WorkUnit * Updates to WorkBundle serDe, added tests. - set limit on number of WorkUnits per bundle. In practice these are commonly less than 1024. - added null handling for WorkBundle/WorkUnit string fields. - confirmed readUTF/writeUTF has a limit ensuring strings will be 65535 characters or less. * Minor cleanup to WorkBundleTest * Minor Change to WorkBundleTest * Formatting updates Function: workspaceClientEnqueue File: src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java Repository: NationalSecurityAgency/emissary Fixed Code: @POST @Path("/WorkSpaceClientEnqueue.action") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public Response workspaceClientEnqueue(@FormParam(WorkSpaceAdapter.CLIENT_NAME) String clientName, @FormParam(WorkSpaceAdapter.WORK_BUNDLE_OBJ) String workBundleString) { logger.debug("TPWorker incoming execute! check prio={}", Thread.currentThread().getPriority()); // TODO Doesn't look like anything is actually calling this, should we remove this? final boolean success; try { // Look up the place reference final String nsName = KeyManipulator.getServiceLocation(clientName); final IPickUpSpace place = (IPickUpSpace) Namespace.lookup(nsName); if (place == null) { throw new IllegalArgumentException("No client place found using name " + clientName); } final DataInputStream ois = new DataInputStream(new ByteArrayInputStream(workBundleString.getBytes("8859_1"))); WorkBundle paths = WorkBundle.readFromStream(ois); success = place.enque(paths); } catch (Exception e) { logger.warn("WorkSpaceClientEnqueWorker exception", e); return Response.serverError().entity("WorkSpaceClientEnqueWorker exception:\n" + e.getMessage()).build(); } if (success) { // old success from WorkSpaceClientEnqueWorker // return WORKER_SUCCESS; return Response.ok().entity("Successful add to the PickUpPlaceClient queue").build(); } else { // old failure from WorkSpaceClientEnqueWorker // return new WorkerStatus(WorkerStatus.FAILURE, "WorkSpaceClientEnqueWorker failed, queue full"); return Response.serverError().entity("WorkSpaceClientEnqueWorker failed, queue full").build(); } }
[ "CWE-502" ]
CVE-2021-32634
MEDIUM
6.5
NationalSecurityAgency/emissary
workspaceClientEnqueue
src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java
40260b1ec1f76cc92361702cc14fa1e4388e19d7
1
Analyze the following code function for security vulnerabilities
public ApiClient setClientConfig(ClientConfig clientConfig) { this.clientConfig = clientConfig; // Rebuild HTTP Client according to the new "clientConfig" value. this.httpClient = buildHttpClient(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setClientConfig File: samples/client/petstore/java/retrofit2-play26/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
setClientConfig
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
protected void customizeClientBuilder(ClientBuilder clientBuilder) { // No-op extension point }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: customizeClientBuilder File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
customizeClientBuilder
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public Object connect(String url, boolean read, boolean write, int timeout) throws IOException { URL u = new URL(url); CookieHandler.setDefault(null); URLConnection con = u.openConnection(); if (con instanceof HttpURLConnection) { HttpURLConnection c = (HttpURLConnection) con; c.setUseCaches(false); c.setDefaultUseCaches(false); c.setInstanceFollowRedirects(false); if(timeout > -1) { c.setConnectTimeout(timeout); } if (android.os.Build.VERSION.SDK_INT > 13) { c.setRequestProperty("Connection", "close"); } } con.setDoInput(read); con.setDoOutput(write); return con; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connect 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
connect
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public final int startActivity(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle options) { return startActivityAsUser(caller, callingPackage, intent, resolvedType, resultTo, resultWho, requestCode, startFlags, profilerInfo, options, UserHandle.getCallingUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivity 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
startActivity
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private void resolveAspectRatioRestriction(Configuration newParentConfiguration) { final Configuration resolvedConfig = getResolvedOverrideConfiguration(); final Rect parentAppBounds = newParentConfiguration.windowConfiguration.getAppBounds(); final Rect parentBounds = newParentConfiguration.windowConfiguration.getBounds(); final Rect resolvedBounds = resolvedConfig.windowConfiguration.getBounds(); // Use tmp bounds to calculate aspect ratio so we can know whether the activity should use // restricted size (resolved bounds may be the requested override bounds). mTmpBounds.setEmpty(); mIsAspectRatioApplied = applyAspectRatio(mTmpBounds, parentAppBounds, parentBounds); // If the out bounds is not empty, it means the activity cannot fill parent's app bounds, // then they should be aligned later in #updateResolvedBoundsHorizontalPosition(). if (!mTmpBounds.isEmpty()) { resolvedBounds.set(mTmpBounds); } if (!resolvedBounds.isEmpty() && !resolvedBounds.equals(parentBounds)) { // Compute the configuration based on the resolved bounds. If aspect ratio doesn't // restrict, the bounds should be the requested override bounds. getTaskFragment().computeConfigResourceOverrides(resolvedConfig, newParentConfiguration, getFixedRotationTransformDisplayInfo()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveAspectRatioRestriction 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
resolveAspectRatioRestriction
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
void attachStartingWindow(@NonNull WindowState startingWindow) { startingWindow.mStartingData = mStartingData; mStartingWindow = startingWindow; if (mStartingData != null && mStartingData.mAssociatedTask != null) { attachStartingSurfaceToAssociatedTask(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachStartingWindow 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
attachStartingWindow
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private void inflateSignalClusters() { reinflateSignalCluster(mKeyguardStatusBar); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inflateSignalClusters File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
inflateSignalClusters
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder up() { return up(1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: up File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
up
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public Thread newThread(final Runnable r) { return new Thread(r, "Gnuplot #" + id.incrementAndGet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newThread File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2023-25826
CRITICAL
9.8
OpenTSDB/opentsdb
newThread
src/tsd/GraphHandler.java
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
0
Analyze the following code function for security vulnerabilities
public String getUserviewName(String json) { try { JSONObject userviewObj = new JSONObject(json); return PropertyUtil.getProperties(userviewObj.getJSONObject("properties")).get("name").toString(); } catch (Exception ex) { LogUtil.error(getClass().getName(), ex, "Get Userview Name Error!!"); } return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserviewName File: wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
getUserviewName
wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public boolean hasFeature(final BrowserVersionFeatures feature) { return getPage().getWebClient().getBrowserVersion().hasFeature(feature); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasFeature File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
hasFeature
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
public Cursor rawQuery(String sql, String[] selectionArgs, CancellationSignal cancellationSignal) { return rawQueryWithFactory(null, sql, selectionArgs, null, cancellationSignal); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rawQuery File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
rawQuery
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public List<Delta> getLastChanges(XWikiContext context) throws XWikiException, DifferentiationFailedException { Version version = getRCSVersion(); try { String prev = getDocumentArchive(context).getPrevVersion(version).toString(); XWikiDocument prevDoc = context.getWiki().getDocument(this, prev, context); return getDeltas( Diff.diff(ToString.stringToArray(prevDoc.getContent()), ToString.stringToArray(getContent()))); } catch (Exception ex) { LOGGER.debug("Exception getting differences from previous version: " + ex.getMessage()); } return new ArrayList<Delta>(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastChanges 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
getLastChanges
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
public void clientIdChanged(ClientModel client, String newClientId) { logger.debugf("Updating clientId from '%s' to '%s'", client.getClientId(), newClientId); UserModel serviceAccountUser = realmManager.getSession().users().getServiceAccount(client); if (serviceAccountUser != null) { String username = ServiceAccountConstants.SERVICE_ACCOUNT_USER_PREFIX + newClientId; serviceAccountUser.setUsername(username); serviceAccountUser.setEmail(username + "@placeholder.org"); } }
Vulnerability Classification: - CWE: CWE-798 - CVE: CVE-2019-14837 - Severity: MEDIUM - CVSS Score: 6.4 Description: KEYCLOAK-10780 Stop creating placeholder e-mails for service accounts (#228) Function: clientIdChanged File: services/src/main/java/org/keycloak/services/managers/ClientManager.java Repository: keycloak Fixed Code: public void clientIdChanged(ClientModel client, String newClientId) { logger.debugf("Updating clientId from '%s' to '%s'", client.getClientId(), newClientId); UserModel serviceAccountUser = realmManager.getSession().users().getServiceAccount(client); if (serviceAccountUser != null) { String username = ServiceAccountConstants.SERVICE_ACCOUNT_USER_PREFIX + newClientId; serviceAccountUser.setUsername(username); } }
[ "CWE-798" ]
CVE-2019-14837
MEDIUM
6.4
keycloak
clientIdChanged
services/src/main/java/org/keycloak/services/managers/ClientManager.java
9a7c1a91a59ab85e7f8889a505be04a71580777f
1
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder2 inst(String target, String data) { return instruction(target, data); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inst File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
inst
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
protected Class<? extends XWikiForm> getFormClass() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFormClass File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-35157
MEDIUM
4.8
xwiki/xwiki-platform
getFormClass
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
35e9073ffec567861e0abeea072bd97921a3decf
0
Analyze the following code function for security vulnerabilities
public boolean hasSame(Collection<? extends AbstractProject> projects) { return hasSame(null,projects); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasSame File: core/src/main/java/hudson/tasks/BuildTrigger.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
hasSame
core/src/main/java/hudson/tasks/BuildTrigger.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@Override public void onProposedRotationChanged(int rotation) { if (localLOGV) Slog.v(TAG, "onProposedRotationChanged, rotation=" + rotation); updateRotation(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onProposedRotationChanged 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
onProposedRotationChanged
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
public byte[] getBuffer(String resourceUri, Map<String, Object[]> queryParams, Object... elements) throws Exception { InputStream is = getInputStream(resourceUri, queryParams, elements); byte[] buffer; try { buffer = IOUtils.toByteArray(is); } finally { is.close(); } return buffer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBuffer 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
getBuffer
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
public static XWiki getMainXWiki(boolean wait, XWikiContext context) throws XWikiException { String xwikiname = DEFAULT_MAIN_WIKI; context.setMainXWiki(xwikiname); XWiki xwiki; try { XWikiEngineContext econtext = context.getEngineContext(); xwiki = (XWiki) econtext.getAttribute(xwikiname); if (xwiki == null) { // Start XWiki initialization synchronized (XWiki.class) { xwiki = (XWiki) econtext.getAttribute(xwikiname); if (xwiki == null && job == null) { job = Utils.getComponent((Type) Job.class, XWikiInitializerJob.JOBTYPE); if (job.getStatus() == null) { // "Pre-initialize" XWikiStubContextProvider so that XWiki initializer can find one Utils.<XWikiStubContextProvider>getComponent(XWikiStubContextProvider.class) .initialize(context); job.startAsync(); } } } // Wait until XWiki is initialized if (wait) { job.join(); xwiki = (XWiki) econtext.getAttribute(xwikiname); } } context.setWiki(xwiki); return xwiki; } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI, XWikiException.ERROR_XWIKI_INIT_FAILED, "Could not initialize main XWiki instance", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMainXWiki 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
getMainXWiki
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public void setValue(Object o){ value = o; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setValue File: domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.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
setValue
domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void migrate26(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Projects.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { Element createdAtElement = element.element("createdAt"); createdAtElement.setName("createDate"); element.addElement("updateDate").setText(createdAtElement.getText()); } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate26 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrate26
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
private void transferActiveAdminUncheckedLocked(ComponentName incomingReceiver, ComponentName outgoingReceiver, int userHandle) { final DevicePolicyData policy = getUserData(userHandle); if (!policy.mAdminMap.containsKey(outgoingReceiver) && policy.mAdminMap.containsKey(incomingReceiver)) { // Nothing to transfer - the incoming receiver is already the active admin. return; } final DeviceAdminInfo incomingDeviceInfo = findAdmin(incomingReceiver, userHandle, /* throwForMissingPermission= */ true); final ActiveAdmin adminToTransfer = policy.mAdminMap.get(outgoingReceiver); final int oldAdminUid = adminToTransfer.getUid(); adminToTransfer.transfer(incomingDeviceInfo); policy.mAdminMap.remove(outgoingReceiver); policy.mAdminMap.put(incomingReceiver, adminToTransfer); if (policy.mPasswordOwner == oldAdminUid) { policy.mPasswordOwner = adminToTransfer.getUid(); } saveSettingsLocked(userHandle); sendAdminCommandLocked(adminToTransfer, DeviceAdminReceiver.ACTION_DEVICE_ADMIN_ENABLED, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transferActiveAdminUncheckedLocked 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
transferActiveAdminUncheckedLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public int getUrlDirection() { return mUrlDirection; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUrlDirection File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
getUrlDirection
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasKey() { return haskey; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasKey File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java Repository: rweather/noise-java The code follows secure coding practices.
[ "CWE-125", "CWE-787" ]
CVE-2020-25021
HIGH
7.5
rweather/noise-java
hasKey
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
18e86b6f8bea7326934109aa9ffa705ebf4bde90
0
Analyze the following code function for security vulnerabilities
public boolean isDpcDownloaded() { Preconditions.checkCallAuthorization(hasCallingOrSelfPermission( android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)); ContentResolver cr = mContext.getContentResolver(); return mInjector.binderWithCleanCallingIdentity(() -> Settings.Secure.getIntForUser( cr, MANAGED_PROVISIONING_DPC_DOWNLOADED, /* def= */ 0, /* userHandle= */ cr.getUserId()) == 1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDpcDownloaded 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
isDpcDownloaded
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Internal public DependencyDownloader getDependencyDownloader() { return dependencyDownloader; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-41967 - Severity: HIGH - CVSS Score: 7.5 Description: fix: CVE-2022-41967 Dragonfly v0.3.0-SNAPSHOT fails to properly configure the DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when parsing maven-metadata.xml files provided by external Maven repositories during "SNAPSHOT" version resolution. This patches CVE-2022-41967 by disabling features which may lead to XXE. If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to update Dragonfly to v0.3.1-SNAPSHOT just to be safe. Function: getDependencyDownloader File: src/main/java/dev/hypera/dragonfly/Dragonfly.java Repository: HyperaDev/Dragonfly Fixed Code: @Internal public @NotNull DependencyDownloader getDependencyDownloader() { return dependencyDownloader; }
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
getDependencyDownloader
src/main/java/dev/hypera/dragonfly/Dragonfly.java
9661375e1135127ca6cdb5712e978bec33cc06b3
1
Analyze the following code function for security vulnerabilities
@GuardedBy("this") final void doStopUidLocked(int uid, final UidRecord uidRec) { mServices.stopInBackgroundLocked(uid); enqueueUidChangeLocked(uidRec, uid, UidRecord.CHANGE_IDLE | UidRecord.CHANGE_PROCSTATE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doStopUidLocked 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
doStopUidLocked
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Test public void projectsCOuntQueriesForQueriesWithSubselects() { assertCountQuery("select o from Foo o where cb.id in (select b from Bar b)", "select count(o) from Foo o where cb.id in (select b from Bar b)"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: projectsCOuntQueriesForQueriesWithSubselects 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
projectsCOuntQueriesForQueriesWithSubselects
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public int bindService(IApplicationThread caller, IBinder token, Intent service, String resolvedType, IServiceConnection connection, int flags, String callingPackage, int userId) throws TransactionTooLargeException { enforceNotIsolatedCaller("bindService"); // Refuse possible leaked file descriptors if (service != null && service.hasFileDescriptors() == true) { throw new IllegalArgumentException("File descriptors passed in Intent"); } if (callingPackage == null) { throw new IllegalArgumentException("callingPackage cannot be null"); } synchronized(this) { return mServices.bindServiceLocked(caller, token, service, resolvedType, connection, flags, callingPackage, userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindService 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
bindService
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
void setTaskDescription(TaskDescription _taskDescription) { Bitmap icon; if (_taskDescription.getIconFilename() == null && (icon = _taskDescription.getIcon()) != null) { final String iconFilename = createImageFilename(createTime, task.mTaskId); final File iconFile = new File(TaskPersister.getUserImagesDir(task.mUserId), iconFilename); final String iconFilePath = iconFile.getAbsolutePath(); mAtmService.getRecentTasks().saveImage(icon, iconFilePath); _taskDescription.setIconFilename(iconFilePath); } taskDescription = _taskDescription; getTask().updateTaskDescription(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTaskDescription 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
setTaskDescription
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public String getPronoun() { return AlternativeUiTextProvider.get(PRONOUN, this,Messages.AbstractProject_Pronoun()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPronoun 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
getPronoun
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
private static AppWidgetProviderInfo cloneIfLocalBinder(AppWidgetProviderInfo info) { if (isLocalBinder() && info != null) { return info.clone(); } return info; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cloneIfLocalBinder 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
cloneIfLocalBinder
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
private void archiveProject() { FrontEndTool feTool = (FrontEndTool) tool; Project activeProject = AppInfo.getActiveProject(); if (activeProject.getToolManager().getRunningTools().length > 0) { Msg.showInfo(getClass(), tool.getToolFrame(), TOOL_RUNNING_TITLE, "You must close running tools before starting the archive process."); return; } activeProject.saveToolTemplate("FRONTEND", feTool.saveToolToToolTemplate()); activeProject.save(); if (archiveDialog == null) { archiveDialog = new ArchiveDialog(this); } ProjectLocator projectLocator = activeProject.getProjectLocator(); String archivePathName = getArchivePathName(projectLocator); if (!archiveDialog.showDialog(projectLocator, archivePathName, tool)) { return; } archivePathName = archiveDialog.getArchivePathName(); File archiveJar = new File(archivePathName); File parentFile = archiveJar.getParentFile(); Preferences.setProperty(LAST_ARCHIVE_DIR, parentFile.getAbsolutePath()); isArchiving = true; archivingListener = new TaskListener() { @Override public void taskCompleted(Task task) { isArchiving = false; } @Override public void taskCancelled(Task task) { isArchiving = false; } }; Task task = new ArchiveTask(activeProject, archiveJar); task.addTaskListener(archivingListener); new TaskLauncher(task, tool.getToolFrame()); }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2019-13623 - Severity: MEDIUM - CVSS Score: 6.8 Description: GT-3001 (#789) fix RestoreTask to safely extract files from zip. Abstracted guts of GFileSystemExtractAllTask, reused in RestoreTask. Fixed NPE in RestoreTask if restore was canceled. Function: archiveProject File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java Repository: NationalSecurityAgency/ghidra Fixed Code: private void archiveProject() { FrontEndTool feTool = (FrontEndTool) tool; Project activeProject = AppInfo.getActiveProject(); if (activeProject.getToolManager().getRunningTools().length > 0) { Msg.showInfo(getClass(), tool.getToolFrame(), TOOL_RUNNING_TITLE, "You must close running tools before starting the archive process."); return; } activeProject.saveToolTemplate("FRONTEND", feTool.saveToolToToolTemplate()); activeProject.save(); if (archiveDialog == null) { archiveDialog = new ArchiveDialog(this); } ProjectLocator projectLocator = activeProject.getProjectLocator(); String archivePathName = getArchivePathName(projectLocator); if (!archiveDialog.showDialog(projectLocator, archivePathName, tool)) { return; } archivePathName = archiveDialog.getArchivePathName(); File archiveJar = new File(archivePathName); File parentFile = archiveJar.getParentFile(); Preferences.setProperty(LAST_ARCHIVE_DIR, parentFile.getAbsolutePath()); isArchiving = true; archivingListener = new TaskListener() { @Override public void taskCompleted(Task task) { isArchiving = false; } @Override public void taskCancelled(Task task) { isArchiving = false; } }; Task task = new ArchiveTask(activeProject, archiveJar); task.addTaskListener(archivingListener); new TaskLauncher(task, tool.getToolFrame()); }
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
archiveProject
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
1
Analyze the following code function for security vulnerabilities
private String getHostPath(String path) { String installPath = Bootstrap.installDir.getAbsolutePath(); Preconditions.checkState(path.startsWith(installPath + "/") || path.startsWith(installPath + "\\")); if (hostInstallPath == null) { if (Bootstrap.isInDocker()) hostInstallPath = DockerExecutorUtils.getHostPath(newDocker(), installPath); else hostInstallPath = installPath; } return hostInstallPath + path.substring(installPath.length()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHostPath File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-610" ]
CVE-2022-39206
CRITICAL
9.9
theonedev/onedev
getHostPath
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
0052047a5b5095ac6a6b4a73a522d0272fec3a22
0
Analyze the following code function for security vulnerabilities
public void setOrg(String org) { this.org = org; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOrg File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setOrg
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private Typeface fontToRoboto(String fontName) { if("native:MainThin".equals(fontName)) { return Typeface.create("sans-serif-thin", Typeface.NORMAL); } if("native:MainLight".equals(fontName)) { return Typeface.create("sans-serif-light", Typeface.NORMAL); } if("native:MainRegular".equals(fontName)) { return Typeface.create("sans-serif", Typeface.NORMAL); } if("native:MainBold".equals(fontName)) { return Typeface.create("sans-serif-condensed", Typeface.BOLD); } if("native:MainBlack".equals(fontName)) { return Typeface.create("sans-serif-black", Typeface.BOLD); } if("native:ItalicThin".equals(fontName)) { return Typeface.create("sans-serif-thin", Typeface.ITALIC); } if("native:ItalicLight".equals(fontName)) { return Typeface.create("sans-serif-thin", Typeface.ITALIC); } if("native:ItalicRegular".equals(fontName)) { return Typeface.create("sans-serif", Typeface.ITALIC); } if("native:ItalicBold".equals(fontName)) { return Typeface.create("sans-serif-condensed", Typeface.BOLD_ITALIC); } if("native:ItalicBlack".equals(fontName)) { return Typeface.create("sans-serif-black", Typeface.BOLD_ITALIC); } throw new IllegalArgumentException("Unsupported native font type: " + fontName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fontToRoboto 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
fontToRoboto
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void requestSmAcknowledgementInternal() throws NotConnectedException, InterruptedException { packetWriter.sendStreamElement(AckRequest.INSTANCE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestSmAcknowledgementInternal File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
requestSmAcknowledgementInternal
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
@Override public String changeSessionId() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: changeSessionId 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
changeSessionId
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
@Override public Iterator<Entry<CharSequence, CharSequence>> iteratorCharSequence() { return headers.iterator(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: iteratorCharSequence File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
iteratorCharSequence
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
@Override protected int typeMinimumSize(byte type) { switch (type & 0x0f) { case TType.BOOL: case TType.BYTE: return 1; case TType.I16: return 2; case TType.I32: case TType.FLOAT: return 4; case TType.DOUBLE: case TType.I64: return 8; case TType.STRING: return 4; case TType.LIST: case TType.SET: // type (1 byte) + size (4 bytes) return 1 + 4; case TType.MAP: // key type (1 byte) + value type (1 byte) + size (4 bytes) return 1 + 1 + 4; case TType.STRUCT: return 1; default: throw new TProtocolException( TProtocolException.INVALID_DATA, "Unexpected data type " + (byte) (type & 0x0f)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: typeMinimumSize File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
typeMinimumSize
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
public void getComments(List<Post> allPosts) { Map<String, List<Comment>> allComments = new HashMap<String, List<Comment>>(); List<String> allCommentIds = new ArrayList<String>(); List<Post> forUpdate = new ArrayList<Post>(allPosts.size()); // get the comment ids of the first 5 comments for each post for (Post post : allPosts) { // not set => read comments if any and embed ids in post object if (post.getCommentIds() == null) { forUpdate.add(reloadFirstPageOfComments(post)); allComments.put(post.getId(), post.getComments()); } else { // ids are set => add them to list for bulk read allCommentIds.addAll(post.getCommentIds()); } } if (!allCommentIds.isEmpty()) { // read all comments for all posts on page in bulk for (ParaObject comment : pc.readAll(allCommentIds)) { List<Comment> postComments = allComments.get(comment.getParentid()); if (postComments == null) { allComments.put(comment.getParentid(), new ArrayList<Comment>()); } allComments.get(comment.getParentid()).add((Comment) comment); } } // embed comments in each post for use within the view for (Post post : allPosts) { List<Comment> cl = allComments.get(post.getId()); long clSize = (cl == null) ? 0 : cl.size(); if (post.getCommentIds().size() != clSize) { forUpdate.add(reloadFirstPageOfComments(post)); clSize = post.getComments().size(); } else { post.setComments(cl); if (clSize == post.getItemcount().getLimit() && pc.getCount(Utils.type(Comment.class), Collections.singletonMap("parentid", post.getId())) > clSize) { clSize++; // hack to show the "more" button } } post.getItemcount().setCount(clSize); } if (!forUpdate.isEmpty()) { pc.updateAll(allPosts); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getComments File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getComments
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public static String getFooterURL() { if(footerURL == null) { footerURL = System.getProperty("hudson.footerURL"); if(StringUtils.isBlank(footerURL)) { footerURL = "http://jenkins-ci.org/"; } } return footerURL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFooterURL 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
getFooterURL
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public void broadcastNetworkGsmAuthRequestEvent(String iface, int networkId, String ssid, String[] data) { sendMessage(iface, SUP_REQUEST_SIM_AUTH, new SimAuthRequestData(networkId, WifiEnterpriseConfig.Eap.SIM, ssid, data)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastNetworkGsmAuthRequestEvent File: service/java/com/android/server/wifi/WifiMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
broadcastNetworkGsmAuthRequestEvent
service/java/com/android/server/wifi/WifiMonitor.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public String getURL() { return SvnHelper.getUrlWithoutRevision(remote); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURL File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
getURL
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
@Override public void lockNow(int flags, boolean parent) { final CallerIdentity caller = getCallerIdentity(); final int callingUserId = caller.getUserId(); ComponentName adminComponent = null; synchronized (getLockObject()) { // Make sure the caller has any active admin with the right policy or // the required permission. final ActiveAdmin admin = getActiveAdminOrCheckPermissionForCallerLocked( null, DeviceAdminInfo.USES_POLICY_FORCE_LOCK, parent, android.Manifest.permission.LOCK_DEVICE); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_LOCK_NOW); final long ident = mInjector.binderClearCallingIdentity(); try { adminComponent = admin == null ? null : admin.info.getComponent(); if (adminComponent != null) { // For Profile Owners only, callers with only permission not allowed. if ((flags & DevicePolicyManager.FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY) != 0) { // Evict key Preconditions.checkCallingUser(isManagedProfile(callingUserId)); Preconditions.checkArgument(!parent, "Cannot set FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY for the parent"); if (!isProfileOwner(adminComponent, callingUserId)) { throw new SecurityException("Only profile owner admins can set " + "FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY"); } if (!mInjector.storageManagerIsFileBasedEncryptionEnabled()) { throw new UnsupportedOperationException( "FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY only applies to FBE devices"); } mUserManager.evictCredentialEncryptionKey(callingUserId); } } // Lock all users unless this is a managed profile with a separate challenge final int userToLock = (parent || !isSeparateProfileChallengeEnabled(callingUserId) ? UserHandle.USER_ALL : callingUserId); mLockPatternUtils.requireStrongAuth( STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW, userToLock); // Require authentication for the device or profile if (userToLock == UserHandle.USER_ALL) { if (mIsAutomotive) { if (VERBOSE_LOG) { Slogf.v(LOG_TAG, "lockNow(): not powering off display on automotive" + " build"); } } else { // Power off the display mInjector.powerManagerGoToSleep(SystemClock.uptimeMillis(), PowerManager.GO_TO_SLEEP_REASON_DEVICE_ADMIN, 0); } mInjector.getIWindowManager().lockNow(null); } else { mInjector.getTrustManager().setDeviceLockedForUser(userToLock, true); } if (SecurityLog.isLoggingEnabled() && adminComponent != null) { final int affectedUserId = parent ? getProfileParentId(callingUserId) : callingUserId; SecurityLog.writeEvent(SecurityLog.TAG_REMOTE_LOCK, adminComponent.getPackageName(), callingUserId, affectedUserId); } } catch (RemoteException e) { } finally { mInjector.binderRestoreCallingIdentity(ident); } } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.LOCK_NOW) .setAdmin(adminComponent) .setInt(flags) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lockNow 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
lockNow
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static boolean jsFunction_updateApplication(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException { if (args != null && args.length > 5 && isStringArray(args)) { String newName = (String) args[0]; String oldName = (String) args[1]; String username = (String) args[2]; String tier = (String) args[3]; String callbackUrl = (String) args[4]; String description = (String) args[5]; String tokenType = (String) args[8]; String groupingId = null; Map appAttributes = null; APIConsumer apiConsumer = getAPIConsumer(thisObj); if (args.length > 6 && args[6] != null) { groupingId = (String) args[6]; } // retrieve new values for application attributes try { if (args.length > 9 && args[9] != null) { String applicationAttributeString = (String) args[9]; if (!applicationAttributeString.isEmpty()) { appAttributes = new ObjectMapper().readValue(applicationAttributeString, Map.class); } } } catch (IOException e) { handleException("Error in reading application attributes of " + oldName, e); } // get application with new name if exists Application application = apiConsumer.getApplicationsByName(username, newName, groupingId); if (!newName.equals(oldName)) { // check whether there is an app with new name and throw error if exists if (application != null) { handleException("An application already exist by the name " + newName); } else { // get the application by old name application = apiConsumer.getApplicationsByName(username, oldName, groupingId); } } // update application details Subscriber subscriber = new Subscriber(username); Application updatedApplication = new Application(newName, subscriber); updatedApplication.setId(application.getId()); updatedApplication.setTier(tier); updatedApplication.setCallbackUrl(callbackUrl); updatedApplication.setDescription(description); updatedApplication.setTokenType(tokenType); if (appAttributes != null) { updatedApplication.setApplicationAttributes(appAttributes); } if (APIUtil.isMultiGroupAppSharingEnabled()) { String newGroupId = null; if (args.length > 7 && args[7] != null) { newGroupId = (String) args[7]; } updatedApplication.setGroupId(newGroupId); } apiConsumer.updateApplication(updatedApplication); return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_updateApplication File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_updateApplication
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0