instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public int getPermissionGrantState(ComponentName admin, String callerPackage, String packageName, String permission) throws RemoteException { final CallerIdentity caller = getCallerIdentity(admin, callerPackage); if (isUnicornFlagEnabled()) { enforceCanQuery(MANAGE_DEVICE_POLICY_RUNTIME_PERMISSIONS, caller.getPackageName(), caller.getUserId()); } else { Preconditions.checkCallAuthorization(isSystemUid(caller) || (caller.hasAdminComponent() && (isProfileOwner(caller) || isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller))) || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_PERMISSION_GRANT))); } synchronized (getLockObject()) { if (isFinancedDeviceOwner(caller)) { enforcePermissionGrantStateOnFinancedDevice(packageName, permission); } return mInjector.binderWithCleanCallingIdentity(() -> getPermissionGrantStateForUser( packageName, permission, caller, caller.getUserId())); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermissionGrantState 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
getPermissionGrantState
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public Object getUserData(final String key) { Object value = null; if (userData_ != null) { value = userData_.get(key); } return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserData 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
getUserData
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
private void handleReportEmergencyCallAction() { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onEmergencyCallAction(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleReportEmergencyCallAction File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
handleReportEmergencyCallAction
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public Log findByIdOrAlias(Object idOrAlias) { if (idOrAlias != null) { String sql = "select l.*,last_update_date as lastUpdateDate,u.userName,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId) commentSize ,t.alias as typeAlias,t.typeName as typeName from " + TABLE_NAME + " l inner join user u,type t where t.typeId=l.typeId and u.userId=l.userId and rubbish=? and privacy=? and l.logId=?"; Log log = findFirst(sql, rubbish, privacy, idOrAlias); if (log == null) { sql = "select l.*,last_update_date as lastUpdateDate,u.userName,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId) commentSize ,t.alias as typeAlias,t.typeName as typeName from " + TABLE_NAME + " l inner join user u,type t where t.typeId=l.typeId and u.userId=l.userId and rubbish=? and privacy=? and l.alias=?"; log = findFirst(sql, rubbish, privacy, idOrAlias); } if (log != null) { return log; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByIdOrAlias File: data/src/main/java/com/zrlog/model/Log.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-17420
MEDIUM
6.5
94fzb/zrlog
findByIdOrAlias
data/src/main/java/com/zrlog/model/Log.java
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
0
Analyze the following code function for security vulnerabilities
public Registration addSessionInitListener(SessionInitListener listener) { return Registration.addAndRemove(sessionInitListeners, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addSessionInitListener File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
addSessionInitListener
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
@Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
read
src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
void readPages() throws IOException { if (refsn != null) return; refsp = null; refsn = new ArrayList(); pageInh = new ArrayList(); iteratePages((PRIndirectReference)reader.catalog.get(PdfName.PAGES)); pageInh = null; reader.rootPages.put(PdfName.COUNT, new PdfNumber(refsn.size())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readPages File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
readPages
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public char next(char c) throws JSONException { char n = next(); if (n != c) { throw syntaxError("Expected '" + c + "' and instead saw '" + n + "'."); } return n; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: next File: src/main/java/org/codehaus/jettison/json/JSONTokener.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
next
src/main/java/org/codehaus/jettison/json/JSONTokener.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public void restoreStarting(int userId) { if (DEBUG) { Slog.i(TAG, "Restore starting for user: " + userId); } synchronized (mLock) { // We're starting a new "system" restore operation, so any widget restore // state that we see from here on is intended to replace the current // widget configuration of any/all of the affected apps. mPrunedApps.clear(); mUpdatesByProvider.clear(); mUpdatesByHost.clear(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreStarting 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
restoreStarting
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public ApiClient setTempFolderPath(String tempFolderPath) { this.tempFolderPath = tempFolderPath; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTempFolderPath File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setTempFolderPath
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override void handleStartUser(int userId) { synchronized (getLockObject()) { pushScreenCapturePolicy(userId); pushUserControlDisabledPackagesLocked(userId); } pushUserRestrictions(userId); // When system user is started (device boot), load cache for all users. // This is to mitigate the potential race between loading the cache and keyguard // reading the value during user switch, due to onStartUser() being asynchronous. updatePasswordQualityCacheForUserGroup( userId == UserHandle.USER_SYSTEM ? UserHandle.USER_ALL : userId); updatePermissionPolicyCache(userId); updateAdminCanGrantSensorsPermissionCache(userId); final List<PreferentialNetworkServiceConfig> preferentialNetworkServiceConfigs; synchronized (getLockObject()) { ActiveAdmin owner = getDeviceOrProfileOwnerAdminLocked(userId); preferentialNetworkServiceConfigs = owner != null ? owner.mPreferentialNetworkServiceConfigs : List.of(PreferentialNetworkServiceConfig.DEFAULT); } updateNetworkPreferenceForUser(userId, preferentialNetworkServiceConfigs); startOwnerService(userId, "start-user"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleStartUser 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
handleStartUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public void setExtras(Bundle extras) throws RemoteException { synchronized (mLock) { mExtras = extras == null ? null : new Bundle(extras); } mHandler.post(MessageHandler.MSG_UPDATE_EXTRAS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setExtras File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
setExtras
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
@CLIMethod(name="safe-restart") public HttpResponse doSafeRestart(StaplerRequest req) throws IOException, ServletException, RestartNotSupportedException { checkPermission(ADMINISTER); if (req != null && req.getMethod().equals("GET")) return HttpResponses.forwardToView(this,"_safeRestart.jelly"); safeRestart(); return HttpResponses.redirectToDot(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doSafeRestart 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
doSafeRestart
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private int getConnectionMessageId(int toolbarModelSecurityLevel, boolean isInternalPage) { if (isInternalPage) return R.string.page_info_connection_internal_page; switch (toolbarModelSecurityLevel) { case ToolbarModelSecurityLevel.NONE: return R.string.page_info_connection_http; case ToolbarModelSecurityLevel.SECURE: case ToolbarModelSecurityLevel.EV_SECURE: return R.string.page_info_connection_https; case ToolbarModelSecurityLevel.SECURITY_WARNING: case ToolbarModelSecurityLevel.SECURITY_POLICY_WARNING: return R.string.page_info_connection_mixed; default: assert false : "Invalid security level specified: " + toolbarModelSecurityLevel; return R.string.page_info_connection_http; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnectionMessageId File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2015-1261
MEDIUM
5
chromium
getConnectionMessageId
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
0
Analyze the following code function for security vulnerabilities
private void wakeUpFromPowerKey(long eventTime) { wakeUp(eventTime, mAllowTheaterModeWakeFromPowerKey); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wakeUpFromPowerKey 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
wakeUpFromPowerKey
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
public void setSharedExecutor(ExecutorService executor) { this.sharedExecutor = executor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSharedExecutor File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
setSharedExecutor
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override public Stream<UserSessionModel> loadUserSessionsStream(RealmModel realm, UserModel user, boolean offline, Integer firstResult, Integer maxResults) { String offlineStr = offlineToString(offline); TypedQuery<PersistentUserSessionEntity> query = paginateQuery( em.createNamedQuery("findUserSessionsByUserId", PersistentUserSessionEntity.class), firstResult, maxResults); query.setParameter("offline", offlineStr); query.setParameter("realmId", realm.getId()); query.setParameter("userId", user.getId()); return loadUserSessionsWithClientSessions(query, offlineStr); }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2023-6563 - Severity: HIGH - CVSS Score: 7.7 Description: Fix performance issues with many offline sessions Fixes: #13340 Function: loadUserSessionsStream File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java Repository: keycloak Fixed Code: @Override public Stream<UserSessionModel> loadUserSessionsStream(RealmModel realm, UserModel user, boolean offline, Integer firstResult, Integer maxResults) { String offlineStr = offlineToString(offline); TypedQuery<PersistentUserSessionEntity> query = paginateQuery( em.createNamedQuery("findUserSessionsByUserId", PersistentUserSessionEntity.class), firstResult, maxResults); query.setParameter("offline", offlineStr); query.setParameter("realmId", realm.getId()); query.setParameter("userId", user.getId()); return loadUserSessionsWithClientSessions(query, offlineStr, true); }
[ "CWE-770" ]
CVE-2023-6563
HIGH
7.7
keycloak
loadUserSessionsStream
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
11eb952e1df7cbb95b1e2c101dfd4839a2375695
1
Analyze the following code function for security vulnerabilities
private static File getExternalsFile(AbstractProject project) { return new File(project.getRootDir(),"svnexternals.txt"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalsFile 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
getExternalsFile
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
public static CertRequestInfo fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element element = document.getDocumentElement(); return fromDOM(element); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: fromXML File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java Repository: dogtagpki/pki Fixed Code: public static CertRequestInfo fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element element = document.getDocumentElement(); return fromDOM(element); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
fromXML
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
@Override // Binder call public boolean isHardwareDetected(long deviceId, String opPackageName) { if (!canUseFingerprint(opPackageName, false /* foregroundOnly */, Binder.getCallingUid(), Binder.getCallingPid())) { return false; } return mHalDeviceId != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isHardwareDetected File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
isHardwareDetected
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException { return searchDocuments(wheresql, distinctbylanguage, customMapping, true, nb, start, parameterValues, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: searchDocuments File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
searchDocuments
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
public void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper, int callingUid, @NonNull String packageName) { Message message = obtainMessage(CMD_SAVE_NETWORK, new ConnectNetworkMessage(result, wrapper, packageName)); message.sendingUid = callingUid; sendMessage(message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveNetwork File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
saveNetwork
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void setManagedSubscriptionsPolicy(ManagedSubscriptionsPolicy policy) { CallerIdentity caller = getCallerIdentity(); if (!isCallerDevicePolicyManagementRoleHolder(caller) && !Objects.equals(mInjector.settingsGlobalGetString( Global.ALLOW_WORK_PROFILE_TELEPHONY_FOR_NON_DPM_ROLE_HOLDERS), "1")) { throw new UnsupportedOperationException("This api is not enabled"); } Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller), "This policy can only be set by a profile owner on an organization-owned " + "device."); int parentUserId = getProfileParentId(caller.getUserId()); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); if (hasUserSetupCompleted(parentUserId) && !isAdminTestOnlyLocked( admin.info.getComponent(), caller.getUserId())) { throw new IllegalStateException("Not allowed to apply this policy after setup"); } boolean changed = false; if (!Objects.equals(policy, admin.mManagedSubscriptionsPolicy)) { admin.mManagedSubscriptionsPolicy = policy; changed = true; } if (changed) { saveSettingsLocked(caller.getUserId()); } else { return; } } applyManagedSubscriptionsPolicyIfRequired(); int policyType = getManagedSubscriptionsPolicy().getPolicyType(); final long id = mInjector.binderClearCallingIdentity(); try { if (policyType == ManagedSubscriptionsPolicy.TYPE_ALL_MANAGED_SUBSCRIPTIONS) { installOemDefaultDialerAndSmsApp(caller.getUserId()); updateTelephonyCrossProfileIntentFilters(parentUserId, caller.getUserId(), true); } else if (policyType == ManagedSubscriptionsPolicy.TYPE_ALL_PERSONAL_SUBSCRIPTIONS) { updateTelephonyCrossProfileIntentFilters(parentUserId, caller.getUserId(), false); } } finally { mInjector.binderRestoreCallingIdentity(id); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setManagedSubscriptionsPolicy 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
setManagedSubscriptionsPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public int getCredentialPriority() { return mCredentialPriority; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCredentialPriority File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
getCredentialPriority
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
private static String replacePercent(String toReplace) { return toReplace.replace("%", "%25"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: replacePercent File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
replacePercent
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
@Deprecated public void rename(DocumentReference newDocumentReference, XWikiContext context) throws XWikiException { rename(newDocumentReference, getBackLinkedReferences(context), context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rename 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
rename
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
protected void importXMLBuilderImpl(BaseXMLBuilder builder) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); Node importedNode = getDocument().importNode( builder.getDocument().getDocumentElement(), true); this.xmlNode.appendChild(importedNode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: importXMLBuilderImpl File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
importXMLBuilderImpl
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
private TelecomManager getTelecommManager() { return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTelecommManager File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
getTelecommManager
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public Jooby executor(final ExecutorService executor) { executor((Executor) executor); onStop(r -> executor.shutdown()); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executor File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
executor
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
protected String getShareableUri(boolean http) { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShareableUri File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
getShareableUri
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public void handleApplicationCrash(IBinder app, ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(app); crashInfo.writeToParcel(data, 0); mRemote.transact(HANDLE_APPLICATION_CRASH_TRANSACTION, data, reply, 0); reply.readException(); reply.recycle(); data.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleApplicationCrash File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
handleApplicationCrash
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public Response processAddConnection(ConnectionInfo info) throws Exception { // Older clients should have been defaulting this field to true.. but // they were not. if (wireFormatInfo != null && wireFormatInfo.getVersion() <= 2) { info.setClientMaster(true); } TransportConnectionState state; // Make sure 2 concurrent connections by the same ID only generate 1 // TransportConnectionState object. synchronized (brokerConnectionStates) { state = (TransportConnectionState) brokerConnectionStates.get(info.getConnectionId()); if (state == null) { state = new TransportConnectionState(info, this); brokerConnectionStates.put(info.getConnectionId(), state); } state.incrementReference(); } // If there are 2 concurrent connections for the same connection id, // then last one in wins, we need to sync here // to figure out the winner. synchronized (state.getConnectionMutex()) { if (state.getConnection() != this) { LOG.debug("Killing previous stale connection: {}", state.getConnection().getRemoteAddress()); state.getConnection().stop(); LOG.debug("Connection {} taking over previous connection: {}", getRemoteAddress(), state.getConnection().getRemoteAddress()); state.setConnection(this); state.reset(info); } } registerConnectionState(info.getConnectionId(), state); LOG.debug("Setting up new connection id: {}, address: {}, info: {}", new Object[]{ info.getConnectionId(), getRemoteAddress(), info }); this.faultTolerantConnection = info.isFaultTolerant(); // Setup the context. String clientId = info.getClientId(); context = new ConnectionContext(); context.setBroker(broker); context.setClientId(clientId); context.setClientMaster(info.isClientMaster()); context.setConnection(this); context.setConnectionId(info.getConnectionId()); context.setConnector(connector); context.setMessageAuthorizationPolicy(getMessageAuthorizationPolicy()); context.setNetworkConnection(networkConnection); context.setFaultTolerant(faultTolerantConnection); context.setTransactions(new ConcurrentHashMap<TransactionId, Transaction>()); context.setUserName(info.getUserName()); context.setWireFormatInfo(wireFormatInfo); context.setReconnect(info.isFailoverReconnect()); this.manageable = info.isManageable(); context.setConnectionState(state); state.setContext(context); state.setConnection(this); if (info.getClientIp() == null) { info.setClientIp(getRemoteAddress()); } try { broker.addConnection(context, info); } catch (Exception e) { synchronized (brokerConnectionStates) { brokerConnectionStates.remove(info.getConnectionId()); } unregisterConnectionState(info.getConnectionId()); LOG.warn("Failed to add Connection {}", info.getConnectionId(), e); if (e instanceof SecurityException) { // close this down - in case the peer of this transport doesn't play nice delayedStop(2000, "Failed with SecurityException: " + e.getLocalizedMessage(), e); } throw e; } if (info.isManageable()) { // send ConnectionCommand ConnectionControl command = this.connector.getConnectionControl(); command.setFaultTolerant(broker.isFaultTolerantConfiguration()); if (info.isFailoverReconnect()) { command.setRebalanceConnection(false); } dispatchAsync(command); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processAddConnection File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
processAddConnection
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("deprecation") private static void mapNearCacheConfigXmlGenerator(XmlGenerator gen, NearCacheConfig n) { if (n != null) { if (n.getName() != null) { gen.open("near-cache", "name", n.getName()); } else { gen.open("near-cache"); } gen.node("in-memory-format", n.getInMemoryFormat()) .node("invalidate-on-change", n.isInvalidateOnChange()) .node("time-to-live-seconds", n.getTimeToLiveSeconds()) .node("max-idle-seconds", n.getMaxIdleSeconds()) .node("serialize-keys", n.isSerializeKeys()) .node("cache-local-entries", n.isCacheLocalEntries()) .node("max-size", n.getMaxSize()) .node("eviction-policy", n.getEvictionPolicy()); evictionConfigXmlGenerator(gen, n.getEvictionConfig()); gen.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mapNearCacheConfigXmlGenerator File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
mapNearCacheConfigXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override public List<V> getAll(K name) { checkNotNull(name, "name"); LinkedList<V> values = new LinkedList<V>(); int h = hashingStrategy.hashCode(name); int i = index(h); HeaderEntry<K, V> e = entries[i]; while (e != null) { if (e.hash == h && hashingStrategy.equals(name, e.key)) { values.addFirst(e.getValue()); } e = e.next; } return values; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAll File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
getAll
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
private boolean hasColorizedPermission() { return (flags & Notification.FLAG_CAN_COLORIZE) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasColorizedPermission File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
hasColorizedPermission
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public List<KBTemplate> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByGroupId File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
findByGroupId
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
private void showLocked(Bundle options) { Trace.beginSection("KeyguardViewMediator#showLocked acquiring mShowKeyguardWakeLock"); if (DEBUG) Log.d(TAG, "showLocked"); // ensure we stay awake until we are finished displaying the keyguard mShowKeyguardWakeLock.acquire(); Message msg = mHandler.obtainMessage(SHOW, options); // Treat these messages with priority - This call can originate from #doKeyguardTimeout, // meaning the device should lock as soon as possible and not wait for other messages on // the thread to process first. mHandler.sendMessageAtFrontOfQueue(msg); Trace.endSection(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showLocked File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
showLocked
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
List<Rect> getRectsInScreenSpace(List<Rect> rects, Matrix tmpMatrix, float[] float9) { getTransformationMatrix(float9, tmpMatrix); final List<Rect> transformedRects = new ArrayList<Rect>(); final RectF tmpRect = new RectF(); Rect curr; for (Rect r : rects) { tmpRect.set(r); tmpMatrix.mapRect(tmpRect); curr = new Rect(); tmpRect.roundOut(curr); transformedRects.add(curr); } return transformedRects; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRectsInScreenSpace 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
getRectsInScreenSpace
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public void setJMSRedelivered(boolean redelivered) throws JMSException { this.setBooleanProperty(JMS_MESSAGE_REDELIVERED, redelivered); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setJMSRedelivered File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
setJMSRedelivered
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public String compileEmailTemplate(Map<String, Object> model) { model.put("footerhtml", CONF.emailsFooterHtml()); String fqdn = CONF.rewriteInboundLinksWithFQDN(); if (!StringUtils.isBlank(fqdn)) { model.entrySet().stream().filter(e -> (e.getValue() instanceof String)).forEachOrdered(e -> { model.put(e.getKey(), StringUtils.replace((String) e.getValue(), CONF.serverUrl(), fqdn)); }); } return Utils.compileMustache(model, loadEmailTemplate("notify")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compileEmailTemplate 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
compileEmailTemplate
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public static void saveStructure(Structure structure) throws DotHibernateException { structure.setUrlMapPattern(cleanURLMap(structure.getUrlMapPattern())); Date now = new Date(); structure.setiDate(now); structure.setModDate(now); fixFolderHost(structure); HibernateUtil.saveOrUpdate(structure); if(UtilMethods.isSet(structure.getUrlMapPattern())) { CacheLocator.getContentTypeCache().clearURLMasterPattern(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveStructure File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
saveStructure
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public static Value<?> parseValue(String input) throws InvalidSyntaxException { return new Parser().parseValueImpl(input); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseValue File: src/main/java/graphql/parser/Parser.java Repository: graphql-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-28867
HIGH
7.5
graphql-java
parseValue
src/main/java/graphql/parser/Parser.java
8a1c884c81c0b656db201cfd95881feb0f430a55
0
Analyze the following code function for security vulnerabilities
protected abstract void loginInternal(String username, String password, Resourcepart resource) throws XMPPException, SmackException, IOException, InterruptedException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loginInternal File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
loginInternal
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
@Override public boolean setKeyGrantForApp(ComponentName who, String callerPackage, String alias, String packageName, boolean hasGrant) { Preconditions.checkStringNotEmpty(alias, "Alias to grant cannot be empty"); Preconditions.checkStringNotEmpty(packageName, "Package to grant to cannot be empty"); final CallerIdentity caller = getCallerIdentity(who, callerPackage); Preconditions.checkCallAuthorization((caller.hasAdminComponent() && (isProfileOwner(caller) || isDefaultDeviceOwner(caller))) || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_CERT_SELECTION))); final int granteeUid; try { ApplicationInfo ai = mInjector.getIPackageManager().getApplicationInfo( packageName, 0, caller.getUserId()); Preconditions.checkArgument(ai != null, "Provided package %s is not installed", packageName); granteeUid = ai.uid; } catch (RemoteException e) { throw new IllegalStateException("Failure getting grantee uid", e); } try { return setKeyChainGrantInternal(alias, hasGrant, granteeUid, caller.getUserHandle()); } catch (IllegalArgumentException e) { if (mInjector.isChangeEnabled(THROW_EXCEPTION_WHEN_KEY_MISSING, callerPackage, caller.getUserId())) { throw e; } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setKeyGrantForApp 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
setKeyGrantForApp
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void setNearbyAppStreamingPolicy(int policy) { if (!mHasFeature) { return; } final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller); if (admin.mNearbyAppStreamingPolicy != policy) { admin.mNearbyAppStreamingPolicy = policy; saveSettingsLocked(caller.getUserId()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNearbyAppStreamingPolicy 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
setNearbyAppStreamingPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private Account insertAccountIntoCacheLocked(UserAccounts accounts, Account account) { Account[] accountsForType = accounts.accountCache.get(account.type); int oldLength = (accountsForType != null) ? accountsForType.length : 0; Account[] newAccountsForType = new Account[oldLength + 1]; if (accountsForType != null) { System.arraycopy(accountsForType, 0, newAccountsForType, 0, oldLength); } String token = account.getAccessId() != null ? account.getAccessId() : UUID.randomUUID().toString(); newAccountsForType[oldLength] = new Account(account, token); accounts.accountCache.put(account.type, newAccountsForType); AccountManager.invalidateLocalAccountsDataCaches(); return newAccountsForType[oldLength]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insertAccountIntoCacheLocked 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
insertAccountIntoCacheLocked
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public void clearCachedDataForUnitTest() { mySearchEntity = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearCachedDataForUnitTest 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
clearCachedDataForUnitTest
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
@Override protected void onServiceRemovedLocked(ManagedServiceInfo removed) { if (removeDisabledHints(removed)) { updateListenerHintsLocked(); updateEffectsSuppressorLocked(); } mLightTrimListeners.remove(removed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onServiceRemovedLocked File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onServiceRemovedLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
private String getHighlightMenuKey() { final Intent intent = getIntent(); if (intent != null && TextUtils.equals(intent.getAction(), ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY)) { final String menuKey = intent.getStringExtra( EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_HIGHLIGHT_MENU_KEY); if (!TextUtils.isEmpty(menuKey)) { return menuKey; } } return getString(DEFAULT_HIGHLIGHT_MENU_KEY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHighlightMenuKey File: src/com/android/settings/homepage/SettingsHomepageActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21256
HIGH
7.8
android
getHighlightMenuKey
src/com/android/settings/homepage/SettingsHomepageActivity.java
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
0
Analyze the following code function for security vulnerabilities
public static Set<AccessControlledResource.Priviledge> asSet(AccessControlledResource.Priviledge ... privs) { Set<AccessControlledResource.Priviledge> set = new HashSet<AccessControlledResource.Priviledge>(privs.length); set.addAll(Arrays.asList(privs)); return set; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asSet File: milton-api/src/main/java/io/milton/http/AclUtils.java Repository: miltonio/milton2 The code follows secure coding practices.
[ "CWE-611" ]
CVE-2015-7326
HIGH
7.5
miltonio/milton2
asSet
milton-api/src/main/java/io/milton/http/AclUtils.java
b5851c1
0
Analyze the following code function for security vulnerabilities
private CompletableFuture<Void> buildInvalidateAllFutures(String[] cacheNames) { List<CompletableFuture<Boolean>> futures = new ArrayList<>(); for (String cacheName : cacheNames) { AsyncCache<?> asyncCache = cacheManager.getCache(cacheName).async(); futures.add(asyncCache.invalidateAll()); } CompletableFuture[] futureArray = futures.toArray(new CompletableFuture[0]); return CompletableFuture.allOf(futureArray); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildInvalidateAllFutures File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
buildInvalidateAllFutures
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
public void onNotificationEnqueued(final NotificationRecord r) { final StatusBarNotification sbn = r.sbn; TrimCache trimCache = new TrimCache(sbn); // mServices is the list inside ManagedServices of all the rankers, // There should be only one, but it's a list, so while we enforce // singularity elsewhere, we keep it general here, to avoid surprises. for (final ManagedServiceInfo info : NotificationRankers.this.mServices) { boolean sbnVisible = isVisibleToListener(sbn, info); if (!sbnVisible) { continue; } final int importance = r.getImportance(); final boolean fromUser = r.isImportanceFromUser(); final StatusBarNotification sbnToPost = trimCache.ForListener(info); mHandler.post(new Runnable() { @Override public void run() { notifyEnqueued(info, sbnToPost, importance, fromUser); } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNotificationEnqueued File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onNotificationEnqueued
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public void startCompression() { tc.startCompression(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startCompression File: src/main/java/com/trilead/ssh2/transport/TransportManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
startCompression
src/main/java/com/trilead/ssh2/transport/TransportManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
@Override public void answer(String callId, Session.Info info) throws RemoteException { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: answer File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
answer
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public void sendStream(final int iCode, final String iReason, final String iContentType, final String iFileName, final OCallable<Void, OChunkedResponse> iWriter) throws IOException { writeStatus(iCode, iReason); writeHeaders(iContentType); writeLine("Content-Transfer-Encoding: binary"); writeLine("Transfer-Encoding: chunked"); if (iFileName != null) { writeLine("Content-Disposition: attachment; filename=\"" + iFileName + "\""); } writeLine(null); final OChunkedResponse chunkedOutput = new OChunkedResponse(this); iWriter.call(chunkedOutput); chunkedOutput.close(); flush(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendStream File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java Repository: orientechnologies/orientdb The code follows secure coding practices.
[ "CWE-352" ]
CVE-2015-2912
MEDIUM
6.8
orientechnologies/orientdb
sendStream
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
d5a45e608ba8764fd817c1bdd7cf966564e828e9
0
Analyze the following code function for security vulnerabilities
@Override public int getAvailabilityStatus() { return mContext.getResources().getBoolean(R.bool.config_show_location_scanning) ? AVAILABLE : UNSUPPORTED_ON_DEVICE; }
Vulnerability Classification: - CWE: CWE-862 - CVE: CVE-2023-21247 - Severity: HIGH - CVSS Score: 7.8 Description: Fix: Bluetooth and Wifi scanning location MainSwitch page policy transparency. When DISALLOW_CONFIG_LOCATION is set, make location service's MainSwitchPreference pages for wifi scanning and bluetooth scanning unavailable too, so that intent direct access is disabled. screenshot: http://shortn/_kkK3BMTSh1 Bug: 277333746 Bug: 277333781 Test: atest SettingsRoboTests, on device (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7591fff234886e79c5d0210a2cf3282a69de9be9) Merged-In: I52f9a11b1dd78a5e5dbb1bbde3cda7381c87ae39 Change-Id: I52f9a11b1dd78a5e5dbb1bbde3cda7381c87ae39 Function: getAvailabilityStatus File: src/com/android/settings/location/WifiScanningMainSwitchPreferenceController.java Repository: android Fixed Code: @Override public int getAvailabilityStatus() { return mContext.getResources().getBoolean(R.bool.config_show_location_scanning) ? (mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_LOCATION) ? DISABLED_DEPENDENT_SETTING : AVAILABLE) : UNSUPPORTED_ON_DEVICE; }
[ "CWE-862" ]
CVE-2023-21247
HIGH
7.8
android
getAvailabilityStatus
src/com/android/settings/location/WifiScanningMainSwitchPreferenceController.java
edd4023805bc7fa54ae31de222cde02b9012bbc4
1
Analyze the following code function for security vulnerabilities
private String getContextName() { if ("/".equals(contextPath)) { // default context path doesn't require any ServletContextHelper return null; } try { ServiceReference<?>[] references = context .getAllServiceReferences( ServletContextHelper.class.getName(), null); if (references == null) { reportEmptyContextHelpers(); return null; } Map<Long, ServiceReference<?>> matchedReferences = filterReferencesByContextPath( references); if (matchedReferences.isEmpty()) { reportEmptyContextHelpers(); return null; } if (matchedReferences.size() == 1) { return getContextNameProperty( matchedReferences.values().iterator().next()); } else { ServiceReference<?> reference = matchedReferences .get(context.getBundle().getBundleId()); if (reference == null) { reference = matchedReferences.values().iterator() .next(); trackContextHelperReferences(reference); } return getContextNameProperty(reference); } } catch (InvalidSyntaxException exception) { LoggerFactory.getLogger(OSGiVaadinInitialization.class).error( "Couldn't get all {} services to find the context name", ServletContextHelper.class); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContextName File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java Repository: vaadin/osgi The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
getContextName
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
0
Analyze the following code function for security vulnerabilities
@Override public void setAccountManagementDisabled(ComponentName who, String callerPackageName, String accountType, boolean disabled, boolean parent) { if (!mHasFeature) { return; } enforceMaxStringLength(accountType, "account type"); CallerIdentity caller; if (isPolicyEngineForFinanceFlagEnabled()) { caller = getCallerIdentity(who, callerPackageName); } else { caller = getCallerIdentity(who); } synchronized (getLockObject()) { if (isPolicyEngineForFinanceFlagEnabled()) { int affectedUser = getAffectedUser(parent); EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin( who, MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT, caller.getPackageName(), affectedUser ); if (disabled) { mDevicePolicyEngine.setLocalPolicy( PolicyDefinition.ACCOUNT_MANAGEMENT_DISABLED(accountType), enforcingAdmin, new BooleanPolicyValue(disabled), affectedUser); } else { mDevicePolicyEngine.removeLocalPolicy( PolicyDefinition.ACCOUNT_MANAGEMENT_DISABLED(accountType), enforcingAdmin, affectedUser); } } else { final ActiveAdmin ap; Objects.requireNonNull(who, "ComponentName is null"); /* * When called on the parent DPM instance (parent == true), affects active admin * selection in two ways: * * The ActiveAdmin must be of an org-owned profile owner. * * The parent ActiveAdmin instance should be used for managing the restriction. */ if (parent) { ap = getParentOfAdminIfRequired(getOrganizationOwnedProfileOwnerLocked(caller), parent); } else { Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); ap = getParentOfAdminIfRequired( getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()), parent); } if (disabled) { ap.accountTypesWithManagementDisabled.add(accountType); } else { ap.accountTypesWithManagementDisabled.remove(accountType); } saveSettingsLocked(UserHandle.getCallingUserId()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAccountManagementDisabled 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
setAccountManagementDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public static void backupContext(Map<String, Object> backup, XWikiContext context) { // The XWiki Context isn't recreated when the Execution Context is cloned so we have to backup some of its data. // Backup the current document on the XWiki Context. backup.put("doc", context.getDoc()); backup.put("cdoc", context.get("cdoc")); backup.put("tdoc", context.get("tdoc")); // Backup the secure document backup.put(CKEY_SDOC, context.get(CKEY_SDOC)); // Clone the Execution Context to provide isolation. The clone will have a new Velocity and Script Context. Execution execution = Utils.getComponent(Execution.class); try { execution.pushContext(Utils.getComponent(ExecutionContextManager.class).clone(execution.getContext())); } catch (ExecutionContextException e) { throw new RuntimeException("Failed to clone the Execution Context", e); } // Bridge with old XWiki Context, required for legacy code. execution.getContext().setProperty(XWikiContext.EXECUTIONCONTEXT_KEY, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: backupContext 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
backupContext
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 final boolean isSubTypeOf(Class type) { return type.isAssignableFrom(clazz); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSubTypeOf File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
isSubTypeOf
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
protected void readNoEnd() throws ParseException { if (++pos >= len) { this.c = EOI; throw new ParseException(pos - 1, ERROR_UNEXPECTED_EOF, "EOF"); } else this.c = (char) in[pos]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readNoEnd File: json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java Repository: netplex/json-smart-v1 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2021-31684
MEDIUM
5
netplex/json-smart-v1
readNoEnd
json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java
c558138b3cb11f586643f95fbca4ce5c4e92a198
0
Analyze the following code function for security vulnerabilities
private void showStrictModeViolation(int arg, int pid) { final boolean on = arg != 0; synchronized(mWindowMap) { // Ignoring requests to enable the red border from clients // which aren't on screen. (e.g. Broadcast Receivers in // the background..) if (on) { boolean isVisible = false; final int numDisplays = mDisplayContents.size(); for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList(); final int numWindows = windows.size(); for (int winNdx = 0; winNdx < numWindows; ++winNdx) { final WindowState ws = windows.get(winNdx); if (ws.mSession.mPid == pid && ws.isVisibleLw()) { isVisible = true; break; } } } if (!isVisible) { return; } } if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION showStrictModeViolation"); SurfaceControl.openTransaction(); try { // TODO(multi-display): support multiple displays if (mStrictModeFlash == null) { mStrictModeFlash = new StrictModeFlash( getDefaultDisplayContentLocked().getDisplay(), mFxSession); } mStrictModeFlash.setVisibility(on); } finally { SurfaceControl.closeTransaction(); if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION showStrictModeViolation"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showStrictModeViolation File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
showStrictModeViolation
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
void updateAnimatingActivityRegistry() { final Task rootTask = getRootTask(); final AnimatingActivityRegistry registry = rootTask != null ? rootTask.getAnimatingActivityRegistry() : null; // If we reparent, make sure to remove ourselves from the old animation registry. if (mAnimatingActivityRegistry != null && mAnimatingActivityRegistry != registry) { mAnimatingActivityRegistry.notifyFinished(this); } mAnimatingActivityRegistry = registry; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateAnimatingActivityRegistry 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
updateAnimatingActivityRegistry
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public void onValidationStatus(int status, @Nullable Uri redirectUri) { if (!isThisCallbackActive()) return; if (status == mLastNetworkStatus) return; mLastNetworkStatus = status; if (status == NetworkAgent.VALIDATION_STATUS_NOT_VALID) { if (mVerboseLoggingEnabled) { logd("WifiNetworkAgent -> Wifi networkStatus invalid, score=" + mWifiInfo.getScore()); } unwantedNetwork(NETWORK_STATUS_UNWANTED_VALIDATION_FAILED); } else if (status == NetworkAgent.VALIDATION_STATUS_VALID) { if (mVerboseLoggingEnabled) { logd("WifiNetworkAgent -> Wifi networkStatus valid, score= " + mWifiInfo.getScore()); } mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_NETWORK_AGENT_VALID_NETWORK); doNetworkStatus(status); } boolean captivePortalDetected = redirectUri != null && redirectUri.toString() != null && redirectUri.toString().length() > 0; if (captivePortalDetected) { Log.i(getTag(), "Captive Portal detected, status=" + status + ", redirectUri=" + redirectUri); mWifiConfigManager.noteCaptivePortalDetected(mWifiInfo.getNetworkId()); mCmiMonitor.onCaptivePortalDetected(mClientModeManager); mCurrentConnectionDetectedCaptivePortal = true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onValidationStatus File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
onValidationStatus
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") public void testPOJOIntArray() throws IOException { ObjectMapper mapper = new ObjectMapper(); ObjectNode n = mapper.getNodeFactory().objectNode(); n.set("pojo", mapper.getNodeFactory().pojoNode(new int[] { 1, 2, 3 })); StringWriter sw = new StringWriter(); JsonGenerator jg = mapper.createGenerator(sw); mapper.writeTree(jg, n); Map<String,Object> result = (Map<String,Object>) mapper.readValue(sw.toString(), Map.class); assertEquals(1, result.size()); // int array becomes a list when mapped to general Object: List<Object> list = (List<Object>) result.get("pojo"); assertEquals(3, list.size()); for (int i = 0; i < 3; ++i) { assertEquals(Integer.valueOf(i+1), list.get(i)); } jg.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testPOJOIntArray File: src/test/java/com/fasterxml/jackson/databind/ser/TestTreeSerialization.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36518
MEDIUM
5
FasterXML/jackson-databind
testPOJOIntArray
src/test/java/com/fasterxml/jackson/databind/ser/TestTreeSerialization.java
8238ab41d0350fb915797c89d46777b4496b74fd
0
Analyze the following code function for security vulnerabilities
public boolean isBackgroundActivityStartsEnabled() { return mConstants.mFlagBackgroundActivityStartsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBackgroundActivityStartsEnabled 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
isBackgroundActivityStartsEnabled
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
boolean areBoundsLetterboxed() { return getAppCompatState(/* ignoreVisibility= */ true) != APP_COMPAT_STATE_CHANGED__STATE__NOT_LETTERBOXED; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: areBoundsLetterboxed 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
areBoundsLetterboxed
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public List<Collection> findCollectionsWithSubmit(String q, Context context, Community community, int offset, int limit) throws SQLException, SearchServiceException { List<Collection> collections = new ArrayList<>(); DiscoverQuery discoverQuery = new DiscoverQuery(); discoverQuery.setDSpaceObjectFilter(IndexableCollection.TYPE); discoverQuery.setStart(offset); discoverQuery.setMaxResults(limit); DiscoverResult resp = retrieveCollectionsWithSubmit(context, discoverQuery, null, community, q); for (IndexableObject solrCollections : resp.getIndexableObjects()) { Collection c = ((IndexableCollection) solrCollections).getIndexedObject(); collections.add(c); } return collections; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findCollectionsWithSubmit File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41189
HIGH
9
DSpace
findCollectionsWithSubmit
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
0
Analyze the following code function for security vulnerabilities
@Override public void onServiceDisconnected(ComponentName name) { synchronized (mLock) { Log.d(TAG, "Service unbound"); mService = null; mServiceName = null; mServiceBound = false; mServiceUserId = -1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onServiceDisconnected File: src/com/android/nfc/cardemulation/HostEmulationManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35671
MEDIUM
5.5
android
onServiceDisconnected
src/com/android/nfc/cardemulation/HostEmulationManager.java
745632835f3d97513a9c2a96e56e1dc06c4e4176
0
Analyze the following code function for security vulnerabilities
@Override public int getUidCapability(int uid) { synchronized (ActivityManagerService.this) { UidRecord uidRecord = mProcessList.getUidRecordLOSP(uid); if (uidRecord == null) { throw new IllegalArgumentException("uid record for " + uid + " not found"); } return uidRecord.getCurCapability(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUidCapability 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
getUidCapability
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public Secret getSecret() { String secret = getProperty(PROP_SECRET, String.class); if (StringUtils.isBlank(secret)) { return null; } else { return new Secret(secret); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSecret File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getSecret
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
@Override public void killUid(int uid, String reason) { if (Binder.getCallingUid() != Process.SYSTEM_UID) { throw new SecurityException("killUid only available to the system"); } synchronized (this) { killPackageProcessesLocked(null, UserHandle.getAppId(uid), UserHandle.getUserId(uid), ProcessList.FOREGROUND_APP_ADJ-1, false, true, true, false, reason != null ? reason : "kill uid"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killUid 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
killUid
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
List<DictModel> queryEnableDictItemsByCode(@Param("code") String code);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: queryEnableDictItemsByCode File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45207
CRITICAL
9.8
jeecgboot/jeecg-boot
queryEnableDictItemsByCode
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
8632a835c23f558dfee3584d7658cc6a13ccec6f
0
Analyze the following code function for security vulnerabilities
private static String verifyContentType(List<Property> headers) { if (headers == null) { return null; } for (Property header : headers) { if (StringUtils.isNotEmpty(header.getKey()) && header.getKey().equalsIgnoreCase(HttpHeaders.CONTENT_TYPE)) { try { MediaType.valueOf((String) header.getValue()); } catch (InvalidMediaTypeException e) { return e.getMessage(); } // Don't break here since there can be multiple `Content-Type` headers. } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyContentType File: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java Repository: appsmithorg/appsmith The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-38298
HIGH
8.8
appsmithorg/appsmith
verifyContentType
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
c59351ef94f9780c2a1ffc991e29b9272ab9fe64
0
Analyze the following code function for security vulnerabilities
protected int getExpiresIn(JsonObject json) { try { return json.get("expires_in").getAsInt(); } catch(Exception e) { return -1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExpiresIn File: src/main/java/com/mxgraph/online/AbsAuthServlet.java Repository: jgraph/drawio The code follows secure coding practices.
[ "CWE-601", "CWE-918" ]
CVE-2022-1767
MEDIUM
5
jgraph/drawio
getExpiresIn
src/main/java/com/mxgraph/online/AbsAuthServlet.java
c63f3a04450f30798df47f9badbc74eb8a69fbdf
0
Analyze the following code function for security vulnerabilities
public static String escape(String string) { StringBuilder sb = new StringBuilder(string.length()); for (final int cp : codePointIterator(string)) { switch (cp) { case '&': sb.append("&amp;"); break; case '<': sb.append("&lt;"); break; case '>': sb.append("&gt;"); break; case '"': sb.append("&quot;"); break; case '\'': sb.append("&apos;"); break; default: if (mustEscape(cp)) { sb.append("&#x"); sb.append(Integer.toHexString(cp)); sb.append(';'); } else { sb.appendCodePoint(cp); } } } return sb.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: escape File: src/main/java/org/json/XML.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2022-45688
HIGH
7.5
stleary/JSON-java
escape
src/main/java/org/json/XML.java
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
0
Analyze the following code function for security vulnerabilities
@Override public <T> T require(final Key<T> type) { checkState(injector != null, "Registry is not ready. Require calls are available at application startup time, see http://jooby.org/doc/#application-life-cycle"); try { return injector.getInstance(type); } catch (ProvisionException x) { Throwable cause = x.getCause(); if (cause instanceof Err) { throw (Err) cause; } throw x; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: require File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
require
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
protected synchronized FrameHandlerFactory createFrameHandlerFactory() throws IOException { if(nio) { if(this.frameHandlerFactory == null) { if(this.nioParams.getNioExecutor() == null && this.nioParams.getThreadFactory() == null) { this.nioParams.setThreadFactory(getThreadFactory()); } this.frameHandlerFactory = new SocketChannelFrameHandlerFactory(connectionTimeout, nioParams, isSSL(), sslContextFactory); } return this.frameHandlerFactory; } else { return new SocketFrameHandlerFactory(connectionTimeout, socketFactory, socketConf, isSSL(), this.shutdownExecutor, sslContextFactory); } }
Vulnerability Classification: - CWE: CWE-400 - CVE: CVE-2023-46120 - Severity: HIGH - CVSS Score: 7.5 Description: Add max inbound message size to ConnectionFactory To avoid OOM with a very large message. The default value is 64 MiB. Fixes #1062 (cherry picked from commit 9ed45fde52224ec74fc523321efdf9a157d5cfca) Function: createFrameHandlerFactory File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client Fixed Code: protected synchronized FrameHandlerFactory createFrameHandlerFactory() throws IOException { if(nio) { if(this.frameHandlerFactory == null) { if(this.nioParams.getNioExecutor() == null && this.nioParams.getThreadFactory() == null) { this.nioParams.setThreadFactory(getThreadFactory()); } this.frameHandlerFactory = new SocketChannelFrameHandlerFactory( connectionTimeout, nioParams, isSSL(), sslContextFactory, this.maxInboundMessageBodySize); } return this.frameHandlerFactory; } else { return new SocketFrameHandlerFactory(connectionTimeout, socketFactory, socketConf, isSSL(), this.shutdownExecutor, sslContextFactory, this.maxInboundMessageBodySize); } }
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
createFrameHandlerFactory
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
1
Analyze the following code function for security vulnerabilities
public ExpandableNotificationRow.LongPressListener getNotificationLongClicker() { return this::openGuts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotificationLongClicker File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
getNotificationLongClicker
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
@Override public void executeUpgrade() throws DotDataException { if (DbConnectionFactory.isMsSql() && !DbConnectionFactory.getAutoCommit()) { DbConnectionFactory.setAutoCommit(true); } try { this.createContentTypeWorkflowActionMappingTable(); this.createContentTypeWorkflowActionMappingUniqueIndex(); } catch (SQLException e) { Logger.error(this, e.getMessage(), e); throw new DotDataException(e.getMessage(), e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeUpgrade File: dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-17542
LOW
3.5
dotCMS/core
executeUpgrade
dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
782c342b660d359a71e190c8b5110bc651736591
0
Analyze the following code function for security vulnerabilities
private void populateSeriesData() throws SearchServiceDatabaseException { EntityManager em = null; EntityTransaction tx = null; try { em = emf.createEntityManager(); tx = em.getTransaction(); tx.begin(); TypedQuery<SearchEntity> q = (TypedQuery<SearchEntity>) em.createNamedQuery("Search.getNoSeries"); List<SearchEntity> seriesList = q.getResultList(); for (SearchEntity series : seriesList) { String mpSeriesId = MediaPackageParser.getFromXml(series.getMediaPackageXML()).getSeries(); if (StringUtils.isNotBlank(mpSeriesId) && !mpSeriesId.equals(series.getSeriesId())) { logger.info("Fixing missing series ID for episode {}, series is {}", series.getMediaPackageId(), mpSeriesId); series.setSeriesId(mpSeriesId); em.merge(series); } } tx.commit(); } catch (Exception e) { logger.error("Could not update media package: {}", e.getMessage()); if (tx.isActive()) { tx.rollback(); } throw new SearchServiceDatabaseException(e); } finally { if (em != null) em.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: populateSeriesData File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
populateSeriesData
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
@Override protected void onViewDetached() { mUpdateMonitor.removeCallback(mKeyguardUpdateMonitorCallback); mConfigurationController.removeCallback(mConfigurationListener); mView.removeMotionEventListener(mGlobalTouchListener); mUserSwitcherController.removeUserSwitchCallback(mUserSwitchCallback); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onViewDetached File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21245
HIGH
7.8
android
onViewDetached
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
a33159e8cb297b9eee6fa5c63c0e343d05fad622
0
Analyze the following code function for security vulnerabilities
@JsonProperty("Status") public String getStatus() { return status; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStatus File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getStatus
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Test public void updateGetConnectionFails2(TestContext context) { UpdateSection updateSection = new UpdateSection(); updateSection.addField("key").setValue("x"); postgresClientGetConnectionFails(). update(FOO, updateSection, (Criterion) null, false, context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateGetConnectionFails2 File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
updateGetConnectionFails2
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public void setProfileName(@NonNull ComponentName admin, String profileName) { throwIfParentInstance("setProfileName"); if (mService != null) { try { mService.setProfileName(admin, profileName); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProfileName File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setProfileName
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
static void invokeMethod(Component instance, Class<?> clazz, String methodName, JsonArray args, int promiseId, boolean inert) { assert instance != null; Optional<Method> method = findMethod(instance, clazz, methodName); if (method.isPresent()) { invokeMethod(instance, method.get(), args, promiseId, inert); } else if (instance instanceof Composite) { Component compositeContent = ((Composite<?>) instance).getContent(); invokeMethod(compositeContent, compositeContent.getClass(), methodName, args, promiseId, inert); } else { String msg = String.format("Neither class '%s' " + "nor its super classes declare event handler method '%s'", instance.getClass().getName(), methodName); throw new IllegalStateException(msg); } }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2023-25500 - Severity: MEDIUM - CVSS Score: 4.3 Description: fix: log error messages Log error messages and throw more generic exceptions. Function: invokeMethod File: flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java Repository: vaadin/flow Fixed Code: static void invokeMethod(Component instance, Class<?> clazz, String methodName, JsonArray args, int promiseId, boolean inert) { assert instance != null; Optional<Method> method = findMethod(instance, clazz, methodName); if (method.isPresent()) { invokeMethod(instance, method.get(), args, promiseId, inert); } else if (instance instanceof Composite) { Component compositeContent = ((Composite<?>) instance).getContent(); invokeMethod(compositeContent, compositeContent.getClass(), methodName, args, promiseId, inert); } else { getLogger().error(String.format( "Faulty method invocation. Neither class '%s' " + "nor its super classes declare event handler method '%s'", instance.getClass().getName(), methodName)); throw new IllegalStateException("Faulty method invocation"); } }
[ "CWE-200" ]
CVE-2023-25500
MEDIUM
4.3
vaadin/flow
invokeMethod
flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java
1fa4976902a117455bf2f98b191f8c80692b53c8
1
Analyze the following code function for security vulnerabilities
private String getDescriptionForCallType() { String appName = getResources().getString(R.string.nc_app_product_name); if (isVoiceOnlyCall) { return String.format(getResources().getString(R.string.nc_call_voice), appName); } else { return String.format(getResources().getString(R.string.nc_call_video), appName); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDescriptionForCallType File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
getDescriptionForCallType
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private void putPrivateDnsSettings(int mode, @Nullable String host) { // Set Private DNS settings using system permissions, as apps cannot write // to global settings. mInjector.binderWithCleanCallingIdentity(() -> { ConnectivitySettingsManager.setPrivateDnsMode(mContext, mode); ConnectivitySettingsManager.setPrivateDnsHostname(mContext, host); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putPrivateDnsSettings 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
putPrivateDnsSettings
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void setSchedulingDisabled(boolean theSchedulingDisabled) { mySchedulingDisabled = theSchedulingDisabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSchedulingDisabled File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setSchedulingDisabled
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@Override public PhoneAccountHandle getSimCallManager(int subId) { synchronized (mLock) { try { Log.startSession("TSI.gSCM"); final int callingUid = Binder.getCallingUid(); final int user = UserHandle.getUserId(callingUid); long token = Binder.clearCallingIdentity(); try { if (user != ActivityManager.getCurrentUser()) { enforceCrossUserPermission(callingUid); } return mPhoneAccountRegistrar.getSimCallManager(subId, UserHandle.of(user)); } finally { Binder.restoreCallingIdentity(token); } } catch (Exception e) { Log.e(this, e, "getSimCallManager"); throw e; } finally { Log.endSession(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSimCallManager File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
getSimCallManager
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public Builder cluster(String cluster) { if (!ClickHouseChecker.isNullOrEmpty(cluster)) { options.put(PARAM_CLUSTER, cluster); } else { options.remove(PARAM_CLUSTER); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cluster File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
cluster
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
@Override public void initConfiguration(String name, String id, String className) throws CmsConfigurationException { if ((OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) && m_staticFrozen) { // configuration already frozen throw new CmsConfigurationException( Messages.get().container( Messages.ERR_CONFIG_FROZEN_3, this.getClass().getName(), getStaticTypeName(), new Integer(getStaticTypeId()))); } if (!RESOURCE_TYPE_NAME.equals(name)) { // default resource type MUST have default name throw new CmsConfigurationException( Messages.get().container( Messages.ERR_INVALID_RESTYPE_CONFIG_NAME_3, this.getClass().getName(), RESOURCE_TYPE_NAME, name)); } // freeze the configuration m_staticFrozen = true; super.initConfiguration(RESOURCE_TYPE_NAME, id, className); // set static members with values from the configuration m_staticTypeId = m_typeId; if (CmsImageLoader.isEnabled()) { // the image loader is enabled, image operations are supported m_staticLoaderId = CmsImageLoader.RESOURCE_LOADER_ID_IMAGE_LOADER; // set the maximum size scaler String downScaleParams = CmsImageLoader.getDownScaleParams(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(downScaleParams)) { m_downScaler = new CmsImageScaler(downScaleParams); if (!m_downScaler.isValid()) { // ignore invalid parameters m_downScaler = null; } } } else { // no image operations are supported, use dump loader m_staticLoaderId = CmsDumpLoader.RESOURCE_LOADER_ID; // disable maximum image size operation m_downScaler = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initConfiguration File: src/org/opencms/file/types/CmsResourceTypeImage.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3312
MEDIUM
4
alkacon/opencms-core
initConfiguration
src/org/opencms/file/types/CmsResourceTypeImage.java
92e035423aa6967822d343e54392d4291648c0ee
0
Analyze the following code function for security vulnerabilities
public boolean isEditCommentFieldHidden() { return this.xwiki.isEditCommentFieldHidden(this.context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEditCommentFieldHidden File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
isEditCommentFieldHidden
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
public String getDeviceSvnUsingSubId(int subId) { PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId); if (phoneSubInfoProxy != null) { return phoneSubInfoProxy.getDeviceSvn(); } else { Rlog.e(TAG,"getDeviceSvn phoneSubInfoProxy is null"); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceSvnUsingSubId File: src/java/com/android/internal/telephony/PhoneSubInfoController.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-0831
MEDIUM
4.3
android
getDeviceSvnUsingSubId
src/java/com/android/internal/telephony/PhoneSubInfoController.java
79eecef63f3ea99688333c19e22813f54d4a31b1
0
Analyze the following code function for security vulnerabilities
public void updateMetaParams(List<String> recordIDs, Map<String,String> metaParams) { // Define the directories used to lookup the recording List<String> states = new ArrayList<>(); states.add(Recording.STATE_PUBLISHED); states.add(Recording.STATE_UNPUBLISHED); states.add(Recording.STATE_DELETED); // Gather all the existent directories based on the states defined for the lookup Map<String, List<File>> allDirectories = getAllDirectories(states); // Retrieve the actual recording from the directories gathered for the lookup for (String recordID : recordIDs) { for (Map.Entry<String, List<File>> entry : allDirectories.entrySet()) { List<File> recs = getRecordingsForPath(recordID, entry.getValue()); // Go through all recordings of all formats for (File rec : recs) { File metadataXml = recordingServiceHelper.getMetadataXmlLocation(rec.getPath()); updateRecordingMetadata(metadataXml, metaParams, metadataXml); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateMetaParams File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java Repository: bigbluebutton The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-12443
HIGH
7.5
bigbluebutton
updateMetaParams
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
b21ca8355a57286a1e6df96984b3a4c57679a463
0
Analyze the following code function for security vulnerabilities
public static void restoreCurrentDescriptorByNameUrl(String old) { Stapler.getCurrentRequest().setAttribute("currentDescriptorByNameUrl", old); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreCurrentDescriptorByNameUrl 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
restoreCurrentDescriptorByNameUrl
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Pure public long getLong(String columnName) throws SQLException { return getLong(findColumn(columnName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLong File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getLong
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override protected void onModified() throws IOException { super.onModified(); Jenkins.getInstance().trimLabels(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onModified 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
onModified
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Deprecated private static Set<String> getValidateRedirectUris(KeycloakSession session) { RealmModel realm = session.getContext().getRealm(); return session.clients().getAllRedirectUrisOfEnabledClients(realm).entrySet().stream() .filter(me -> me.getKey().isEnabled() && OIDCLoginProtocol.LOGIN_PROTOCOL.equals(me.getKey().getProtocol()) && !me.getKey().isBearerOnly() && (me.getKey().isStandardFlowEnabled() || me.getKey().isImplicitFlowEnabled())) .map(me -> resolveValidRedirects(session, me.getKey().getRootUrl(), me.getValue())) .flatMap(Collection::stream) .collect(Collectors.toSet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValidateRedirectUris File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java Repository: keycloak The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4361
MEDIUM
6.1
keycloak
getValidateRedirectUris
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
0
Analyze the following code function for security vulnerabilities
@Override public int getHintsFromListener(INotificationListener token) { synchronized (mNotificationList) { return mListenerHints; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHintsFromListener File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
getHintsFromListener
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0