instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
private int runListPackages(boolean showApplicationPackage) { int getFlags = 0; boolean listDisabled = false, listEnabled = false; boolean listSystem = false, listThirdParty = false; boolean listInstaller = false; int userId = UserHandle.USER_OWNER; try { String opt; while ((opt=nextOption()) != null) { if (opt.equals("-l")) { // old compat } else if (opt.equals("-lf")) { showApplicationPackage = true; } else if (opt.equals("-f")) { showApplicationPackage = true; } else if (opt.equals("-d")) { listDisabled = true; } else if (opt.equals("-e")) { listEnabled = true; } else if (opt.equals("-s")) { listSystem = true; } else if (opt.equals("-3")) { listThirdParty = true; } else if (opt.equals("-i")) { listInstaller = true; } else if (opt.equals("--user")) { userId = Integer.parseInt(nextArg()); } else if (opt.equals("-u")) { getFlags |= PackageManager.GET_UNINSTALLED_PACKAGES; } else { System.err.println("Error: Unknown option: " + opt); return 1; } } } catch (RuntimeException ex) { System.err.println("Error: " + ex.toString()); return 1; } String filter = nextArg(); try { final List<PackageInfo> packages = getInstalledPackages(mPm, getFlags, userId); int count = packages.size(); for (int p = 0 ; p < count ; p++) { PackageInfo info = packages.get(p); if (filter != null && !info.packageName.contains(filter)) { continue; } final boolean isSystem = (info.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0; if ((!listDisabled || !info.applicationInfo.enabled) && (!listEnabled || info.applicationInfo.enabled) && (!listSystem || isSystem) && (!listThirdParty || !isSystem)) { System.out.print("package:"); if (showApplicationPackage) { System.out.print(info.applicationInfo.sourceDir); System.out.print("="); } System.out.print(info.packageName); if (listInstaller) { System.out.print(" installer="); System.out.print(mPm.getInstallerPackageName(info.packageName)); } System.out.println(); } } return 0; } catch (RemoteException e) { System.err.println(e.toString()); System.err.println(PM_NOT_RUNNING_ERR); return 1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runListPackages File: cmds/pm/src/com/android/commands/pm/Pm.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3833
HIGH
9.3
android
runListPackages
cmds/pm/src/com/android/commands/pm/Pm.java
4e4743a354e26467318b437892a9980eb9b8328a
0
Analyze the following code function for security vulnerabilities
protected QName createQName(String name) { return new QName(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createQName File: src/main/java/org/dom4j/tree/QNameCache.java Repository: dom4j The code follows secure coding practices.
[ "CWE-91" ]
CVE-2018-1000632
MEDIUM
5
dom4j
createQName
src/main/java/org/dom4j/tree/QNameCache.java
e598eb43d418744c4dbf62f647dd2381c9ce9387
0
Analyze the following code function for security vulnerabilities
@Override public boolean isFaultTolerantConnection() { return this.faultTolerantConnection; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFaultTolerantConnection 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
isFaultTolerantConnection
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public void takePersistableUriPermission(Uri uri, int mode, int userId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); uri.writeToParcel(data, 0); data.writeInt(mode); data.writeInt(userId); mRemote.transact(TAKE_PERSISTABLE_URI_PERMISSION_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: takePersistableUriPermission File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
takePersistableUriPermission
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public boolean isEditorBuffered() { return getState(false).editorBuffered; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEditorBuffered File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
isEditorBuffered
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public float getMaf() { return maf; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaf File: src/main/java/object/Variant.java Repository: nickzren/alsdb The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15021
MEDIUM
5.2
nickzren/alsdb
getMaf
src/main/java/object/Variant.java
cbc79a68145e845f951113d184b4de207c341599
0
Analyze the following code function for security vulnerabilities
@Override public boolean userPromptedForSandbox() { return this.promptedForSandbox; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userPromptedForSandbox File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
userPromptedForSandbox
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
public Pair<Long, Long> getBackoff(EndPoint info) { synchronized (mAuthorities) { AuthorityInfo authority = getAuthorityLocked(info, "getBackoff"); if (authority != null) { return Pair.create(authority.backoffTime, authority.backoffDelay); } return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBackoff File: services/core/java/com/android/server/content/SyncStorageEngine.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-2424
HIGH
7.1
android
getBackoff
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
public void setSyntax(Syntax syntax) { if (ObjectUtils.notEqual(this.syntax, syntax)) { this.syntax = syntax; // invalidate parsed xdom this.xdomCache = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSyntax 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
setSyntax
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 static @Nullable String bindSelection(@Nullable String selection, @Nullable Object... selectionArgs) { if (selection == null) return null; // If no arguments provided, so we can't bind anything if ((selectionArgs == null) || (selectionArgs.length == 0)) return selection; // If no bindings requested, so we can shortcut if (selection.indexOf('?') == -1) return selection; // Track the chars immediately before and after each bind request, to // decide if it needs additional whitespace added char before = ' '; char after = ' '; int argIndex = 0; final int len = selection.length(); final StringBuilder res = new StringBuilder(len); for (int i = 0; i < len; ) { char c = selection.charAt(i++); if (c == '?') { // Assume this bind request is guarded until we find a specific // trailing character below after = ' '; // Sniff forward to see if the selection is requesting a // specific argument index int start = i; for (; i < len; i++) { c = selection.charAt(i); if (c < '0' || c > '9') { after = c; break; } } if (start != i) { argIndex = Integer.parseInt(selection.substring(start, i)) - 1; } // Manually bind the argument into the selection, adding // whitespace when needed for clarity final Object arg = selectionArgs[argIndex++]; if (before != ' ' && before != '=') res.append(' '); switch (DatabaseUtils.getTypeOfObject(arg)) { case Cursor.FIELD_TYPE_NULL: res.append("NULL"); break; case Cursor.FIELD_TYPE_INTEGER: res.append(((Number) arg).longValue()); break; case Cursor.FIELD_TYPE_FLOAT: res.append(((Number) arg).doubleValue()); break; case Cursor.FIELD_TYPE_BLOB: throw new IllegalArgumentException("Blobs not supported"); case Cursor.FIELD_TYPE_STRING: default: if (arg instanceof Boolean) { // Provide compatibility with legacy applications which may pass // Boolean values in bind args. res.append(((Boolean) arg).booleanValue() ? 1 : 0); } else { res.append('\''); // Escape single quote character while appending the string. res.append(arg.toString().replace("'", "''")); res.append('\''); } break; } if (after != ' ') res.append(' '); } else { res.append(c); before = c; } } return res.toString(); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2023-35683 - Severity: MEDIUM - CVSS Score: 5.5 Description: Remove invalid surrogates during bindSelection Test: atest MediaProviderTests Bug: 223793631 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:108f736d0ec6e974c3f947e7e568845b7e039a0a) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a48b01f78f28fc642b144c673bfcd12ae78c5a73) Merged-In: I18b879f1a51394b4739225ec88b862fd6d0d5526 Change-Id: I18b879f1a51394b4739225ec88b862fd6d0d5526 Function: bindSelection File: src/com/android/providers/media/util/DatabaseUtils.java Repository: android Fixed Code: public static @Nullable String bindSelection(@Nullable String selection, @Nullable Object... selectionArgs) { if (selection == null) return null; // If no arguments provided, so we can't bind anything if ((selectionArgs == null) || (selectionArgs.length == 0)) return selection; // If no bindings requested, so we can shortcut if (selection.indexOf('?') == -1) return selection; // Track the chars immediately before and after each bind request, to // decide if it needs additional whitespace added char before = ' '; char after = ' '; int argIndex = 0; final int len = selection.length(); final StringBuilder res = new StringBuilder(len); for (int i = 0; i < len; ) { char c = selection.charAt(i++); if (c == '?') { // Assume this bind request is guarded until we find a specific // trailing character below after = ' '; // Sniff forward to see if the selection is requesting a // specific argument index int start = i; for (; i < len; i++) { c = selection.charAt(i); if (c < '0' || c > '9') { after = c; break; } } if (start != i) { argIndex = Integer.parseInt(selection.substring(start, i)) - 1; } // Manually bind the argument into the selection, adding // whitespace when needed for clarity final Object arg = selectionArgs[argIndex++]; if (before != ' ' && before != '=') res.append(' '); switch (DatabaseUtils.getTypeOfObject(arg)) { case Cursor.FIELD_TYPE_NULL: res.append("NULL"); break; case Cursor.FIELD_TYPE_INTEGER: res.append(((Number) arg).longValue()); break; case Cursor.FIELD_TYPE_FLOAT: res.append(((Number) arg).doubleValue()); break; case Cursor.FIELD_TYPE_BLOB: throw new IllegalArgumentException("Blobs not supported"); case Cursor.FIELD_TYPE_STRING: default: if (arg instanceof Boolean) { // Provide compatibility with legacy applications which may pass // Boolean values in bind args. res.append(((Boolean) arg).booleanValue() ? 1 : 0); } else { res.append('\''); // Escape single quote character while appending the string and reject // invalid unicode. res.append(escapeSingleQuoteAndRejectInvalidUnicode(arg.toString())); res.append('\''); } break; } if (after != ' ') res.append(' '); } else { res.append(c); before = c; } } return res.toString(); }
[ "CWE-89" ]
CVE-2023-35683
MEDIUM
5.5
android
bindSelection
src/com/android/providers/media/util/DatabaseUtils.java
23d156ed1bed6d2c2b325f0be540d0afca510c49
1
Analyze the following code function for security vulnerabilities
@Override public boolean isValid(Object value, ConstraintValidatorContext context) { if (value != null && StringUtils.isNotEmpty(String.valueOf(value))) { return true; } String errorMessage = String.format("Expected not empty value, got '%s'", value); LOG.warn(errorMessage); context.buildConstraintViolationWithTemplate(errorMessage).addConstraintViolation(); return false; }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2020-26282 - Severity: HIGH - CVSS Score: 7.5 Description: Fix Critical Java EL Injection RCE vulnerability from GHSL-2020-213 Function: isValid File: browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/NotBlankConstraint.java Repository: browserup/browserup-proxy Fixed Code: @Override public boolean isValid(Object value, ConstraintValidatorContext context) { if (value != null && StringUtils.isNotEmpty(String.valueOf(value))) { return true; } String escapedValue = MessageSanitizer.escape(value == null ? null : value.toString()); String errorMessage = String.format("Expected not empty value, got '%s'", escapedValue); LOG.warn(errorMessage); context.buildConstraintViolationWithTemplate(errorMessage).addConstraintViolation(); return false; }
[ "CWE-74" ]
CVE-2020-26282
HIGH
7.5
browserup/browserup-proxy
isValid
browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/NotBlankConstraint.java
4b38e7a3e20917e5c3329d0d4e9590bed9d578ab
1
Analyze the following code function for security vulnerabilities
private native void nativeSetUseDesktopUserAgent(long nativeContentViewCoreImpl, boolean enabled, boolean reloadOnChange);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeSetUseDesktopUserAgent File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
nativeSetUseDesktopUserAgent
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public void setEntity(@Nullable String entity) { this.entity = entity; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEntity File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setEntity
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
@Override public void setNextAlarmController(NextAlarmController nextAlarmController) { mNextAlarmController = nextAlarmController; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNextAlarmController File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3886
HIGH
7.2
android
setNextAlarmController
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
0
Analyze the following code function for security vulnerabilities
public void clearEncryptionPassword() { updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearEncryptionPassword File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
clearEncryptionPassword
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public int getPasswordMinimumNumeric(@Nullable ComponentName admin, int userHandle) { if (mService != null) { try { return mService.getPasswordMinimumNumeric(admin, userHandle, mParentInstance); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPasswordMinimumNumeric 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
getPasswordMinimumNumeric
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private Page getPage(String wikiName, List<String> spaceName, String pageName) throws Exception { String uri = buildURI(PageResource.class, wikiName, spaceName, pageName).toString(); GetMethod getMethod = executeGet(uri); return (Page) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPage File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
getPage
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
@Override public void onExpandClicked(Entry clickedEntry, boolean nowExpanded) { mHeadsUpManager.setExpanded(clickedEntry, nowExpanded); if (mState == StatusBarState.KEYGUARD && nowExpanded) { goToLockedShade(clickedEntry.row); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onExpandClicked File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onExpandClicked
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@JsonCreator public static Builder create() { return Config.builder() .serverIps(DEFAULT_SERVER_IP) .lookupType(DnsLookupType.A) .cacheTTLOverrideEnabled(DEFAULT_CACHE_TTL_OVERRIDE) .requestTimeout(DEFAULT_TIMEOUT_MILLIS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
create
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
private ResourceInfo getResourceInfo(String libraryName, String resourceName, String localePrefix, String contract, boolean compressable, boolean isViewResource, FacesContext ctx, LibraryInfo library) { if (libraryName != null && !nameContainsForbiddenSequence(libraryName)) { library = findLibrary(libraryName, localePrefix, contract, ctx); if (library == null && localePrefix != null) { // no localized library found. Try to find a library that isn't localized. library = findLibrary(libraryName, null, contract, ctx); } if (library == null) { // If we don't have one by now, perhaps it's time to consider scanning directories. library = findLibraryOnClasspathWithZipDirectoryEntryScan(libraryName, localePrefix, contract, ctx, false); if (library == null && localePrefix != null) { // no localized library found. Try to find // a library that isn't localized. library = findLibraryOnClasspathWithZipDirectoryEntryScan(libraryName, null, contract, ctx, false); } if (library == null) { return null; } } } else if (nameContainsForbiddenSequence(libraryName)) { return null; } String resName = trimLeadingSlash(resourceName); if (nameContainsForbiddenSequence(resName) || (!isViewResource && resName.startsWith("WEB-INF"))) { return null; } ResourceInfo info = findResource(library, resourceName, localePrefix, compressable, isViewResource, ctx); if (info == null && localePrefix != null) { // no localized resource found, try to find a // resource that isn't localized info = findResource(library, resourceName, null, compressable, isViewResource, ctx); } // If no resource has been found so far, and we have a library that // was found in the webapp filesystem, see if there is a matching // library on the classpath. If one is found, try to find a matching // resource in that library. if (info == null && library != null && library.getHelper() instanceof WebappResourceHelper) { LibraryInfo altLibrary = classpathResourceHelper.findLibrary(libraryName, localePrefix, contract, ctx); if (altLibrary != null) { VersionInfo originalVersion = library.getVersion(); VersionInfo altVersion = altLibrary.getVersion(); if (originalVersion == null && altVersion == null) { library = altLibrary; } else if (originalVersion == null && altVersion != null) { library = null; } else if (originalVersion != null && altVersion == null) { library = null; } else if (originalVersion.compareTo(altVersion) == 0) { library = altLibrary; } } if (library != null) { info = findResource(library, resourceName, localePrefix, compressable, isViewResource, ctx); if (info == null && localePrefix != null) { // no localized resource found, try to find a // resource that isn't localized info = findResource(library, resourceName, null, compressable, isViewResource, ctx); } } } return info; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourceInfo File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
getResourceInfo
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
public String[] getShellCommandline() { // TODO: Provided only for backward compat. with <= 1.4 verifyShellState(); return (String[]) getShell().getShellCommandLine( getArguments() ).toArray( new String[0] ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShellCommandline File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getShellCommandline
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
@Override public void setDeviceProvisioningConfigApplied() { Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())); synchronized (getLockObject()) { DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM); policy.mDeviceProvisioningConfigApplied = true; saveSettingsLocked(UserHandle.USER_SYSTEM); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDeviceProvisioningConfigApplied 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
setDeviceProvisioningConfigApplied
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void setCommentStripHtml(boolean commentStripHtml) { this.commentStripHtml = commentStripHtml; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCommentStripHtml File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-254", "CWE-264" ]
CVE-2016-8600
MEDIUM
5
dotCMS/core
setCommentStripHtml
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
0
Analyze the following code function for security vulnerabilities
public boolean getPreferDirectBuffer() { return Boolean.parseBoolean(getProperty(TS_PREFER_DIRECT_BUFFER, "false")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPreferDirectBuffer File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getPreferDirectBuffer
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); toDOM(document); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
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: toXML File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfos.java Repository: dogtagpki/pki Fixed Code: public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); toDOM(document); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toXML
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfos.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") private static Class<? extends NodeFeature>[] getRootNodeFeatures() { // Start with all element features List<Class<? extends NodeFeature>> features = new ArrayList<>( BasicElementStateProvider.getFeatures()); // Then add our own custom features features.add(PushConfigurationMap.class); features.add(PollConfigurationMap.class); features.add(ReconnectDialogConfigurationMap.class); features.add(LoadingIndicatorConfigurationMap.class); // And return them all assert features.size() == new HashSet<>(features).size() : "There are duplicates"; return (Class<? extends NodeFeature>[]) features .toArray(new Class<?>[0]); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRootNodeFeatures File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
getRootNodeFeatures
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public static void main(String... a) throws Exception { TestBase.createCaller().init().testFromMain(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: main File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
main
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
@Override public void setRequiredStrongAuthTimeout(ComponentName who, String callerPackageName, long timeoutMs, boolean parent) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return; } Preconditions.checkArgument(timeoutMs >= 0, "Timeout must not be a negative number."); CallerIdentity caller; if (isPermissionCheckFlagEnabled()) { caller = getCallerIdentity(who, callerPackageName); } else { caller = getCallerIdentity(who); Objects.requireNonNull(who, "ComponentName is null"); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); } // timeoutMs with value 0 means that the admin doesn't participate // timeoutMs is clamped to the interval in case the internal constants change in the future final long minimumStrongAuthTimeout = getMinimumStrongAuthTimeoutMs(); if (timeoutMs != 0 && timeoutMs < minimumStrongAuthTimeout) { timeoutMs = minimumStrongAuthTimeout; } if (timeoutMs > DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS) { timeoutMs = DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS; } final int userHandle = caller.getUserId(); boolean changed = false; synchronized (getLockObject()) { ActiveAdmin ap; if (isPermissionCheckFlagEnabled()) { int affectedUser = parent ? getProfileParentId(caller.getUserId()) : caller.getUserId(); ap = enforcePermissionAndGetEnforcingAdmin( who, MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS, caller.getPackageName(), affectedUser).getActiveAdmin(); } else { ap = getParentOfAdminIfRequired( getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()), parent); } if (ap.strongAuthUnlockTimeout != timeoutMs) { ap.strongAuthUnlockTimeout = timeoutMs; saveSettingsLocked(userHandle); changed = true; } } if (changed) { mLockSettingsInternal.refreshStrongAuthTimeout(userHandle); // Refreshes the parent if profile has unified challenge, since the timeout would // also affect the parent user in this case. if (isManagedProfile(userHandle) && !isSeparateProfileChallengeEnabled(userHandle)) { mLockSettingsInternal.refreshStrongAuthTimeout(getProfileParentId(userHandle)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequiredStrongAuthTimeout File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setRequiredStrongAuthTimeout
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private MacAddress updateRandomizedMacIfNeeded(WifiConfiguration config) { boolean shouldUpdateMac = config.randomizedMacExpirationTimeMs < mClock.getWallClockMillis() || mClock.getWallClockMillis() - config.randomizedMacLastModifiedTimeMs >= NON_PERSISTENT_MAC_REFRESH_MS_MAX; if (!shouldUpdateMac) { return config.getRandomizedMacAddress(); } WifiConfiguration internalConfig = getInternalConfiguredNetwork(config.networkId); setRandomizedMacAddress(internalConfig, MacAddressUtils.createRandomUnicastAddress()); return internalConfig.getRandomizedMacAddress(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateRandomizedMacIfNeeded File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
updateRandomizedMacIfNeeded
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private boolean bindHeaderText(RemoteViews contentView, StandardTemplateParams p, boolean hasTextToLeft) { if (p.mHideSubText) { return false; } CharSequence summaryText = p.summaryText; if (summaryText == null && mStyle != null && mStyle.mSummaryTextSet && mStyle.hasSummaryInHeader()) { summaryText = mStyle.mSummaryText; } if (summaryText == null && mContext.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.N && mN.extras.getCharSequence(EXTRA_INFO_TEXT) != null) { summaryText = mN.extras.getCharSequence(EXTRA_INFO_TEXT); } if (!TextUtils.isEmpty(summaryText)) { // TODO: Remove the span entirely to only have the string with propper formating. contentView.setTextViewText(R.id.header_text, processTextSpans( processLegacyText(summaryText))); setTextViewColorSecondary(contentView, R.id.header_text, p); contentView.setViewVisibility(R.id.header_text, View.VISIBLE); if (hasTextToLeft) { contentView.setViewVisibility(R.id.header_text_divider, View.VISIBLE); setTextViewColorSecondary(contentView, R.id.header_text_divider, p); } return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindHeaderText File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
bindHeaderText
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public static void removeEmptyObs(Collection<Obs> obsList) { if (obsList != null) { Set<Obs> obsToRemove = new HashSet<Obs>(); for (Obs o : obsList) { removeEmptyObs(o.getGroupMembers()); boolean valueEmpty = StringUtils.isEmpty(o.getValueAsString(Context.getLocale())); boolean membersEmpty = o.getGroupMembers() == null || o.getGroupMembers().isEmpty(); if (valueEmpty && membersEmpty) { obsToRemove.add(o); } } for (Obs o : obsToRemove) { if (o.getObsGroup() != null) { o.getObsGroup().removeGroupMember(o); o.setObsGroup(null); } if (o.getEncounter() != null) { o.getEncounter().removeObs(o); o.setEncounter(null); } obsList.remove(o); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeEmptyObs File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
removeEmptyObs
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
private void generateRandomizedMacAddresses() { for (WifiConfiguration config : getInternalConfiguredNetworks()) { if (DEFAULT_MAC_ADDRESS.equals(config.getRandomizedMacAddress())) { initRandomizedMacForInternalConfig(config); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateRandomizedMacAddresses File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
generateRandomizedMacAddresses
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
final void addInt(CharSequence name, int value) { add(name, String.valueOf(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addInt File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
addInt
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
void notifyPackageUse(String packageName, int reason) { synchronized(this) { getPackageManagerInternalLocked().notifyPackageUse(packageName, reason); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyPackageUse File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
notifyPackageUse
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void sendIdleJobTrigger() { if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER); } final long ident = Binder.clearCallingIdentity(); try { Intent intent = new Intent(ACTION_TRIGGER_IDLE) .setPackage("android") .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); broadcastIntent(null, intent, null, null, 0, null, null, null, android.app.AppOpsManager.OP_NONE, null, true, false, UserHandle.USER_ALL); } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendIdleJobTrigger File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
sendIdleJobTrigger
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public static HttpRequest readFrom(final InputStream in, final String encoding) { final BufferedReader reader; try { reader = new BufferedReader(new InputStreamReader(in, encoding)); } catch (final UnsupportedEncodingException uneex) { return null; } final HttpRequest httpRequest = new HttpRequest(); httpRequest.headers.clear(); final String line; try { line = reader.readLine(); } catch (final IOException ioex) { throw new HttpException(ioex); } if (!StringUtil.isBlank(line)) { final String[] s = StringUtil.splitc(line, ' '); httpRequest.method(s[0]); httpRequest.path(s[1]); httpRequest.httpVersion(s[2]); httpRequest.readHeaders(reader); httpRequest.readBody(reader); } return httpRequest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFrom File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
readFrom
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
private void sendNewKeys() throws TransportException { log.debug("Sending SSH_MSG_NEWKEYS"); transport.write(new SSHPacket(Message.NEWKEYS)); }
Vulnerability Classification: - CWE: CWE-354 - CVE: CVE-2023-48795 - Severity: MEDIUM - CVSS Score: 5.9 Description: Implement OpenSSH strict key exchange extension Function: sendNewKeys File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java Repository: hierynomus/sshj Fixed Code: private void sendNewKeys() throws TransportException { log.debug("Sending SSH_MSG_NEWKEYS"); transport.write(new SSHPacket(Message.NEWKEYS)); if (strictKex.get()) { transport.getEncoder().resetSequenceNumber(); } }
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
sendNewKeys
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
1
Analyze the following code function for security vulnerabilities
@Override public void test(TestData testData, TaskLogger jobLogger) { execute(UUID.randomUUID().toString(), jobLogger, testData.getDockerImage()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: test File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-610" ]
CVE-2022-39206
CRITICAL
9.9
theonedev/onedev
test
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
0052047a5b5095ac6a6b4a73a522d0272fec3a22
0
Analyze the following code function for security vulnerabilities
boolean setSimAccessPermission(BluetoothDevice device, int value) { enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH PRIVILEGED permission"); SharedPreferences pref = getSharedPreferences(SIM_ACCESS_PERMISSION_PREFERENCE_FILE, Context.MODE_PRIVATE); SharedPreferences.Editor editor = pref.edit(); if (value == BluetoothDevice.ACCESS_UNKNOWN) { editor.remove(device.getAddress()); } else { editor.putBoolean(device.getAddress(), value == BluetoothDevice.ACCESS_ALLOWED); } return editor.commit(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSimAccessPermission File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
setSimAccessPermission
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Override boolean check(JobTrackerConfig c1, JobTrackerConfig c2) { if (c1 == c2) { return true; } if (c1 == null || c2 == null) { return false; } int max1 = c1.getMaxThreadSize(); int max2 = c2.getMaxThreadSize(); int availableProcessors = RuntimeAvailableProcessors.get(); return nullSafeEqual(c1.getName(), c2.getName()) && (nullSafeEqual(max1, max2) || (Math.min(max1, max2) == 0 && Math.max(max1, max2) == availableProcessors)) && nullSafeEqual(c1.getRetryCount(), c2.getRetryCount()) && nullSafeEqual(c1.getChunkSize(), c2.getChunkSize()) && nullSafeEqual(c1.getQueueSize(), c2.getQueueSize()) && nullSafeEqual(c1.isCommunicateStats(), c2.isCommunicateStats()) && nullSafeEqual(c1.getTopologyChangedStrategy(), c2.getTopologyChangedStrategy()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override public void validate() { final String filter = format(ldapConfiguration.getUserSearchFilter(), "test"); ldapConnectionTemplate.searchFirst(ldapConfiguration.getSearchBases().get(0), filter, SearchScope.SUBTREE, entry -> entry); }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2022-24832 - Severity: MEDIUM - CVSS Score: 4.9 Description: Escape/encode values when building search filters. Function: validate File: src/main/java/cd/go/apacheds/ApacheDsLdapClient.java Repository: gocd/gocd-ldap-authentication-plugin Fixed Code: @Override public void validate() { final String filter = FilterEncoder.format(ldapConfiguration.getUserSearchFilter(), "test"); ldapConnectionTemplate.searchFirst(ldapConfiguration.getSearchBases().get(0), filter, SearchScope.SUBTREE, entry -> entry); }
[ "CWE-74" ]
CVE-2022-24832
MEDIUM
4.9
gocd/gocd-ldap-authentication-plugin
validate
src/main/java/cd/go/apacheds/ApacheDsLdapClient.java
87fa7dac5d899b3960ab48e151881da4793cfcc3
1
Analyze the following code function for security vulnerabilities
private boolean isLockPasswordEnabled(int mode, int userId) { final boolean passwordEnabled = mode == DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC || mode == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC || mode == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX || mode == DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC || mode == DevicePolicyManager.PASSWORD_QUALITY_COMPLEX || mode == DevicePolicyManager.PASSWORD_QUALITY_MANAGED; return passwordEnabled && savedPasswordExists(userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLockPasswordEnabled File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
isLockPasswordEnabled
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private SSLAuthenticator getSSLAuthenticator() { if (this.sslAuthenticator == null) { this.sslAuthenticator = new SSLAuthenticator() { @Override public Valve getNext() { return new ValveBase() { @Override public void invoke(Request request, Response response) throws IOException, ServletException { // no-op } }; } }; this.sslAuthenticator.setContainer(getContainer()); try { this.sslAuthenticator.start(); } catch (LifecycleException e) { throw new RuntimeException("Error starting SSL authenticator.", e); } } return this.sslAuthenticator; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSSLAuthenticator File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
getSSLAuthenticator
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
public String invokeServletAndReturnAsString(String url, XWikiContext xwikiContext) { HttpServletRequest servletRequest = xwikiContext.getRequest(); HttpServletResponse servletResponse = xwikiContext.getResponse(); try { return IncludeServletAsString.invokeServletAndReturnAsString(url, servletRequest, servletResponse); } catch (Exception e) { LOGGER.warn("Exception including url: " + url, e); return "Exception including \"" + url + "\", see logs for details."; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: invokeServletAndReturnAsString File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
invokeServletAndReturnAsString
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
protected void addStreamFeature(ExtensionElement feature) { String key = XmppStringUtils.generateKey(feature.getElementName(), feature.getNamespace()); streamFeatures.put(key, feature); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addStreamFeature 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
addStreamFeature
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public ApiClient setOauthPasswordFlow(String username, String password) { for (Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).usePasswordFlow(username, password); return this; } } throw new RuntimeException("No OAuth2 authentication configured!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOauthPasswordFlow File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
setOauthPasswordFlow
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private SolrMetadataExtractor getMetadataExtractor(EntityType entityType) { SolrMetadataExtractor result = null; try { result = this.componentManager.getInstance(SolrMetadataExtractor.class, entityType.name().toLowerCase()); } catch (ComponentLookupException e) { this.logger.warn("Unsupported entity type: [{}]", entityType.toString(), e); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMetadataExtractor File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-312", "CWE-200" ]
CVE-2023-50719
HIGH
7.5
xwiki/xwiki-platform
getMetadataExtractor
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
0
Analyze the following code function for security vulnerabilities
@POST @Path("wiki/{nodeId}") @Operation(summary = "Attaches an wiki building block", description = "Attaches an wiki building block") @ApiResponse(responseCode = "200", description = "The course node metadatas", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)), @Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) }) @ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient") @ApiResponse(responseCode = "404", description = "The course or parentNode not found") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response updateWiki(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId, @FormParam("shortTitle") @DefaultValue("undefined") String shortTitle, @FormParam("longTitle") @DefaultValue("undefined") String longTitle, @FormParam("objectives") @DefaultValue("undefined") String objectives, @FormParam("visibilityExpertRules") String visibilityExpertRules, @FormParam("accessExpertRules") String accessExpertRules, @FormParam("wikiResourceableId") Long wikiResourceableId, @Context HttpServletRequest request) { RepositoryEntry wikiRepoEntry = null; if(wikiResourceableId != null) { RepositoryManager rm = RepositoryManager.getInstance(); wikiRepoEntry = rm.lookupRepositoryEntry(wikiResourceableId); if(wikiRepoEntry == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } } WikiCustomConfig config = new WikiCustomConfig(wikiRepoEntry); return update(courseId, nodeId, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateWiki File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
updateWiki
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
@Override public void onDeviceProvisionedChanged() { updateNotifications(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDeviceProvisionedChanged File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onDeviceProvisionedChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public int getSendMaxFrameSize() { return sendMaxFrameSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSendMaxFrameSize File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
getSendMaxFrameSize
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
public void closeLocalIssue(String issueId) { IssuesWithBLOBs issues = new IssuesWithBLOBs(); issues.setId(issueId); issues.setStatus("closed"); issuesMapper.updateByPrimaryKeySelective(issues); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: closeLocalIssue File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
closeLocalIssue
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private static boolean isSecurityParamsSupported(SecurityParams params) { final long wifiFeatures = WifiInjector.getInstance() .getActiveModeWarden().getPrimaryClientModeManager() .getSupportedFeatures(); switch (params.getSecurityType()) { case WifiConfiguration.SECURITY_TYPE_SAE: return 0 != (wifiFeatures & WifiManager.WIFI_FEATURE_WPA3_SAE); case WifiConfiguration.SECURITY_TYPE_OWE: return 0 != (wifiFeatures & WifiManager.WIFI_FEATURE_OWE); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSecurityParamsSupported File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
isSecurityParamsSupported
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
private long readLongAttribute(XmlPullParser parser, String attr, long defaultValue) { String valueString = parser.getAttributeValue(null, attr); if (valueString == null) return defaultValue; try { return Long.parseLong(valueString); } catch (NumberFormatException nfe) { return defaultValue; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readLongAttribute File: services/core/java/com/android/server/pm/UserManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2457
LOW
2.1
android
readLongAttribute
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
private ResourceInfo findResourceNonCompressed(String libraryName, String resourceName, boolean isViewResource, String localePrefix, List<String> contracts, FacesContext ctx) { ResourceInfo info = doLookup(libraryName, resourceName, localePrefix, false, isViewResource, contracts, ctx); if (info == null && contracts != null) { info = doLookup(libraryNameFromContracts(libraryName, contracts), resourceName, localePrefix, false, isViewResource, contracts, ctx); } if (info != null && !info.isDoNotCache()) { addToCache(info, contracts); } return info; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findResourceNonCompressed File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
findResourceNonCompressed
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
protected Message getRegisteredMessage(Instance instance, StandardEvaluationContext context) { String activitySubtitle = evaluateExpression(context, registerActivitySubtitle); return createMessage(instance, registeredTitle, activitySubtitle, context); }
Vulnerability Classification: - CWE: CWE-94 - CVE: CVE-2022-46166 - Severity: CRITICAL - CVSS Score: 9.8 Description: feat: improve notifiers Function: getRegisteredMessage File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java Repository: codecentric/spring-boot-admin Fixed Code: protected Message getRegisteredMessage(Instance instance, EvaluationContext context) { String activitySubtitle = evaluateExpression(context, registerActivitySubtitle); return createMessage(instance, registeredTitle, activitySubtitle, context); }
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getRegisteredMessage
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
1
Analyze the following code function for security vulnerabilities
public static void disablePackageNamePermissionCache() { sPackageNamePermissionCache.disableLocal(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disablePackageNamePermissionCache File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
disablePackageNamePermissionCache
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
private static List<ServerPort> resolveDistinctPorts(List<ServerPort> ports) { final List<ServerPort> distinctPorts = new ArrayList<>(); for (final ServerPort port : ports) { boolean found = false; // Do not check the port number 0 because a user may want his or her server to be bound // on multiple arbitrary ports. final InetSocketAddress portAddress = port.localAddress(); if (portAddress.getPort() > 0) { for (int i = 0; i < distinctPorts.size(); i++) { final ServerPort distinctPort = distinctPorts.get(i); final InetSocketAddress distinctPortAddress = distinctPort.localAddress(); // Compare the addresses taking `DomainSocketAddress` into account. final boolean hasSameAddress; if (portAddress instanceof DomainSocketAddress) { if (distinctPortAddress instanceof DomainSocketAddress) { hasSameAddress = ((DomainSocketAddress) portAddress).path().equals( ((DomainSocketAddress) distinctPortAddress).path()); } else { hasSameAddress = false; } } else { hasSameAddress = portAddress.equals(distinctPortAddress); } // Merge two `ServerPort`s into one if their addresses are equal. if (hasSameAddress) { final ServerPort merged = new ServerPort(distinctPort.localAddress(), Sets.union(distinctPort.protocols(), port.protocols())); distinctPorts.set(i, merged); found = true; break; } } } if (!found) { distinctPorts.add(port); } } return Collections.unmodifiableList(distinctPorts); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveDistinctPorts File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
resolveDistinctPorts
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
public <T> T get(Object resourceURI, boolean failIfNotFound) throws Exception { return get(resourceURI, null, failIfNotFound); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
get
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public int getAttributeNameResource(int index) { final int resourceNameId = nativeGetAttributeResource(mParseState, index); if (resourceNameId == ERROR_NULL_DOCUMENT) { throw new NullPointerException("Null document"); } return resourceNameId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributeNameResource File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
getAttributeNameResource
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return mTitle == null ? "NO TITLE" : mTitle.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-610" ]
CVE-2023-40133
MEDIUM
5.5
android
toString
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
08becc8c600f14c5529115cc1a1e0c97cd503f33
0
Analyze the following code function for security vulnerabilities
public boolean isUnconditionalQuoting() { return unconditionalQuoting; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUnconditionalQuoting File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java Repository: apache/maven-shared-utils The code follows secure coding practices.
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
isUnconditionalQuoting
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
bb6b6a4bf44cc09f120068bd29fed3e9ab10eb6f
0
Analyze the following code function for security vulnerabilities
protected void scanDoctype() throws IOException { String root = null; String pubid = null; String sysid = null; if (skipSpaces()) { root = scanName(true); if (root == null) { if (fReportErrors) { fErrorReporter.reportError("HTML1014", null); } } else { root = modifyName(root, fNamesElems); } if (skipSpaces()) { if (skip("PUBLIC", false)) { skipSpaces(); pubid = scanLiteral(); if (skipSpaces()) { sysid = scanLiteral(); } } else if (skip("SYSTEM", false)) { skipSpaces(); sysid = scanLiteral(); } } } int c; while ((c = fCurrentEntity.read()) != -1) { if (c == '<') { fCurrentEntity.rewind(); break; } if (c == '>') { break; } if (c == '[') { skipMarkup(true); break; } } if (fDocumentHandler != null) { if (fOverrideDoctype) { pubid = fDoctypePubid; sysid = fDoctypeSysid; } fEndLineNumber = fCurrentEntity.getLineNumber(); fEndColumnNumber = fCurrentEntity.getColumnNumber(); fEndCharacterOffset = fCurrentEntity.getCharacterOffset(); fDocumentHandler.doctypeDecl(root, pubid, sysid, locationAugs()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scanDoctype File: src/org/cyberneko/html/HTMLScanner.java Repository: sparklemotion/nekohtml The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-24839
MEDIUM
5
sparklemotion/nekohtml
scanDoctype
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
@Override protected boolean flingExpands(float vel, float vectorVel, float x, float y) { boolean expands = super.flingExpands(vel, vectorVel, x, y); // If we are already running a QS expansion, make sure that we keep the panel open. if (mQsExpansionAnimator != null) { expands = true; } return expands; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: flingExpands File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
flingExpands
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private static void parseCommonAttributes(Element root, Map<String, Attribute> commonAttributes1, Map<String, AntiSamyPattern> commonRegularExpressions1) { for (Element ele : getByTagName(root, "attribute")) { String onInvalid = getAttributeValue(ele, "onInvalid"); String name = getAttributeValue(ele, "name"); List<Pattern> allowedRegexps = getAllowedRegexps(commonRegularExpressions1, ele); List<String> allowedValues = getAllowedLiterals(ele); final String onInvalidStr; if (onInvalid != null && onInvalid.length() > 0) { onInvalidStr = onInvalid; } else { onInvalidStr = DEFAULT_ONINVALID; } String description = getAttributeValue(ele, "description"); Attribute attribute = new Attribute(getAttributeValue(ele, "name"), allowedRegexps, allowedValues, onInvalidStr, description); commonAttributes1.put(name.toLowerCase(), attribute); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseCommonAttributes File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
parseCommonAttributes
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
private void fillTemplateCopyInfo(File tempFilePath, Map<String, String> copyFileMap) { File templatePath = new File(PathKit.getWebRootPath() + Constants.TEMPLATE_BASE_PATH); File[] templates = templatePath.listFiles(); if (templates != null && templates.length > 0) { for (File template : templates) { if (template.isDirectory() && template.toString().substring(PathKit.getWebRootPath().length()).startsWith(Constants.DEFAULT_TEMPLATE_PATH)) { //skip default template folder continue; } copyFileMap.put(template.toString(), tempFilePath + File.separator + Constants.TEMPLATE_BASE_PATH); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillTemplateCopyInfo File: web/src/main/java/com/zrlog/web/plugin/WarUpdateVersionThread.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
fillTemplateCopyInfo
web/src/main/java/com/zrlog/web/plugin/WarUpdateVersionThread.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
protected String getVersion( ) { return "1, 2"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getVersion File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java Repository: opencrx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-46502
CRITICAL
9.8
opencrx
getVersion
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
ce7a71db0bb34ecbcb0e822d40598e410a48b399
0
Analyze the following code function for security vulnerabilities
public static long arraySize(Object[] values) throws UnsupportedEncodingException { long acc = 0; for (Object value : values) { acc += fieldValueSize(value); } return acc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: arraySize File: src/main/java/com/rabbitmq/client/impl/Frame.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
arraySize
src/main/java/com/rabbitmq/client/impl/Frame.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting public void setTxManagerForUnitTest(PlatformTransactionManager theTxManager) { myTxManager = theTxManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTxManagerForUnitTest 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
setTxManagerForUnitTest
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
public ServerBuilder maxRequestLength(long maxRequestLength) { virtualHostTemplate.maxRequestLength(maxRequestLength); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: maxRequestLength File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
maxRequestLength
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
@Override public void holdLock(IBinder token, int durationMs) { getTestUtilityServiceLocked().verifyHoldLockToken(token); synchronized (this) { SystemClock.sleep(durationMs); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: holdLock 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
holdLock
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return Objects.hash(uri, lineNumber, line, failure); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java Repository: crate The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
hashCode
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
4e857d675683095945dd524d6ba03e692c70ecd6
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return Objects.hash(name, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
hashCode
base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public boolean isFullWidth() { return mIsFullWidth; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFullWidth File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isFullWidth
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsFloatEdgeCase07() throws Exception { // Into the negative zone where everything becomes zero. String input = "-1e64"; Instant value = MAPPER.readValue(input, Instant.class); assertEquals(0, value.getEpochSecond()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationAsFloatEdgeCase07 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsFloatEdgeCase07
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
boolean setScanMode(int mode, int duration) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); setDiscoverableTimeout(duration); int newMode = convertScanModeToHal(mode); return mAdapterProperties.setScanMode(newMode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setScanMode File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
setScanMode
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
public String getMethod() { return method; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMethod File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java Repository: Bedework/bw-webdav The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20000
MEDIUM
5
Bedework/bw-webdav
getMethod
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
67283fb8b9609acdb1a8d2e7fefe195b4a261062
0
Analyze the following code function for security vulnerabilities
@Override public List<Collection> findCollectionsWithSubscribers(Context context) throws SQLException { return collectionDAO.findCollectionsWithSubscribers(context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findCollectionsWithSubscribers 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
findCollectionsWithSubscribers
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
0
Analyze the following code function for security vulnerabilities
public boolean isThirdPartTemplate() { Project project = baseProjectService.getProjectById(projectId); if (project.getThirdPartTemplate() != null && project.getThirdPartTemplate()) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isThirdPartTemplate File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
isThirdPartTemplate
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public MediaButtonReceiverHolder getMediaButtonReceiver() { return mMediaButtonReceiverHolder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMediaButtonReceiver 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
getMediaButtonReceiver
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
@Override public void invokeBeamInternal(BeamShareData shareData) { NfcPermissions.enforceAdminPermissions(mContext); Message msg = Message.obtain(); msg.what = MSG_INVOKE_BEAM; msg.obj = shareData; // We have to send this message delayed for two reasons: // 1) This is an IPC call from BeamShareActivity, which is // running when the user has invoked Beam through the // share menu. As soon as BeamShareActivity closes, the UI // will need some time to rebuild the original Activity. // Waiting here for a while gives a better chance of the UI // having been rebuilt, which means the screenshot that the // Beam animation is using will be more accurate. // 2) Similarly, because the Activity that launched BeamShareActivity // with an ACTION_SEND intent is now in paused state, the NDEF // callbacks that it has registered may no longer be valid. // Allowing the original Activity to resume will make sure we // it has a chance to re-register the NDEF message / callback, // so we share the right data. // // Note that this is somewhat of a hack because the delay may not actually // be long enough for 2) on very slow devices, but there's no better // way to do this right now without additional framework changes. mHandler.sendMessageDelayed(msg, INVOKE_BEAM_DELAY_MS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: invokeBeamInternal File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
invokeBeamInternal
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
public CrumbIssuer getCrumbIssuer() { return crumbIssuer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrumbIssuer 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
getCrumbIssuer
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
void dispatchOomAdjObserver(String msg) { OomAdjObserver observer; synchronized (this) { observer = mCurOomAdjObserver; } if (observer != null) { observer.onOomAdjMessage(msg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispatchOomAdjObserver File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
dispatchOomAdjObserver
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private boolean isCallNotWhitelisted(String call) { return SecurityConstants.STACK_BLACKLIST.stream().anyMatch(call::startsWith) || (SecurityConstants.STACK_WHITELIST.stream().noneMatch(call::startsWith) && (configuration == null || !(configuration.whitelistedClassNames().contains(call) || configuration.trustedPackages().stream().anyMatch(pm -> pm.matches(call))))); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2024-23683 - Severity: HIGH - CVSS Score: 8.2 Description: Merge pull request from GHSA-883x-6fch-6wjx * Blacklist ReflectionUtils.getUnderlyingCause as it is in the invocation This means that trusted classes are no longer have a fully whitelisted stack when the cause is fetched and exception methods are invoked. * Allow security manager to work with method names when checking the stack * Add security test for a malicious InvocationTargetException A variant of the exploit found by Daniel, related to GHSA-883x-6fch-6wjx Co-authored-by: Daniel Kirschten <melodicahaspa@gmail.com> Co-authored-by: Christian Femers <c.femers@tum.de> Co-authored-by: Daniel Kirschten <melodicahaspa@gmail.com> Function: isCallNotWhitelisted File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares Fixed Code: private boolean isCallNotWhitelisted(String className, String methodName) { String call = className + "." + methodName; //$NON-NLS-1$ return SecurityConstants.STACK_BLACKLIST.stream().anyMatch(call::startsWith) || (SecurityConstants.STACK_WHITELIST.stream().noneMatch(call::startsWith) && (configuration == null || !(configuration.whitelistedClassNames().contains(className) || configuration.trustedPackages().stream().anyMatch(pm -> pm.matches(className))))); }
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
isCallNotWhitelisted
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
1
Analyze the following code function for security vulnerabilities
protected void checkItemIdExists(Object itemId) throws IllegalArgumentException { if (!getParentGrid().getContainerDataSource().containsId(itemId)) { throw new IllegalArgumentException("Given item id (" + itemId + ") does not exist in the container"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkItemIdExists File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
checkItemIdExists
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void notifyAutocompleteTextStateChanged(boolean textDeleted) { if (mUrlBarDelegate == null) return; if (!hasFocus()) return; if (mIgnoreAutocomplete) return; mLastUrlEditWasDelete = textDeleted; mUrlBarDelegate.onTextChangedForAutocomplete(textDeleted); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyAutocompleteTextStateChanged File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
notifyAutocompleteTextStateChanged
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
protected MapperWrapper wrapMapper(MapperWrapper next) { return next; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wrapMapper File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
wrapMapper
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
@PasswordComplexity public int getAggregatedPasswordComplexityForUser(int userId, boolean deviceWideOnly) { if (mService == null) { return PASSWORD_COMPLEXITY_NONE; } try { return mService.getAggregatedPasswordComplexityForUser(userId, deviceWideOnly); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAggregatedPasswordComplexityForUser 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
getAggregatedPasswordComplexityForUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override protected void onResume() { super.onResume(); // Update the from spinner as other accounts // may now be available. if (mFromSpinner != null && mAccount != null) { mFromSpinner.initialize(mComposeMode, mAccount, mAccounts, mRefMessage); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onResume 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
onResume
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public boolean hasLastHandledLocation() { return lastHandledNavigation != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasLastHandledLocation File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
hasLastHandledLocation
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public static byte[] getResponseBytes(Response samlResponse) throws SAMLException { byte ret[] = null; try { ret = samlResponse.toString(true, true, true). getBytes(SAMLConstants.DEFAULT_ENCODING); } catch (UnsupportedEncodingException ue) { if (debug.messageEnabled()) { debug.message("getResponseBytes : " , ue); } throw new SAMLException(ue.getMessage()); } return ret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResponseBytes File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java Repository: OpenIdentityPlatform/OpenAM The code follows secure coding practices.
[ "CWE-287" ]
CVE-2023-37471
CRITICAL
9.8
OpenIdentityPlatform/OpenAM
getResponseBytes
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
7c18543d126e8a567b83bb4535631825aaa9d742
0
Analyze the following code function for security vulnerabilities
@Override public String getMetas(Map<String, Object> data) { String maxScale = ""; if (MobileUtil.isIOS()) { //used to prevent text field zoom on focus in ios maxScale = ", maximum-scale=1"; } String meta = super.getMetas(data) + "\n"; if ((Boolean) data.get("is_login_page")) { meta += "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1"+maxScale+", user-scalable=no\">\n"; } else { meta += "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1"+maxScale+"\">\n"; } meta += "<meta name=\"msapplication-tap-highlight\" content=\"no\"/>\n"; meta += getInternalMetas(data); return meta; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMetas File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
getMetas
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public int engineDoFinal( byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException { byte[] buf = engineDoFinal(input, inputOffset, inputLength); System.arraycopy(buf, 0, output, outputOffset, buf.length); return buf.length; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineDoFinal File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineDoFinal
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
public ActionForward execute(ActionMapping mapping, ActionForm formIn, HttpServletRequest request, HttpServletResponse response) throws Exception { RequestContext context = new RequestContext(request); ManagedServerGroup serverGroup = context.lookupAndBindServerGroup(); if (context.isSubmitted()) { String [] params = {serverGroup.getName()}; ServerGroupManager manager = ServerGroupManager.getInstance(); manager.remove(context.getCurrentUser(), serverGroup); getStrutsDelegate().saveMessage(DELETED_MESSAGE_KEY, params, request); return mapping.findForward("success"); } return mapping.findForward(RhnHelper.DEFAULT_FORWARD); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2016-3079 - Severity: MEDIUM - CVSS Score: 4.3 Description: 1320452 - Cleaning up some remaining Tag/Group XSS issues Function: execute File: java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java Repository: spacewalkproject/spacewalk Fixed Code: @Override public ActionForward execute(ActionMapping mapping, ActionForm formIn, HttpServletRequest request, HttpServletResponse response) throws Exception { RequestContext context = new RequestContext(request); ManagedServerGroup serverGroup = context.lookupAndBindServerGroup(); if (context.isSubmitted()) { ServerGroupManager manager = ServerGroupManager.getInstance(); manager.remove(context.getCurrentUser(), serverGroup); String [] params = {StringEscapeUtils.escapeHtml(serverGroup.getName())}; getStrutsDelegate().saveMessage(DELETED_MESSAGE_KEY, params, request); return mapping.findForward("success"); } return mapping.findForward(RhnHelper.DEFAULT_FORWARD); }
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
execute
java/code/src/com/redhat/rhn/frontend/action/groups/DeleteGroupAction.java
b6491eba
1
Analyze the following code function for security vulnerabilities
@VisibleForTesting protected int getSignatureStartPosition(String signature, String bodyText) { int startPos = -1; if (TextUtils.isEmpty(signature) || TextUtils.isEmpty(bodyText)) { return startPos; } int bodyLength = bodyText.length(); int signatureLength = signature.length(); String printableVersion = convertToPrintableSignature(signature); int printableLength = printableVersion.length(); if (bodyLength >= printableLength && bodyText.substring(bodyLength - printableLength) .equals(printableVersion)) { startPos = bodyLength - printableLength; } else if (bodyLength >= signatureLength && bodyText.substring(bodyLength - signatureLength) .equals(signature)) { startPos = bodyLength - signatureLength; } return startPos; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSignatureStartPosition 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
getSignatureStartPosition
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
private List<String> getAcceptedLanguages(XWikiRequest request) { List<String> result = new ArrayList<String>(); Enumeration<Locale> e = request.getLocales(); while (e.hasMoreElements()) { String language = e.nextElement().getLanguage().toLowerCase(); // All language codes should have 2 letters. if (StringUtils.isAlpha(language)) { result.add(language); } } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAcceptedLanguages File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getAcceptedLanguages
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private void bindNotificationHeader(RemoteViews contentView, StandardTemplateParams p) { bindSmallIcon(contentView, p); // Populate text left-to-right so that separators are only shown between strings boolean hasTextToLeft = bindHeaderAppName(contentView, p, false /* force */); hasTextToLeft |= bindHeaderTextSecondary(contentView, p, hasTextToLeft); hasTextToLeft |= bindHeaderText(contentView, p, hasTextToLeft); if (!hasTextToLeft) { // If there's still no text, force add the app name so there is some text. hasTextToLeft |= bindHeaderAppName(contentView, p, true /* force */); } bindHeaderChronometerAndTime(contentView, p, hasTextToLeft); bindPhishingAlertIcon(contentView, p); bindProfileBadge(contentView, p); bindAlertedIcon(contentView, p); bindExpandButton(contentView, p); mN.mUsesStandardHeader = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindNotificationHeader File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
bindNotificationHeader
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public static void appendNotification(String type, String body, Context a) { appendNotification(type, body, null, null, a); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendNotification File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
appendNotification
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public String[] getEnvironmentVariables() throws CommandLineException { try { addSystemEnvironment(); } catch ( Exception e ) { throw new CommandLineException( "Error setting up environmental variables", e ); } String[] environmentVars = new String[envVars.size()]; int i = 0; for ( Iterator iterator = envVars.keySet().iterator(); iterator.hasNext(); ) { String name = (String) iterator.next(); String value = (String) envVars.get( name ); environmentVars[i] = name + "=" + value; i++; } return environmentVars; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnvironmentVariables File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getEnvironmentVariables
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
protected void markRpcFinished() { // no-op }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: markRpcFinished File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
markRpcFinished
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public static String calculateUrlBase(final HttpServletRequest request) { if (request == null) { throw new IllegalArgumentException("Cannot take null parameters."); } String tmpl = Vault.getProperty("opennms.web.base-url"); if (tmpl == null) { tmpl = "%s://%x%c/"; } final String retval = substituteUrl(request, tmpl); if (retval.endsWith("/")) { return retval; } else { return retval + "/"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calculateUrlBase File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-0869
MEDIUM
6.1
OpenNMS/opennms
calculateUrlBase
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
66b4ba96a18b9952f25a350bbccc2a7e206238d1
0