instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public Long getTimeMillisAndRemove(K name) { V v = getAndRemove(name); try { return v != null ? toTimeMillis(name, v) : null; } catch (RuntimeException ignore) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimeMillisAndRemove File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
getTimeMillisAndRemove
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
@Deprecated public static void importFile(FF4j ff4j, InputStream in) throws IOException { importFile(ff4j, new XmlParser().parseConfigurationFile(in)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: importFile File: ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java Repository: ff4j The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-44262
CRITICAL
9.8
ff4j
importFile
ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
991df72725f78adbc413d9b0fbb676201f1882e0
0
Analyze the following code function for security vulnerabilities
public ThreadIO getThreadIO() { return ThreadIOHolder.getThreadIO(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getThreadIO File: hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java Repository: hawtio The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0120
MEDIUM
6.8
hawtio
getThreadIO
hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java
b4e23e002639c274a2f687ada980118512f06113
0
Analyze the following code function for security vulnerabilities
@IgnoreJRERequirement public static String dumpThreadInfo(ThreadInfo ti, ThreadGroupMap map) { String grp = map.getThreadGroup(ti); StringBuilder sb = new StringBuilder("\"" + ti.getThreadName() + "\"" + " Id=" + ti.getThreadId() + " Group=" + (grp != null ? grp : "?") + " " + ti.getThreadState()); if (ti.getLockName() != null) { sb.append(" on " + ti.getLockName()); } if (ti.getLockOwnerName() != null) { sb.append(" owned by \"" + ti.getLockOwnerName() + "\" Id=" + ti.getLockOwnerId()); } if (ti.isSuspended()) { sb.append(" (suspended)"); } if (ti.isInNative()) { sb.append(" (in native)"); } sb.append('\n'); StackTraceElement[] stackTrace = ti.getStackTrace(); for (int i=0; i < stackTrace.length; i++) { StackTraceElement ste = stackTrace[i]; sb.append("\tat " + ste.toString()); sb.append('\n'); if (i == 0 && ti.getLockInfo() != null) { Thread.State ts = ti.getThreadState(); switch (ts) { case BLOCKED: sb.append("\t- blocked on " + ti.getLockInfo()); sb.append('\n'); break; case WAITING: sb.append("\t- waiting on " + ti.getLockInfo()); sb.append('\n'); break; case TIMED_WAITING: sb.append("\t- waiting on " + ti.getLockInfo()); sb.append('\n'); break; default: } } for (MonitorInfo mi : ti.getLockedMonitors()) { if (mi.getLockedStackDepth() == i) { sb.append("\t- locked " + mi); sb.append('\n'); } } } LockInfo[] locks = ti.getLockedSynchronizers(); if (locks.length > 0) { sb.append("\n\tNumber of locked synchronizers = " + locks.length); sb.append('\n'); for (LockInfo li : locks) { sb.append("\t- " + li); sb.append('\n'); } } sb.append('\n'); return sb.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpThreadInfo File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
dumpThreadInfo
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
final static private ObjectNode descendElement(XMLStreamReader parser, PreviewParsingState state) { ObjectNode result = ParsingUtilities.mapper.createObjectNode(); { String name = parser.getLocalName(); JSONUtilities.safePut(result, "n", name); String prefix = parser.getPrefix(); if (prefix != null) { JSONUtilities.safePut(result, "p", prefix); } String nsUri = parser.getNamespaceURI(); if (nsUri != null) { JSONUtilities.safePut(result, "uri", nsUri); } } int namespaceCount = parser.getNamespaceCount(); if (namespaceCount > 0) { ArrayNode namespaces = result.putArray("ns"); for (int i = 0; i < namespaceCount; i++) { ObjectNode namespace = ParsingUtilities.mapper.createObjectNode(); namespaces.add(namespace); JSONUtilities.safePut(namespace, "p", parser.getNamespacePrefix(i)); JSONUtilities.safePut(namespace, "uri", parser.getNamespaceURI(i)); } } int attributeCount = parser.getAttributeCount(); if (attributeCount > 0) { ArrayNode attributes = result.putArray("a"); for (int i = 0; i < attributeCount; i++) { ObjectNode attribute = ParsingUtilities.mapper.createObjectNode(); attributes.add(attribute); JSONUtilities.safePut(attribute, "n", parser.getAttributeLocalName(i)); JSONUtilities.safePut(attribute, "v", parser.getAttributeValue(i)); String prefix = parser.getAttributePrefix(i); if (prefix != null) { JSONUtilities.safePut(attribute, "p", prefix); } } } ArrayNode children = ParsingUtilities.mapper.createArrayNode(); try { while (parser.hasNext() && state.tokenCount < PREVIEW_PARSING_LIMIT) { int tokenType = parser.next(); state.tokenCount++; if (tokenType == XMLStreamConstants.END_ELEMENT) { break; } else if (tokenType == XMLStreamConstants.START_ELEMENT) { ObjectNode childElement = descendElement(parser, state); if (childElement != null) { children.add(childElement); } } else if (tokenType == XMLStreamConstants.CHARACTERS || tokenType == XMLStreamConstants.CDATA || tokenType == XMLStreamConstants.SPACE) { ObjectNode childElement = ParsingUtilities.mapper.createObjectNode(); JSONUtilities.safePut(childElement, "t", parser.getText()); children.add(childElement); } else { // ignore everything else } } } catch (XMLStreamException e) { logger.error("Error generating parser UI initialization data for XML file", e); } if (children.size() > 0) { result.put("c", children); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: descendElement File: main/src/com/google/refine/importers/XmlImporter.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20157
MEDIUM
5
OpenRefine
descendElement
main/src/com/google/refine/importers/XmlImporter.java
6a0d7d56e4ffb420316ce7849fde881344fbf881
0
Analyze the following code function for security vulnerabilities
public String formatCustomDate(Date date) { TimeZone tz = determineTimeZone(); SimpleDateFormat sdf = new SimpleDateFormat(RHN_CUSTOM_DATEFORMAT); sdf.setTimeZone(tz); return sdf.format(date); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formatCustomDate File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java Repository: spacewalkproject/spacewalk The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
formatCustomDate
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
7b9ff9ad
0
Analyze the following code function for security vulnerabilities
Configuration getGlobalConfigurationForPid(int pid) { if (pid == MY_PID || pid < 0) { return getGlobalConfiguration(); } synchronized (mGlobalLock) { final WindowProcessController app = mProcessMap.getProcess(pid); return app != null ? app.getConfiguration() : getGlobalConfiguration(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGlobalConfigurationForPid File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
getGlobalConfigurationForPid
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder toBuilder() { return new Builder(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toBuilder File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
toBuilder
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
SQLiteSession createSession() { final SQLiteConnectionPool pool; synchronized (mLock) { throwIfNotOpenLocked(); pool = mConnectionPoolLocked; } return new SQLiteSession(pool); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSession File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
createSession
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
void dumpAssociationsLocked(FileDescriptor fd, PrintWriter pw, String[] args, int opti, boolean dumpAll, boolean dumpClient, String dumpPackage) { pw.println("ACTIVITY MANAGER ASSOCIATIONS (dumpsys activity associations)"); int dumpUid = 0; if (dumpPackage != null) { IPackageManager pm = AppGlobals.getPackageManager(); try { dumpUid = pm.getPackageUid(dumpPackage, MATCH_UNINSTALLED_PACKAGES, 0); } catch (RemoteException e) { } } boolean printedAnything = false; final long now = SystemClock.uptimeMillis(); for (int i1=0, N1=mAssociations.size(); i1<N1; i1++) { ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> targetComponents = mAssociations.valueAt(i1); for (int i2=0, N2=targetComponents.size(); i2<N2; i2++) { SparseArray<ArrayMap<String, Association>> sourceUids = targetComponents.valueAt(i2); for (int i3=0, N3=sourceUids.size(); i3<N3; i3++) { ArrayMap<String, Association> sourceProcesses = sourceUids.valueAt(i3); for (int i4=0, N4=sourceProcesses.size(); i4<N4; i4++) { Association ass = sourceProcesses.valueAt(i4); if (dumpPackage != null) { if (!ass.mTargetComponent.getPackageName().equals(dumpPackage) && UserHandle.getAppId(ass.mSourceUid) != dumpUid) { continue; } } printedAnything = true; pw.print(" "); pw.print(ass.mTargetProcess); pw.print("/"); UserHandle.formatUid(pw, ass.mTargetUid); pw.print(" <- "); pw.print(ass.mSourceProcess); pw.print("/"); UserHandle.formatUid(pw, ass.mSourceUid); pw.println(); pw.print(" via "); pw.print(ass.mTargetComponent.flattenToShortString()); pw.println(); pw.print(" "); long dur = ass.mTime; if (ass.mNesting > 0) { dur += now - ass.mStartTime; } TimeUtils.formatDuration(dur, pw); pw.print(" ("); pw.print(ass.mCount); pw.print(" times)"); pw.print(" "); for (int i=0; i<ass.mStateTimes.length; i++) { long amt = ass.mStateTimes[i]; if (ass.mLastState-ActivityManager.MIN_PROCESS_STATE == i) { amt += now - ass.mLastStateUptime; } if (amt != 0) { pw.print(" "); pw.print(ProcessList.makeProcStateString( i + ActivityManager.MIN_PROCESS_STATE)); pw.print("="); TimeUtils.formatDuration(amt, pw); if (ass.mLastState-ActivityManager.MIN_PROCESS_STATE == i) { pw.print("*"); } } } pw.println(); if (ass.mNesting > 0) { pw.print(" Currently active: "); TimeUtils.formatDuration(now - ass.mStartTime, pw); pw.println(); } } } } } if (!printedAnything) { pw.println(" (nothing)"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpAssociationsLocked 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
dumpAssociationsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public void setIsConferenceCreated(boolean isConferenceCreated) { mIsConferenceCreated = isConferenceCreated; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIsConferenceCreated File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setIsConferenceCreated
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
protected void showSnackbar(final int message, final int action, final OnClickListener clickListener, final View.OnLongClickListener longClickListener) { this.binding.snackbar.setVisibility(View.VISIBLE); this.binding.snackbar.setOnClickListener(null); this.binding.snackbarMessage.setText(message); this.binding.snackbarMessage.setOnClickListener(null); this.binding.snackbarAction.setVisibility(clickListener == null ? View.GONE : View.VISIBLE); if (action != 0) { this.binding.snackbarAction.setText(action); } this.binding.snackbarAction.setOnClickListener(clickListener); this.binding.snackbarAction.setOnLongClickListener(longClickListener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showSnackbar File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
showSnackbar
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public SleepToken acquireSleepToken(String tag, int displayId) { Preconditions.checkNotNull(tag); return ActivityManagerService.this.acquireSleepToken(tag, displayId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: acquireSleepToken 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
acquireSleepToken
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public static boolean isLauncherAppTarget(Intent launchIntent) { if (launchIntent != null && Intent.ACTION_MAIN.equals(launchIntent.getAction()) && launchIntent.getComponent() != null && launchIntent.getCategories() != null && launchIntent.getCategories().size() == 1 && launchIntent.hasCategory(Intent.CATEGORY_LAUNCHER) && TextUtils.isEmpty(launchIntent.getDataString())) { // An app target can either have no extra or have ItemInfo.EXTRA_PROFILE. Bundle extras = launchIntent.getExtras(); return extras == null || extras.keySet().isEmpty(); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLauncherAppTarget File: src/com/android/launcher3/util/PackageManagerHelper.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-40097
HIGH
7.8
android
isLauncherAppTarget
src/com/android/launcher3/util/PackageManagerHelper.java
6c9a41117d5a9365cf34e770bbb00138f6bf997e
0
Analyze the following code function for security vulnerabilities
@Beta public static void move(File from, File to) throws IOException { checkNotNull(from); checkNotNull(to); checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to); if (!from.renameTo(to)) { copy(from, to); if (!from.delete()) { if (!to.delete()) { throw new IOException("Unable to delete " + to); } throw new IOException("Unable to delete " + from); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: move File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
move
android/guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
@Override public void onSetDisabled(int status) { synchronized (mNotificationList) { mDisableNotificationEffects = (status & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0; if (disableNotificationEffects(null) != null) { // cancel whatever's going on long identity = Binder.clearCallingIdentity(); try { final IRingtonePlayer player = mAudioManager.getRingtonePlayer(); if (player != null) { player.stopAsync(); } } catch (RemoteException e) { } finally { Binder.restoreCallingIdentity(identity); } identity = Binder.clearCallingIdentity(); try { mVibrator.cancel(); } finally { Binder.restoreCallingIdentity(identity); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSetDisabled File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onSetDisabled
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
void setNextTaskId(int taskId) { if (taskId > mCurTaskId) { mCurTaskId = taskId; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNextTaskId File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
setNextTaskId
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public String formatDate(Date date) { return dateFormat.format(date); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formatDate File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
formatDate
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void setImmersive(IBinder token, boolean immersive) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setImmersive File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
setImmersive
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@TestApi @DeviceOwnerType @Deprecated // TODO(b/259908270): remove public int getDeviceOwnerType(@NonNull ComponentName admin) { throwIfParentInstance("getDeviceOwnerType"); if (mService != null) { try { return mService.getDeviceOwnerType(admin); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return DEVICE_OWNER_TYPE_DEFAULT; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceOwnerType 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
getDeviceOwnerType
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public boolean isDefaultSearchParamsCanBeOverridden() { return myModelConfig.isDefaultSearchParamsCanBeOverridden(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDefaultSearchParamsCanBeOverridden File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isDefaultSearchParamsCanBeOverridden
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public static Object callPrivateMethod(Object obj, String methodName) { return callPrivateMethod(obj, methodName, null, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: callPrivateMethod 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
callPrivateMethod
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public static String getRelativeResource(Object obj, String path) throws ContentError { return getRelativeResource(obj.getClass(), path); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRelativeResource File: src/main/java/org/lemsml/jlems/io/util/JUtil.java Repository: LEMS/jLEMS The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4583
HIGH
8.8
LEMS/jLEMS
getRelativeResource
src/main/java/org/lemsml/jlems/io/util/JUtil.java
8c224637d7d561076364a9e3c2c375daeaf463dc
0
Analyze the following code function for security vulnerabilities
@Override public int getPackageProcessState(String packageName, String callingPackage) { if (!hasUsageStatsPermission(callingPackage)) { enforceCallingPermission(android.Manifest.permission.PACKAGE_USAGE_STATS, "getPackageProcessState"); } int procState = ActivityManager.PROCESS_STATE_NONEXISTENT; synchronized (this) { for (int i=mLruProcesses.size()-1; i>=0; i--) { final ProcessRecord proc = mLruProcesses.get(i); if (procState > proc.setProcState) { if (proc.pkgList.containsKey(packageName) || (proc.pkgDeps != null && proc.pkgDeps.contains(packageName))) { procState = proc.setProcState; } } } } return procState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageProcessState 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
getPackageProcessState
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private byte[] randomBytes(int bits) { byte[] array = new byte[bits / 8]; mRng.nextBytes(array); return array; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: randomBytes File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
randomBytes
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public List<BaseObject> remove(Object key) { return xObjects.remove(key); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remove File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
remove
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private void purgeOldGrantsAll() { synchronized (mUsers) { for (int i = 0; i < mUsers.size(); i++) { purgeOldGrants(mUsers.valueAt(i)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: purgeOldGrantsAll File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
purgeOldGrantsAll
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(anyOf = { INTERACT_ACROSS_USERS_FULL, permission.INTERACT_ACROSS_USERS }) public @Nullable Set<String> getCrossProfileCalendarPackages() { throwIfParentInstance("getCrossProfileCalendarPackages"); if (mService != null) { try { final List<String> packageNames = mService.getCrossProfileCalendarPackagesForUser( myUserId()); return packageNames == null ? null : new ArraySet<>(packageNames); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return Collections.emptySet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfileCalendarPackages 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
getCrossProfileCalendarPackages
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private List<Modification> gitLog(String... args) { // Git log will only show changes before the currently checked out revision InMemoryStreamConsumer outputStreamConsumer = inMemoryConsumer(); try { if (!isSubmodule) { fetch(outputStreamConsumer); } } catch (Exception e) { throw new RuntimeException(format("Working directory: %s\n%s", workingDir, outputStreamConsumer.getStdError()), e); } CommandLine gitCmd = gitWd().withArg("log").withArgs(args); ConsoleResult result = runOrBomb(gitCmd); GitModificationParser parser = new GitModificationParser(); List<Modification> mods = parser.parse(result.output()); for (Modification mod : mods) { addModifiedFiles(mod); } return mods; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gitLog File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
gitLog
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public void restoreFinished(int userId) { if (DEBUG) { Slog.i(TAG, "restoreFinished for " + userId); } final UserHandle userHandle = new UserHandle(userId); synchronized (mLock) { // Build the providers' broadcasts and send them off Set<Map.Entry<Provider, ArrayList<RestoreUpdateRecord>>> providerEntries = mUpdatesByProvider.entrySet(); for (Map.Entry<Provider, ArrayList<RestoreUpdateRecord>> e : providerEntries) { // For each provider there's a list of affected IDs Provider provider = e.getKey(); ArrayList<RestoreUpdateRecord> updates = e.getValue(); final int pending = countPendingUpdates(updates); if (DEBUG) { Slog.i(TAG, "Provider " + provider + " pending: " + pending); } if (pending > 0) { int[] oldIds = new int[pending]; int[] newIds = new int[pending]; final int N = updates.size(); int nextPending = 0; for (int i = 0; i < N; i++) { RestoreUpdateRecord r = updates.get(i); if (!r.notified) { r.notified = true; oldIds[nextPending] = r.oldId; newIds[nextPending] = r.newId; nextPending++; if (DEBUG) { Slog.i(TAG, " " + r.oldId + " => " + r.newId); } } } sendWidgetRestoreBroadcastLocked( AppWidgetManager.ACTION_APPWIDGET_RESTORED, provider, null, oldIds, newIds, userHandle); } } // same thing per host Set<Map.Entry<Host, ArrayList<RestoreUpdateRecord>>> hostEntries = mUpdatesByHost.entrySet(); for (Map.Entry<Host, ArrayList<RestoreUpdateRecord>> e : hostEntries) { Host host = e.getKey(); if (host.id.uid != UNKNOWN_UID) { ArrayList<RestoreUpdateRecord> updates = e.getValue(); final int pending = countPendingUpdates(updates); if (DEBUG) { Slog.i(TAG, "Host " + host + " pending: " + pending); } if (pending > 0) { int[] oldIds = new int[pending]; int[] newIds = new int[pending]; final int N = updates.size(); int nextPending = 0; for (int i = 0; i < N; i++) { RestoreUpdateRecord r = updates.get(i); if (!r.notified) { r.notified = true; oldIds[nextPending] = r.oldId; newIds[nextPending] = r.newId; nextPending++; if (DEBUG) { Slog.i(TAG, " " + r.oldId + " => " + r.newId); } } } sendWidgetRestoreBroadcastLocked( AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED, null, host, oldIds, newIds, userHandle); } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreFinished File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
restoreFinished
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public int compare(Thread a, Thread b) { int result = compare(a.getId(), b.getId()); if (result == 0) result = a.getName().compareToIgnoreCase(b.getName()); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compare File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
compare
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
int broadcastIntentInPackage(String packageName, int uid, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle resultExtras, String requiredPermission, Bundle bOptions, boolean serialized, boolean sticky, int userId) { synchronized(this) { intent = verifyBroadcastLocked(intent); final long origId = Binder.clearCallingIdentity(); String[] requiredPermissions = requiredPermission == null ? null : new String[] {requiredPermission}; int res = broadcastIntentLocked(null, packageName, intent, resolvedType, resultTo, resultCode, resultData, resultExtras, requiredPermissions, OP_NONE, bOptions, serialized, sticky, -1, uid, userId); Binder.restoreCallingIdentity(origId); return res; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastIntentInPackage 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
broadcastIntentInPackage
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public Map<String, Set<String>> getProviderMapping() { return this.providerMapping; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProviderMapping File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getProviderMapping
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
private void removeMediaStream(String sessionId) { Log.d(TAG, "removeMediaStream"); participantDisplayItems.remove(sessionId); if (!isDestroyed()) { initGridAdapter(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeMediaStream File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
removeMediaStream
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
public static XMLBuilder create(String name) throws ParserConfigurationException, FactoryConfigurationError { return create(name, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
create
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public void keyguardWaitingForActivityDrawn() { if (DEBUG_KEYGUARD) Slog.d(TAG, "keyguardWaitingForActivityDrawn"); synchronized (mWindowMap) { mKeyguardWaitingForActivityDrawn = true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: keyguardWaitingForActivityDrawn File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
keyguardWaitingForActivityDrawn
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public static Collection<Element> getChildElementListNS( Element parent, String nodeName, String nsURI) { List<Element> list = new ArrayList<>(); for (org.w3c.dom.Node node = parent.getFirstChild(); node != null; node = node.getNextSibling()) { if (node.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE && node.getLocalName().equals(nodeName) && node.getNamespaceURI().equals(nsURI)) { list.add((Element) node); } } return list; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChildElementListNS File: bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java Repository: dbeaver The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3836
MEDIUM
4.3
dbeaver
getChildElementListNS
bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
4debf8f25184b7283681ed3fb5e9e887d9d4fe22
0
Analyze the following code function for security vulnerabilities
@Override public Argument<Session> argumentType() { return Argument.of(Session.class); }
Vulnerability Classification: - CWE: CWE-400 - CVE: CVE-2022-21700 - Severity: MEDIUM - CVSS Score: 5.0 Description: Use ConversionContext constants where possible instead of class (#2356) Changes ------- * Added ArgumentConversionContext constants in ConversionContext * Replaced Argument.of and use of argument classes with ConversionContext constants where possible * Added getFirst method in ConvertibleMultiValues that accepts ArgumentConversionContent parameter Partially addresses issue #2355 Function: argumentType File: session/src/main/java/io/micronaut/session/binder/SessionArgumentBinder.java Repository: micronaut-projects/micronaut-core Fixed Code: @Override public Argument<Session> argumentType() { return TYPE; }
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
argumentType
session/src/main/java/io/micronaut/session/binder/SessionArgumentBinder.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
1
Analyze the following code function for security vulnerabilities
@Override public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) { //便于Wappalyzer读取 response.addHeader("X-ZrLog", BlogBuildInfoUtil.getVersion()); boolean isPluginPath = false; for (String path : pluginHandlerPaths) { if (target.startsWith(path)) { isPluginPath = true; } } if (isPluginPath) { try { Map.Entry<AdminTokenVO, User> entry = adminTokenService.getAdminTokenVOUserEntry(request); if (entry != null) { adminTokenService.setAdminToken(entry.getValue(), entry.getKey().getSessionId(), entry.getKey().getProtocol(), request, response); } if (target.startsWith("/admin/plugins/")) { try { adminPermission(target, request, response); } catch (IOException | InstantiationException e) { LOGGER.error(e); } } else if (target.startsWith("/plugin/") || target.startsWith("/p/")) { try { visitorPermission(target, request, response); } catch (IOException | InstantiationException e) { LOGGER.error(e); } } } finally { isHandled[0] = true; } } else { this.next.handle(target, request, response, isHandled); } }
Vulnerability Classification: - CWE: CWE-863 - CVE: CVE-2020-19005 - Severity: LOW - CVSS Score: 3.5 Description: Fix #48 forget remove token from ThreadLocal Function: handle File: web/src/main/java/com/zrlog/web/handler/PluginHandler.java Repository: 94fzb/zrlog Fixed Code: @Override public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) { //便于Wappalyzer读取 response.addHeader("X-ZrLog", BlogBuildInfoUtil.getVersion()); boolean isPluginPath = false; for (String path : pluginHandlerPaths) { if (target.startsWith(path)) { isPluginPath = true; } } if (isPluginPath) { Map.Entry<AdminTokenVO, User> entry = null; try { entry = adminTokenService.getAdminTokenVOUserEntry(request); if (entry != null) { adminTokenService.setAdminToken(entry.getValue(), entry.getKey().getSessionId(), entry.getKey().getProtocol(), request, response); } if (target.startsWith("/admin/plugins/")) { try { adminPermission(target, request, response); } catch (IOException | InstantiationException e) { LOGGER.error(e); } } else if (target.startsWith("/plugin/") || target.startsWith("/p/")) { try { visitorPermission(target, request, response); } catch (IOException | InstantiationException e) { LOGGER.error(e); } } } finally { isHandled[0] = true; if (entry != null) { AdminTokenThreadLocal.remove(); } } } else { this.next.handle(target, request, response, isHandled); } }
[ "CWE-863" ]
CVE-2020-19005
LOW
3.5
94fzb/zrlog
handle
web/src/main/java/com/zrlog/web/handler/PluginHandler.java
b2b4415e2e59b6f18b0a62b633e71c96d63c43ba
1
Analyze the following code function for security vulnerabilities
protected void handleStartedGoingToSleep(int arg1) { clearFingerprintRecognized(); final int count = mCallbacks.size(); for (int i = 0; i < count; i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onStartedGoingToSleep(arg1); } } mGoingToSleep = true; mFingerprintAlreadyAuthenticated = false; updateFingerprintListeningState(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleStartedGoingToSleep File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
handleStartedGoingToSleep
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public final int read() throws IOException { ensureOpen(); return nativeAssetReadChar(mAssetNativePtr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
read
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public void onPause() { if (mSaveAndFinishWorker != null) { mSaveAndFinishWorker.setListener(null); } super.onPause(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPause File: src/com/android/settings/password/ChooseLockPassword.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
onPause
src/com/android/settings/password/ChooseLockPassword.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
@Override public void enableBinderTracing() { Binder.enableTracingForUid(Binder.getCallingUid()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableBinderTracing 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
enableBinderTracing
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Deprecated public void setXObject(DocumentReference classReference, int nb, BaseObject object) { if (object != null) { object.setOwnerDocument(this); object.setNumber(nb); } List<BaseObject> objects = this.xObjects.get(classReference); if (objects == null) { objects = new ArrayList<BaseObject>(); this.xObjects.put(classReference, objects); } while (nb >= objects.size()) { objects.add(null); } objects.set(nb, object); setMetaDataDirty(true); }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2023-26470 - Severity: HIGH - CVSS Score: 7.5 Description: XWIKI-19223: Improve xobject memory storage in XWikidocument Function: setXObject File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform Fixed Code: @Deprecated public void setXObject(DocumentReference classReference, int nb, BaseObject object) { if (object != null) { object.setOwnerDocument(this); object.setNumber(nb); } BaseObjects objects = this.xObjects.get(classReference); if (objects == null) { objects = new BaseObjects(); this.xObjects.put(classReference, objects); } while (nb >= objects.size()) { objects.add(null); } objects.set(nb, object); setMetaDataDirty(true); }
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
setXObject
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
1
Analyze the following code function for security vulnerabilities
@Override public int getKeyLength() { return 32; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKeyLength File: src/main/java/com/southernstorm/noise/protocol/AESGCMOnCtrCipherState.java Repository: rweather/noise-java The code follows secure coding practices.
[ "CWE-125", "CWE-787" ]
CVE-2020-25021
HIGH
7.5
rweather/noise-java
getKeyLength
src/main/java/com/southernstorm/noise/protocol/AESGCMOnCtrCipherState.java
18e86b6f8bea7326934109aa9ffa705ebf4bde90
0
Analyze the following code function for security vulnerabilities
private void startProfileForSetup(@UserIdInt int userId, String callerPackage) throws IllegalStateException { Slogf.i(LOG_TAG, "Starting profile %d as requested by package %s", userId, callerPackage); final long startTime = SystemClock.elapsedRealtime(); final UserUnlockedBlockingReceiver unlockedReceiver = new UserUnlockedBlockingReceiver( userId); mContext.registerReceiverAsUser( unlockedReceiver, new UserHandle(userId), new IntentFilter(Intent.ACTION_USER_UNLOCKED), /* broadcastPermission = */ null, /* scheduler= */ null); try { // Must call startProfileEvenWhenDisabled(), as profile is not enabled yet if (!mInjector.getActivityManagerInternal().startProfileEvenWhenDisabled(userId)) { throw new ServiceSpecificException(ERROR_STARTING_PROFILE_FAILED, String.format("Unable to start user %d in background", userId)); } if (!unlockedReceiver.waitForUserUnlocked()) { throw new ServiceSpecificException(ERROR_STARTING_PROFILE_FAILED, String.format("Timeout whilst waiting for unlock of user %d.", userId)); } logEventDuration( DevicePolicyEnums.PLATFORM_PROVISIONING_START_PROFILE_MS, startTime, callerPackage); } finally { mContext.unregisterReceiver(unlockedReceiver); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startProfileForSetup 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
startProfileForSetup
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private List<ScmMaterial> filterScmMaterials() { List<ScmMaterial> scmMaterials = new ArrayList<>(); for (Material material : this) { if (material instanceof ScmMaterial) { scmMaterials.add((ScmMaterial) material); } } return scmMaterials; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filterScmMaterials File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
filterScmMaterials
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@Override public void initialize() throws InitializationException { this.extraAllowedTags.addAll(this.htmlElementSanitizerConfiguration.getExtraAllowedTags()); this.extraAllowedAttributes.addAll(this.htmlElementSanitizerConfiguration.getExtraAllowedAttributes()); this.uriSafeAttributes.addAll(this.htmlElementSanitizerConfiguration.getExtraUriSafeAttributes()); this.dataUriTags.addAll(this.htmlElementSanitizerConfiguration.getExtraDataUriTags()); this.allowUnknownProtocols = this.htmlElementSanitizerConfiguration.isAllowUnknownProtocols(); this.forbidTags.addAll(this.htmlElementSanitizerConfiguration.getForbidTags()); this.forbidAttributes.addAll(this.htmlElementSanitizerConfiguration.getForbidAttributes()); String configuredRegexp = this.htmlElementSanitizerConfiguration.getAllowedUriRegexp(); if (StringUtils.isNotBlank(configuredRegexp)) { this.allowedUriPattern = Pattern.compile(configuredRegexp, Pattern.CASE_INSENSITIVE); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java Repository: xwiki/xwiki-commons The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-31126
CRITICAL
9.6
xwiki/xwiki-commons
initialize
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
0b8e9c45b7e7457043938f35265b2aa5adc76a68
0
Analyze the following code function for security vulnerabilities
public static int lastWhitespaceIn(String source) { if (CmsStringUtil.isEmpty(source)) { return -1; } int pos = -1; for (int i = source.length() - 1; i >= 0; i--) { if (Character.isWhitespace(source.charAt(i))) { pos = i; break; } } return pos; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lastWhitespaceIn File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
lastWhitespaceIn
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
private List<ObjectStreamClass> makeHierarchy() { ArrayList<ObjectStreamClass> result = new ArrayList<ObjectStreamClass>(); for (ObjectStreamClass osc = this; osc != null; osc = osc.getSuperclass()) { result.add(0, osc); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeHierarchy File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
makeHierarchy
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public PackagePolicy getManagedProfileCallerIdAccessPolicy() { if (!mHasFeature) { return null; } final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization((isProfileOwner(caller) && isManagedProfile(caller.getUserId()))); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); return (admin != null) ? admin.mManagedProfileCallerIdAccess : null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getManagedProfileCallerIdAccessPolicy 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
getManagedProfileCallerIdAccessPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
ActiveAdmin getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceParentLocked(int userId) { ensureLocked(); ActiveAdmin admin = getDeviceOwnerAdminLocked(); if (admin != null) { return admin; } admin = getProfileOwnerOfOrganizationOwnedDeviceLocked(userId); return admin != null ? admin.getParentActiveAdmin() : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceParentLocked 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
getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceParentLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Exported public boolean isFilterChangelog() { return filterChangelog; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFilterChangelog File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
isFilterChangelog
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
static String getDataRepositoryPath(String dataRepositoryPath) { if (StringUtils.isBlank(dataRepositoryPath)) { return DataManager.getInstance().getConfiguration().getViewerHome(); } if (Paths.get(FileTools.adaptPathForWindows(dataRepositoryPath)).isAbsolute()) { return dataRepositoryPath + '/'; } return DataManager.getInstance().getConfiguration().getDataRepositoriesHome() + dataRepositoryPath + '/'; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDataRepositoryPath File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-15124
MEDIUM
4
intranda/goobi-viewer-core
getDataRepositoryPath
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
44ceb8e2e7e888391e8a941127171d6366770df3
0
Analyze the following code function for security vulnerabilities
public Object listen(int param) { try { ServerSocket serverSocketInstance = getServerSockets().get(param); socketInstance = serverSocketInstance.accept(); SocketImpl si = new SocketImpl(); si.socketInstance = socketInstance; return si; } catch(Exception err) { errorMessage = err.toString(); err.printStackTrace(); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listen 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
listen
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public ChannelFuture handshake() { synchronized (handshakeLock) { if (handshaken && !isEnableRenegotiation()) { throw new IllegalStateException("renegotiation disabled"); } final ChannelHandlerContext ctx = this.ctx; final Channel channel = ctx.getChannel(); ChannelFuture handshakeFuture; Exception exception = null; if (handshaking) { return this.handshakeFuture; } handshaking = true; try { engine.beginHandshake(); runDelegatedTasks(); handshakeFuture = this.handshakeFuture = future(channel); if (handshakeTimeoutInMillis > 0) { handshakeTimeout = timer.newTimeout(new TimerTask() { public void run(Timeout timeout) throws Exception { ChannelFuture future = SslHandler.this.handshakeFuture; if (future != null && future.isDone()) { return; } setHandshakeFailure(channel, new SSLException("Handshake did not complete within " + handshakeTimeoutInMillis + "ms")); } }, handshakeTimeoutInMillis, TimeUnit.MILLISECONDS); } } catch (Exception e) { handshakeFuture = this.handshakeFuture = failedFuture(channel, e); exception = e; } if (exception == null) { // Began handshake successfully. try { final ChannelFuture hsFuture = handshakeFuture; wrapNonAppData(ctx, channel).addListener(new ChannelFutureListener() { public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { Throwable cause = future.getCause(); hsFuture.setFailure(cause); fireExceptionCaught(ctx, cause); if (closeOnSslException) { Channels.close(ctx, future(channel)); } } } }); } catch (SSLException e) { handshakeFuture.setFailure(e); fireExceptionCaught(ctx, e); if (closeOnSslException) { Channels.close(ctx, future(channel)); } } } else { // Failed to initiate handshake. fireExceptionCaught(ctx, exception); if (closeOnSslException) { Channels.close(ctx, future(channel)); } } return handshakeFuture; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handshake File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java Repository: netty The code follows secure coding practices.
[ "CWE-119" ]
CVE-2014-3488
MEDIUM
5
netty
handshake
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
2fa9400a59d0563a66908aba55c41e7285a04994
0
Analyze the following code function for security vulnerabilities
private void logStrictModeViolationToDropBox( ProcessRecord process, StrictMode.ViolationInfo info) { if (info == null) { return; } final boolean isSystemApp = process == null || (process.info.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0; final String processName = process == null ? "unknown" : process.processName; final String dropboxTag = isSystemApp ? "system_app_strictmode" : "data_app_strictmode"; final DropBoxManager dbox = (DropBoxManager) mContext.getSystemService(Context.DROPBOX_SERVICE); // Exit early if the dropbox isn't configured to accept this report type. if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return; boolean bufferWasEmpty; boolean needsFlush; final StringBuilder sb = isSystemApp ? mStrictModeBuffer : new StringBuilder(1024); synchronized (sb) { bufferWasEmpty = sb.length() == 0; appendDropBoxProcessHeaders(process, processName, sb); sb.append("Build: ").append(Build.FINGERPRINT).append("\n"); sb.append("System-App: ").append(isSystemApp).append("\n"); sb.append("Uptime-Millis: ").append(info.violationUptimeMillis).append("\n"); if (info.violationNumThisLoop != 0) { sb.append("Loop-Violation-Number: ").append(info.violationNumThisLoop).append("\n"); } if (info.numAnimationsRunning != 0) { sb.append("Animations-Running: ").append(info.numAnimationsRunning).append("\n"); } if (info.broadcastIntentAction != null) { sb.append("Broadcast-Intent-Action: ").append(info.broadcastIntentAction).append("\n"); } if (info.durationMillis != -1) { sb.append("Duration-Millis: ").append(info.durationMillis).append("\n"); } if (info.numInstances != -1) { sb.append("Instance-Count: ").append(info.numInstances).append("\n"); } if (info.tags != null) { for (String tag : info.tags) { sb.append("Span-Tag: ").append(tag).append("\n"); } } sb.append("\n"); if (info.crashInfo != null && info.crashInfo.stackTrace != null) { sb.append(info.crashInfo.stackTrace); } sb.append("\n"); // Only buffer up to ~64k. Various logging bits truncate // things at 128k. needsFlush = (sb.length() > 64 * 1024); } // Flush immediately if the buffer's grown too large, or this // is a non-system app. Non-system apps are isolated with a // different tag & policy and not batched. // // Batching is useful during internal testing with // StrictMode settings turned up high. Without batching, // thousands of separate files could be created on boot. if (!isSystemApp || needsFlush) { new Thread("Error dump: " + dropboxTag) { @Override public void run() { String report; synchronized (sb) { report = sb.toString(); sb.delete(0, sb.length()); sb.trimToSize(); } if (report.length() != 0) { dbox.addText(dropboxTag, report); } } }.start(); return; } // System app batching: if (!bufferWasEmpty) { // An existing dropbox-writing thread is outstanding, so // we don't need to start it up. The existing thread will // catch the buffer appends we just did. return; } // Worker thread to both batch writes and to avoid blocking the caller on I/O. // (After this point, we shouldn't access AMS internal data structures.) new Thread("Error dump: " + dropboxTag) { @Override public void run() { // 5 second sleep to let stacks arrive and be batched together try { Thread.sleep(5000); // 5 seconds } catch (InterruptedException e) {} String errorReport; synchronized (mStrictModeBuffer) { errorReport = mStrictModeBuffer.toString(); if (errorReport.length() == 0) { return; } mStrictModeBuffer.delete(0, mStrictModeBuffer.length()); mStrictModeBuffer.trimToSize(); } dbox.addText(dropboxTag, errorReport); } }.start(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logStrictModeViolationToDropBox File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
logStrictModeViolationToDropBox
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
boolean removeInputConsumer() { synchronized (mWindowMap) { if (mInputConsumer != null) { mInputConsumer = null; mInputMonitor.updateInputWindowsLw(true); return true; } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeInputConsumer File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
removeInputConsumer
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private boolean hasPermission(String permission, String callerPackageName, int targetUserId) { CallerIdentity caller = getCallerIdentity(callerPackageName); boolean hasPermissionOnOwnUser = hasPermission(permission, caller.getPackageName()); boolean hasPermissionOnTargetUser = true; if (hasPermissionOnOwnUser && caller.getUserId() != targetUserId) { hasPermissionOnTargetUser = hasPermissionOnTargetUser && hasPermission(CROSS_USER_PERMISSIONS.get(permission), caller.getPackageName()); } return hasPermissionOnOwnUser && hasPermissionOnTargetUser; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasPermission 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
hasPermission
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public static List<String> splitAsList(String source, char delimiter, boolean trim) { List<String> result = new ArrayList<String>(); int i = 0; int l = source.length(); int n = source.indexOf(delimiter); while (n != -1) { // zero - length items are not seen as tokens at start or end if ((i < n) || ((i > 0) && (i < l))) { result.add(trim ? source.substring(i, n).trim() : source.substring(i, n)); } i = n + 1; n = source.indexOf(delimiter, i); } // is there a non - empty String to cut from the tail? if (n < 0) { n = source.length(); } if (i < n) { result.add(trim ? source.substring(i).trim() : source.substring(i)); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: splitAsList File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
splitAsList
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public User selectUser(String userId, String email) { User user = userMapper.selectByPrimaryKey(userId); if (user == null) { if (StringUtils.isNotBlank(email)) { UserExample example = new UserExample(); example.createCriteria().andEmailEqualTo(email); List<User> users = userMapper.selectByExample(example); if (!CollectionUtils.isEmpty(users)) { return users.get(0); } } } return user; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectUser File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-32699
MEDIUM
6.5
metersphere
selectUser
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
c59e381d368990214813085a1a4877c5ef865411
0
Analyze the following code function for security vulnerabilities
protected abstract UrlArgument getUrlArgument();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUrlArgument File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
getUrlArgument
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
public boolean canForceOrientation() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canForceOrientation 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
canForceOrientation
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected Boolean innerLogin() throws LoginException { // Obtain the username and password processIdentityAndCredential(); if (trace) { log.trace("Identity - " + getIdentity().getName()); } // Initialise search ctx String bindCredential = this.bindCredential; if (AUTH_TYPE_GSSAPI.equals(bindAuthentication) == false) { if (jaasSecurityDomain != null && jaasSecurityDomain.length() > 0) { try { ObjectName serviceName = new ObjectName(jaasSecurityDomain); char[] tmp = DecodeAction.decode(bindCredential, serviceName); bindCredential = new String(tmp); } catch (Exception e) { LoginException le = new LoginException("Unable to decode bindCredential"); le.initCause(e); throw le; } } } LdapContext searchContext = null; try { searchContext = constructLdapContext(null, bindDn, bindCredential, bindAuthentication); log.debug("Obtained LdapContext"); // Search for user in LDAP String userDN = findUserDN(searchContext); if (referralUserAttributeIDToCheck != null) { if (isUserDnAbsolute(userDN)) { referralUserDNToCheck = localUserDN(userDN); } else { referralUserDNToCheck = userDN; } } // If authentication required authenticate as user if (super.loginOk == false) { authenticate(userDN); } if (super.loginOk) { // Search for roles in LDAP rolesSearch(searchContext, userDN); } } finally { if (searchContext != null) { try { searchContext.close(); } catch (NamingException e) { log.warn("Error closing context", e); } } } return Boolean.valueOf(super.loginOk); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: innerLogin File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java Repository: wildfly-security/jboss-negotiation The code follows secure coding practices.
[ "CWE-200" ]
CVE-2015-1849
MEDIUM
4.3
wildfly-security/jboss-negotiation
innerLogin
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
0
Analyze the following code function for security vulnerabilities
@Override boolean isWaitingForTransitionStart() { final DisplayContent dc = getDisplayContent(); return dc != null && dc.mAppTransition.isTransitionSet() && (dc.mOpeningApps.contains(this) || dc.mClosingApps.contains(this) || dc.mChangingContainers.contains(this)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWaitingForTransitionStart File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
isWaitingForTransitionStart
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private static void byMonitoredItemType( Collection<BaseMonitoredItem<?>> monitoredItems, Consumer<List<DataItem>> dataItemConsumer, Consumer<List<EventItem>> eventItemConsumer ) { List<DataItem> dataItems = Lists.newArrayList(); List<EventItem> eventItems = Lists.newArrayList(); for (BaseMonitoredItem<?> item : monitoredItems) { if (item instanceof MonitoredDataItem) { dataItems.add((DataItem) item); } else if (item instanceof MonitoredEventItem) { eventItems.add((EventItem) item); } } try { if (!dataItems.isEmpty()) { dataItemConsumer.accept(dataItems); } } catch (Throwable t) { LoggerFactory.getLogger(SubscriptionManager.class) .error("Uncaught Throwable in dataItemConsumer", t); } try { if (!eventItems.isEmpty()) { eventItemConsumer.accept(eventItems); } } catch (Throwable t) { LoggerFactory.getLogger(SubscriptionManager.class) .error("Uncaught Throwable in eventItemConsumer", t); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: byMonitoredItemType File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java Repository: eclipse/milo The code follows secure coding practices.
[ "CWE-770" ]
CVE-2022-25897
HIGH
7.5
eclipse/milo
byMonitoredItemType
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
0
Analyze the following code function for security vulnerabilities
public String getLaunchedFromPackage(IBinder activityToken) { ActivityRecord srec; synchronized (this) { srec = ActivityRecord.forTokenLocked(activityToken); } if (srec == null) { return null; } return srec.launchedFromPackage; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLaunchedFromPackage 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
getLaunchedFromPackage
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("rawtypes") public static boolean hasProvider(Encounter e) { try { Method method = e.getClass().getMethod("getProvidersByRoles"); // this is a Map<EncounterRole, Set<Provider>> Map providersByRoles = (Map) method.invoke(e); return providersByRoles != null && providersByRoles.size() > 0; } catch (Exception ex) { return EncounterCompatibility.getProvider(e) != null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasProvider 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
hasProvider
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
public static Document parse(ParserEnvironment environment) throws InvalidSyntaxException { return new Parser().parseDocument(environment); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse File: src/main/java/graphql/parser/Parser.java Repository: graphql-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-28867
HIGH
7.5
graphql-java
parse
src/main/java/graphql/parser/Parser.java
8a1c884c81c0b656db201cfd95881feb0f430a55
0
Analyze the following code function for security vulnerabilities
public String getAttributeValue(String namespace, String name) { int idx = nativeGetAttributeIndex(mParseState, namespace, name); if (idx >= 0) { if (DEBUG) System.out.println("getAttributeName of " + namespace + ":" + name + " index = " + idx); if (DEBUG) System.out.println( "Namespace=" + getAttributeNamespace(idx) + "Name=" + getAttributeName(idx) + ", Value=" + getAttributeValue(idx)); return getAttributeValue(idx); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributeValue 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
getAttributeValue
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public static SymKeyGenerationRequest fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element element = document.getDocumentElement(); return fromDOM(element); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: fromXML File: base/common/src/main/java/com/netscape/certsrv/key/SymKeyGenerationRequest.java Repository: dogtagpki/pki Fixed Code: public static SymKeyGenerationRequest fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element element = document.getDocumentElement(); return fromDOM(element); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
fromXML
base/common/src/main/java/com/netscape/certsrv/key/SymKeyGenerationRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
boolean setWallpaperOffset(int dx, int dy, float scale) { if (mXOffset == dx && mYOffset == dy && Float.compare(mWallpaperScale, scale) == 0) { return false; } mXOffset = dx; mYOffset = dy; mWallpaperScale = scale; scheduleAnimation(); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWallpaperOffset File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
setWallpaperOffset
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public void deleteAllDocuments(XWikiDocument doc, XWikiContext context) throws XWikiException { deleteAllDocuments(doc, true, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAllDocuments 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
deleteAllDocuments
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public ArrayList<String> getSharedElementNames() { return mSharedElementNames; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSharedElementNames File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
getSharedElementNames
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public void notifyLockedProfile(@UserIdInt int userId, int currentUserId) { try { if (!AppGlobals.getPackageManager().isUidPrivileged(Binder.getCallingUid())) { throw new SecurityException("Only privileged app can call notifyLockedProfile"); } } catch (RemoteException ex) { throw new SecurityException("Fail to check is caller a privileged app", ex); } synchronized (mGlobalLock) { final long ident = Binder.clearCallingIdentity(); try { if (mAmInternal.shouldConfirmCredentials(userId)) { if (mKeyguardController.isKeyguardLocked(DEFAULT_DISPLAY)) { // Showing launcher to avoid user entering credential twice. startHomeActivity(currentUserId, "notifyLockedProfile"); } mRootWindowContainer.lockAllProfileTasks(userId); } } finally { Binder.restoreCallingIdentity(ident); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyLockedProfile File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
notifyLockedProfile
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public String getPositionDescription() { return "Binary XML file line #" + getLineNumber(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPositionDescription 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
getPositionDescription
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public boolean isGaussianBlurSupported() { return (!brokenGaussian) && android.os.Build.VERSION.SDK_INT >= 11; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isGaussianBlurSupported 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
isGaussianBlurSupported
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void getMemoryInfo(ActivityManager.MemoryInfo outInfo) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMemoryInfo File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getMemoryInfo
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public int getPages() { return pages; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPages File: src/main/java/com/github/pagehelper/Page.java Repository: pagehelper/Mybatis-PageHelper The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-28111
HIGH
7.5
pagehelper/Mybatis-PageHelper
getPages
src/main/java/com/github/pagehelper/Page.java
554a524af2d2b30d09505516adc412468a84d8fa
0
Analyze the following code function for security vulnerabilities
private static Response getResponseForRoute(RouteInfo route, Request req, User user) throws Exception { Response response; try { // Call the RestHandler for the route response = route.callHandler(req, user); } catch (Exception e) { Log.exception("Exception while handling URI " + req.getURI(), e); try { // Call Internal Server Error handler on exception response = GribbitServer.siteResources.getInternalServerErrorRoute().callHandler(req, user); } catch (Exception e1) { // Fallback in case there's an exception in the Internal Server Error handler Log.exception("Error in internal server error handler while handling URI " + req.getURI(), e1); response = new ErrorResponse(HttpResponseStatus.INTERNAL_SERVER_ERROR, "Internal Server Error"); } } return response; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResponseForRoute File: src/gribbit/request/HttpRequestHandler.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
getResponseForRoute
src/gribbit/request/HttpRequestHandler.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
private String getRequestContentType(RoutingContext ctx) { String contentType = ctx.request().getHeader("Content-Type"); if (contentType != null && !contentType.isEmpty() && !contentType.startsWith("*/*")) { return contentType; } return DEFAULT_REQUEST_CONTENT_TYPE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestContentType File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java Repository: quarkusio/quarkus The code follows secure coding practices.
[ "CWE-444" ]
CVE-2022-2466
CRITICAL
9.8
quarkusio/quarkus
getRequestContentType
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
08e5c3106ce4bfb18b24a38514eeba6464668b07
0
Analyze the following code function for security vulnerabilities
public static String getDbInfoByEnv() { return System.getenv("DB_PROPERTIES"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDbInfoByEnv File: common/src/main/java/com/zrlog/util/ZrLogUtil.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
getDbInfoByEnv
common/src/main/java/com/zrlog/util/ZrLogUtil.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
public void setClassesToBeBound(Class<?>... classesToBeBound) { Assert.notEmpty(classesToBeBound, "'classesToBeBound' must not be empty"); this.classesToBeBound = classesToBeBound; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setClassesToBeBound File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java Repository: spring-projects/spring-framework The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-4152
MEDIUM
6.8
spring-projects/spring-framework
setClassesToBeBound
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
0
Analyze the following code function for security vulnerabilities
public String getURL(String space, String page, String action, Map<String, ?> queryParameters) { return getURL(space, page, action, toQueryString(queryParameters)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURL 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
getURL
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
boolean hasWallpaper() { return (mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0 || hasWallpaperForLetterboxBackground(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasWallpaper File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
hasWallpaper
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
void setServiceName(String name) { mServiceName = name; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServiceName File: core/java/android/bluetooth/BluetoothSocket.java Repository: Genymobile/f2ut_platform_frameworks_base The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2014-9908
LOW
3.3
Genymobile/f2ut_platform_frameworks_base
setServiceName
core/java/android/bluetooth/BluetoothSocket.java
f24cec326f5f65c693544fb0b92c37f633bacda2
0
Analyze the following code function for security vulnerabilities
private int pendingAppData() { // There won't be any application data until we're done handshaking. // We first check handshakeFinished to eliminate the overhead of extra JNI call if possible. return handshakeState == HandshakeState.FINISHED ? SSL.pendingReadableBytesInSSL(ssl) : 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pendingAppData File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
pendingAppData
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
public boolean inTransaction() { acquireReference(); try { return getThreadSession().hasTransaction(); } finally { releaseReference(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inTransaction File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
inTransaction
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public static SSLSocketFactory getSslSocketFactory(Properties info) throws PSQLException { String classname = PGProperty.SSL_FACTORY.get(info); if (classname == null || "org.postgresql.ssl.jdbc4.LibPQFactory".equals(classname) || "org.postgresql.ssl.LibPQFactory".equals(classname)) { return new LibPQFactory(info); } try { return (SSLSocketFactory) ObjectFactory.instantiate(classname, info, true, PGProperty.SSL_FACTORY_ARG.get(info)); } catch (Exception e) { throw new PSQLException( GT.tr("The SSLSocketFactory class provided {0} could not be instantiated.", classname), PSQLState.CONNECTION_FAILURE, e); } }
Vulnerability Classification: - CWE: CWE-665 - CVE: CVE-2022-21724 - Severity: HIGH - CVSS Score: 7.5 Description: Merge pull request from GHSA-v7wg-cpwc-24m4 This ensures arbitrary classes can't be passed instead of AuthenticationPlugin, SocketFactory, SSLSocketFactory, CallbackHandler, HostnameVerifier Function: getSslSocketFactory File: pgjdbc/src/main/java/org/postgresql/core/SocketFactoryFactory.java Repository: pgjdbc Fixed Code: public static SSLSocketFactory getSslSocketFactory(Properties info) throws PSQLException { String classname = PGProperty.SSL_FACTORY.get(info); if (classname == null || "org.postgresql.ssl.jdbc4.LibPQFactory".equals(classname) || "org.postgresql.ssl.LibPQFactory".equals(classname)) { return new LibPQFactory(info); } try { return ObjectFactory.instantiate(SSLSocketFactory.class, classname, info, true, PGProperty.SSL_FACTORY_ARG.get(info)); } catch (Exception e) { throw new PSQLException( GT.tr("The SSLSocketFactory class provided {0} could not be instantiated.", classname), PSQLState.CONNECTION_FAILURE, e); } }
[ "CWE-665" ]
CVE-2022-21724
HIGH
7.5
pgjdbc
getSslSocketFactory
pgjdbc/src/main/java/org/postgresql/core/SocketFactoryFactory.java
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
1
Analyze the following code function for security vulnerabilities
public static final native long getPss(int pid);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPss File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
getPss
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
@JsxFunction public void setParameter(final String namespaceURI, final String localName, final Object value) { parameters_.put(getQualifiedName(namespaceURI, localName), value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setParameter File: src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-94" ]
CVE-2023-26119
CRITICAL
9.8
HtmlUnit/htmlunit
setParameter
src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java
641325bbc84702dc9800ec7037aec061ce21956b
0
Analyze the following code function for security vulnerabilities
static public String getFileSource(ObjectNode fileRecord) { return JSONUtilities.getString( fileRecord, "url", JSONUtilities.getString(fileRecord, "fileName", "unknown") ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFileSource File: main/src/com/google/refine/importing/ImportingUtilities.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-19859
MEDIUM
4
OpenRefine
getFileSource
main/src/com/google/refine/importing/ImportingUtilities.java
e243e73e4064de87a913946bd320fbbe246da656
0
Analyze the following code function for security vulnerabilities
public AuthenticationInfo loadAuthenticationInfo(JSONWebToken token) { Key key = getJWTKey(); Jwt jwt; try { jwt = Jwts.parser().setSigningKey(key).parse(token.getPrincipal()); } catch (JwtException e) { throw new AuthenticationException(e); } String credentials = legacyHashing ? token.getCredentials() : encryptPassword(token.getCredentials()); Object principal = extractPrincipalFromWebToken(jwt); return new SimpleAuthenticationInfo(principal, credentials, getName()); }
Vulnerability Classification: - CWE: CWE-347 - CVE: CVE-2021-29451 - Severity: MEDIUM - CVSS Score: 6.4 Description: Fix security vulnerability Function: loadAuthenticationInfo File: portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java Repository: ManyDesigns/Portofino Fixed Code: public AuthenticationInfo loadAuthenticationInfo(JSONWebToken token) { Key key = getJWTKey(); Jws<Claims> jwt; try { jwt = Jwts.parser().setSigningKey(key).parseClaimsJws(token.getPrincipal()); } catch (JwtException e) { throw new AuthenticationException(e); } String credentials = legacyHashing ? token.getCredentials() : encryptPassword(token.getCredentials()); Object principal = extractPrincipalFromWebToken(jwt); return new SimpleAuthenticationInfo(principal, credentials, getName()); }
[ "CWE-347" ]
CVE-2021-29451
MEDIUM
6.4
ManyDesigns/Portofino
loadAuthenticationInfo
portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
8c754a0ad234555e813dcbf9e57d637f9f23d8fb
1
Analyze the following code function for security vulnerabilities
@Override protected Class<?> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { List<Class<?>> loadedClasses = new ArrayList<Class<?>>(interfaces.length); for (String name : interfaces) { Class<?> clazz = Class.forName(name, false, classLoader); loadedClasses.add(clazz); } return Proxy.getProxyClass(classLoader, loadedClasses.toArray(new Class[loadedClasses.size()])); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2023-42809 - Severity: HIGH - CVSS Score: 8.8 Description: Feature - allowedClasses setting added to SerializationCodec https://github.com/redisson/redisson/security/code-scanning/4 Function: resolveProxyClass File: redisson/src/main/java/org/redisson/codec/CustomObjectInputStream.java Repository: redisson Fixed Code: @Override protected Class<?> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { List<Class<?>> loadedClasses = new ArrayList<Class<?>>(interfaces.length); for (String name : interfaces) { Class<?> clazz = Class.forName(name, false, classLoader); loadedClasses.add(clazz); } return Proxy.getProxyClass(classLoader, loadedClasses.toArray(new Class[0])); }
[ "CWE-502" ]
CVE-2023-42809
HIGH
8.8
redisson
resolveProxyClass
redisson/src/main/java/org/redisson/codec/CustomObjectInputStream.java
fe6a2571801656ff1599ef87bdee20f519a5d1fe
1
Analyze the following code function for security vulnerabilities
private void updateDozingVisibilities(boolean animate) { if (mDozing) { mKeyguardStatusBar.setVisibility(View.INVISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); } else { mKeyguardStatusBar.setVisibility(View.VISIBLE); mKeyguardBottomArea.setDozing(mDozing, animate); if (animate) { animateKeyguardStatusBarIn(DOZE_ANIMATION_DURATION); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateDozingVisibilities 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
updateDozingVisibilities
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public ConnectionInfo getOrWaitForConnectionInfo(int minKexCount) throws IOException { synchronized (accessLock) { while (true) { if ((lastConnInfo != null) && (lastConnInfo.keyExchangeCounter >= minKexCount)) return lastConnInfo; if (connectionClosed) throw new IOException("Key exchange was not finished, connection is closed.", tm.getReasonClosedCause()); try { accessLock.wait(); } catch (InterruptedException ignore) { } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrWaitForConnectionInfo File: src/main/java/com/trilead/ssh2/transport/KexManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
getOrWaitForConnectionInfo
src/main/java/com/trilead/ssh2/transport/KexManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
private void writeHuffmanEncodableName(ByteBuffer target, HttpString headerName) { if (hpackHeaderFunction.shouldUseHuffman(headerName)) { if(HPackHuffman.encode(target, headerName.toString(), true)) { return; } } target.put((byte) 0); //to use encodeInteger we need to place the first byte in the buffer. encodeInteger(target, headerName.length(), 7); for (int j = 0; j < headerName.length(); ++j) { target.put(Hpack.toLower(headerName.byteAt(j))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeHuffmanEncodableName File: core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
writeHuffmanEncodableName
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
protected int findTheme() { return ThemeHelper.find(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findTheme File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
findTheme
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public IBinder peekService(Intent service, String resolvedType, String callingPackage) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: peekService File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
peekService
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void commit(ConsoleOutputStreamConsumer consumer, String comment, String username) { CommandLine hg = hg("commit", "-m", comment, "-u", username); execute(hg, consumer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: commit File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2022-29184
MEDIUM
6.5
gocd
commit
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
37d35115db2ada2190173f9413cfe1bc6c295ecb
0