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 void destroy() {
try {
client.close();
} catch (IOException e) {
LOGGER.warn("Unable to close HTTP client", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
destroy
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
c2ccb38250910587498597955d0bbee8b58e46df
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void recordAggregatedUsageEvents(UsageEvents events, AppRow appRow) {
appRow.sentByChannel = new HashMap<>();
appRow.sentByApp = new NotificationsSentState();
if (events != null) {
UsageEvents.Event event = new UsageEvents.Event();
while (events.hasNextEvent()) {
events.getNextEvent(event);
if (event.getEventType() == UsageEvents.Event.NOTIFICATION_INTERRUPTION) {
String channelId = event.mNotificationChannelId;
if (channelId != null) {
NotificationsSentState stats = appRow.sentByChannel.get(channelId);
if (stats == null) {
stats = new NotificationsSentState();
appRow.sentByChannel.put(channelId, stats);
}
if (event.getTimeStamp() > stats.lastSent) {
stats.lastSent = event.getTimeStamp();
appRow.sentByApp.lastSent = event.getTimeStamp();
}
stats.sentCount++;
appRow.sentByApp.sentCount++;
calculateAvgSentCounts(stats);
}
}
}
calculateAvgSentCounts(appRow.sentByApp);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recordAggregatedUsageEvents
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
recordAggregatedUsageEvents
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
public void shutdown() {
mPackageUsage.write(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
shutdown
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void retrieveSettings(ContentResolver resolver) {
final boolean freeformWindowManagement =
mContext.getPackageManager().hasSystemFeature(FEATURE_FREEFORM_WINDOW_MANAGEMENT)
|| Settings.Global.getInt(
resolver, DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT, 0) != 0;
final boolean supportsMultiWindow = ActivityTaskManager.supportsMultiWindow(mContext);
final boolean supportsPictureInPicture = supportsMultiWindow &&
mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE);
final boolean supportsExpandedPictureInPicture =
supportsPictureInPicture && mContext.getPackageManager().hasSystemFeature(
FEATURE_EXPANDED_PICTURE_IN_PICTURE);
final boolean supportsSplitScreenMultiWindow =
ActivityTaskManager.supportsSplitScreenMultiWindow(mContext);
final boolean supportsMultiDisplay = mContext.getPackageManager()
.hasSystemFeature(FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS);
final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0;
final boolean forceResizable = Settings.Global.getInt(
resolver, DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, 0) != 0;
final boolean devEnableNonResizableMultiWindow = Settings.Global.getInt(
resolver, DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW, 0) != 0;
final int supportsNonResizableMultiWindow = mContext.getResources().getInteger(
com.android.internal.R.integer.config_supportsNonResizableMultiWindow);
final int respectsActivityMinWidthHeightMultiWindow = mContext.getResources().getInteger(
com.android.internal.R.integer.config_respectsActivityMinWidthHeightMultiWindow);
final float minPercentageMultiWindowSupportHeight = mContext.getResources().getFloat(
com.android.internal.R.dimen.config_minPercentageMultiWindowSupportHeight);
final float minPercentageMultiWindowSupportWidth = mContext.getResources().getFloat(
com.android.internal.R.dimen.config_minPercentageMultiWindowSupportWidth);
final int largeScreenSmallestScreenWidthDp = mContext.getResources().getInteger(
com.android.internal.R.integer.config_largeScreenSmallestScreenWidthDp);
// Transfer any global setting for forcing RTL layout, into a System Property
DisplayProperties.debug_force_rtl(forceRtl);
final Configuration configuration = new Configuration();
Settings.System.getConfiguration(resolver, configuration);
if (forceRtl) {
// This will take care of setting the correct layout direction flags
configuration.setLayoutDirection(configuration.locale);
}
synchronized (mGlobalLock) {
mForceResizableActivities = forceResizable;
mDevEnableNonResizableMultiWindow = devEnableNonResizableMultiWindow;
mSupportsNonResizableMultiWindow = supportsNonResizableMultiWindow;
mRespectsActivityMinWidthHeightMultiWindow = respectsActivityMinWidthHeightMultiWindow;
mMinPercentageMultiWindowSupportHeight = minPercentageMultiWindowSupportHeight;
mMinPercentageMultiWindowSupportWidth = minPercentageMultiWindowSupportWidth;
mLargeScreenSmallestScreenWidthDp = largeScreenSmallestScreenWidthDp;
final boolean multiWindowFormEnabled = freeformWindowManagement
|| supportsSplitScreenMultiWindow
|| supportsPictureInPicture
|| supportsMultiDisplay;
if ((supportsMultiWindow || forceResizable) && multiWindowFormEnabled) {
mSupportsMultiWindow = true;
mSupportsFreeformWindowManagement = freeformWindowManagement;
mSupportsSplitScreenMultiWindow = supportsSplitScreenMultiWindow;
mSupportsPictureInPicture = supportsPictureInPicture;
mSupportsExpandedPictureInPicture = supportsExpandedPictureInPicture;
mSupportsMultiDisplay = supportsMultiDisplay;
} else {
mSupportsMultiWindow = false;
mSupportsFreeformWindowManagement = false;
mSupportsSplitScreenMultiWindow = false;
mSupportsPictureInPicture = false;
mSupportsExpandedPictureInPicture = false;
mSupportsMultiDisplay = false;
}
mWindowManager.mRoot.onSettingsRetrieved();
// This happens before any activities are started, so we can change global configuration
// in-place.
updateConfigurationLocked(configuration, null, true);
final Configuration globalConfig = getGlobalConfiguration();
ProtoLog.v(WM_DEBUG_CONFIGURATION, "Initial config: %s", globalConfig);
// Load resources only after the current configuration has been set.
final Resources res = mContext.getResources();
mThumbnailWidth = res.getDimensionPixelSize(
com.android.internal.R.dimen.thumbnail_width);
mThumbnailHeight = res.getDimensionPixelSize(
com.android.internal.R.dimen.thumbnail_height);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrieveSettings
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
|
retrieveSettings
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addCookie(Cookie[] cookiesArray) {
if(isUseNativeCookieStore()) {
this.addCookie(cookiesArray, true);
} else {
super.addCookie(cookiesArray);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCookie
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
|
addCookie
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateAppPermission(Account account, String authTokenType, int uid, boolean value)
throws RemoteException {
final int callingUid = getCallingUid();
if (UserHandle.getAppId(callingUid) != Process.SYSTEM_UID) {
throw new SecurityException();
}
if (value) {
grantAppPermission(account, authTokenType, uid);
} else {
revokeAppPermission(account, authTokenType, uid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAppPermission
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
|
updateAppPermission
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private ParseException expected(String expected) {
if (isEndOfText()) {
return error("Unexpected end of input");
}
return error("Expected "+expected);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: expected
File: src/main/org/hjson/JsonParser.java
Repository: hjson/hjson-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
expected
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void checkAuthentication(HttpExchange pHttpExchange) throws SecurityException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAuthentication
File: agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-1000129
|
MEDIUM
| 4.3
|
jolokia
|
checkAuthentication
|
agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java
|
5895d5c137c335e6b473e9dcb9baf748851bbc5f
| 0
|
Analyze the following code function for security vulnerabilities
|
private BufferedReader getResource(final String name) {
return new BufferedReader(
new InputStreamReader(this.getClass().getResourceAsStream(name))
);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-20000
- Severity: MEDIUM
- CVSS Score: 5.0
Description: format: follow the repo code style, and welcome mvnvm props to manage maven versions
Function: getResource
File: src/test/java/org/bedework/webdav/servlet/common/TestSecureXmlTypes.java
Repository: Bedework/bw-webdav
Fixed Code:
private BufferedReader getResource(final String name) {
return new BufferedReader(
new InputStreamReader(this.getClass().getResourceAsStream(name))
);
}
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
getResource
|
src/test/java/org/bedework/webdav/servlet/common/TestSecureXmlTypes.java
|
0ce2007b3515a23b5f287ef521300bcb1f748edc
| 1
|
Analyze the following code function for security vulnerabilities
|
public int getHttp2Version() {
return 3;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHttp2Version
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getHttp2Version
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
private RoleDto fetchRoleWithRoleName(String roleName) {
RoleDto role = null;
try {
role = userManagementService.retrieveRoleByRoleName(roleName);
} catch (Exception e) {
log.warn("errors while fetch role with role name:{}", roleName);
role = null;
}
return role;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchRoleWithRoleName
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
fetchRoleWithRoleName
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
private DocumentReference getSourceDocumentReference(String source)
{
// if the source is empty or null, use current document
if (StringUtils.isEmpty(source)) {
return getXWikiContext().getDoc().getDocumentReference();
}
// resolve the source as document reference, relative to current context
return currentReferenceResolver.resolve(source);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSourceDocumentReference
File: xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-32621
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getSourceDocumentReference
|
xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java
|
bb7068bd911f91e5511f3cfb03276c7ac81100bc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleHide() {
Trace.beginSection("KeyguardViewMediator#handleHide");
// It's possible that the device was unlocked in a dream state. It's time to wake up.
if (mAodShowing || mDreamOverlayShowing) {
PowerManager pm = mContext.getSystemService(PowerManager.class);
pm.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE,
"com.android.systemui:BOUNCER_DOZING");
}
synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleHide");
if (mustNotUnlockCurrentUser()) {
// In split system user mode, we never unlock system user. The end user has to
// switch to another user.
// TODO: We should stop it early by disabling the swipe up flow. Right now swipe up
// still completes and makes the screen blank.
if (DEBUG) Log.d(TAG, "Split system user, quit unlocking.");
mKeyguardExitAnimationRunner = null;
return;
}
mHiding = true;
if (mShowing && !mOccluded) {
mKeyguardGoingAwayRunnable.run();
} else {
// TODO(bc-unlock): Fill parameters
mNotificationShadeWindowControllerLazy.get().batchApplyWindowLayoutParams(() -> {
handleStartKeyguardExitAnimation(
SystemClock.uptimeMillis() + mHideAnimation.getStartOffset(),
mHideAnimation.getDuration(), null /* apps */, null /* wallpapers */,
null /* nonApps */, null /* finishedCallback */);
});
}
}
Trace.endSection();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleHide
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
handleHide
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(ListConfig c1, ListConfig c2) {
return isCompatible(c1, c2);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public int getStorageEncryptionStatus(int userHandle) {
if (mService != null) {
try {
return mService.getStorageEncryptionStatus(mContext.getPackageName(), userHandle);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return ENCRYPTION_STATUS_UNSUPPORTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStorageEncryptionStatus
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
|
getStorageEncryptionStatus
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFields(Set<String> fields) {
this.fields = fields;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFields
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34602
|
HIGH
| 7.5
|
jeecgboot/jeecg-boot
|
setFields
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
|
dd7bf104e7ed59142909567ecd004335c3442ec5
| 0
|
Analyze the following code function for security vulnerabilities
|
private int tmpRemoveWindowLocked(int interestingPos, WindowState win) {
WindowList windows = win.getWindowList();
int wpos = windows.indexOf(win);
if (wpos >= 0) {
if (wpos < interestingPos) interestingPos--;
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Temp removing at " + wpos + ": " + win);
windows.remove(wpos);
mWindowsChanged = true;
int NC = win.mChildWindows.size();
while (NC > 0) {
NC--;
WindowState cw = win.mChildWindows.get(NC);
int cpos = windows.indexOf(cw);
if (cpos >= 0) {
if (cpos < interestingPos) interestingPos--;
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Temp removing child at "
+ cpos + ": " + cw);
windows.remove(cpos);
}
}
}
return interestingPos;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tmpRemoveWindowLocked
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
|
tmpRemoveWindowLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void moveTaskToBottom(int taskId) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized(mWindowMap) {
Task task = mTaskIdToTask.get(taskId);
if (task == null) {
Slog.e(TAG, "moveTaskToBottom: taskId=" + taskId
+ " not found in mTaskIdToTask");
return;
}
final TaskStack stack = task.mStack;
stack.moveTaskToBottom(task);
if (mAppTransition.isTransitionSet()) {
task.setSendingToBottom(true);
}
moveStackWindowsLocked(stack.getDisplayContent());
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToBottom
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
|
moveTaskToBottom
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setInstallLocation(int loc) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS,
null);
if (getInstallLocation() == loc) {
return true;
}
if (loc == PackageHelper.APP_INSTALL_AUTO || loc == PackageHelper.APP_INSTALL_INTERNAL
|| loc == PackageHelper.APP_INSTALL_EXTERNAL) {
android.provider.Settings.Global.putInt(mContext.getContentResolver(),
android.provider.Settings.Global.DEFAULT_INSTALL_LOCATION, loc);
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInstallLocation
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
setInstallLocation
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private final ProcessRecord removeProcessNameLocked(final String name, final int uid,
final ProcessRecord expecting) {
ProcessRecord old = mProcessNames.get(name, uid);
// Only actually remove when the currently recorded value matches the
// record that we expected; if it doesn't match then we raced with a
// newly created process and we don't want to destroy the new one.
if ((expecting == null) || (old == expecting)) {
mProcessNames.remove(name, uid);
}
if (old != null && old.uidRecord != null) {
old.uidRecord.numProcs--;
if (old.uidRecord.numProcs == 0) {
// No more processes using this uid, tell clients it is gone.
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"No more processes in " + old.uidRecord);
enqueueUidChangeLocked(old.uidRecord, -1, UidRecord.CHANGE_GONE);
EventLogTags.writeAmUidStopped(uid);
mActiveUids.remove(uid);
noteUidProcessState(uid, ActivityManager.PROCESS_STATE_NONEXISTENT);
}
old.uidRecord = null;
}
mIsolatedProcesses.remove(uid);
return old;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessNameLocked
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
|
removeProcessNameLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentReference getDocumentReferenceWithLocale()
{
if (this.documentReferenceWithLocaleCache == null) {
this.documentReferenceWithLocaleCache = intern(new DocumentReference(this.documentReference, getLocale()));
}
return this.documentReferenceWithLocaleCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocumentReferenceWithLocale
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getDocumentReferenceWithLocale
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendAndReceive(final Consumer<HttpResponse> responseHandler) {
responseHandler.accept(send());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendAndReceive
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
sendAndReceive
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void sCleanup(Object o) {
try {
if(o != null) {
if(o instanceof InputStream) {
((InputStream)o).close();
return;
}
if(o instanceof OutputStream) {
((OutputStream)o).close();
return;
}
}
} catch(Throwable t) {}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sCleanup
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
|
sCleanup
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void delete(File f) {
if (!f.exists()) {
return;
}
File[] subFiles = f.listFiles();
if (subFiles != null) {
for (File sf : subFiles) {
delete(sf);
}
}
if (!f.delete()) {
throw new HazelcastException("Failed to delete " + f);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
delete
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static BackgroundAudioService getInstance() {
return instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getInstance
|
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startAssistantActivity(String callingPackage, int callingPid, int callingUid,
Intent intent, String resolvedType, Bundle bOptions, int userId) {
enforceCallingPermission(BIND_VOICE_INTERACTION, "startAssistantActivity()");
userId = mUserController.handleIncomingUser(callingPid, callingUid, userId, false,
ALLOW_FULL_ONLY, "startAssistantActivity", null);
return mActivityStartController.obtainStarter(intent, "startAssistantActivity")
.setCallingUid(callingUid)
.setCallingPackage(callingPackage)
.setResolvedType(resolvedType)
.setActivityOptions(bOptions)
.setMayWait(userId)
.execute();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAssistantActivity
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
|
startAssistantActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canEditBoolean(Context context, Collection collection) throws SQLException {
return canEditBoolean(context, collection, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canEditBoolean
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
canEditBoolean
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void grantUriPermissionFromOwner(IBinder token, int fromUid, String targetPkg, Uri uri,
final int modeFlags, int sourceUserId, int targetUserId) {
targetUserId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
targetUserId, false, ALLOW_FULL_ONLY, "grantUriPermissionFromOwner", null);
synchronized(this) {
UriPermissionOwner owner = UriPermissionOwner.fromExternalToken(token);
if (owner == null) {
throw new IllegalArgumentException("Unknown owner: " + token);
}
if (fromUid != Binder.getCallingUid()) {
if (Binder.getCallingUid() != Process.myUid()) {
// Only system code can grant URI permissions on behalf
// of other users.
throw new SecurityException("nice try");
}
}
if (targetPkg == null) {
throw new IllegalArgumentException("null target");
}
if (uri == null) {
throw new IllegalArgumentException("null uri");
}
grantUriPermissionLocked(fromUid, targetPkg, new GrantUri(sourceUserId, uri, false),
modeFlags, owner, targetUserId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantUriPermissionFromOwner
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
|
grantUriPermissionFromOwner
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCallback(NotificationSafeToRemoveCallback callback) {
mNotificationLifetimeFinishedCallback = callback;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCallback
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
setCallback
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Map processResponse(Response samlResponse, String target)
throws SAMLException {
List assertions = null;
SAMLServiceManager.SOAPEntry partnerdest = null;
Subject assertionSubject = null;
if (samlResponse.isSigned()) {
// verify the signature
boolean isSignedandValid = verifySignature(samlResponse);
if (!isSignedandValid) {
throw new SAMLException(bundle.getString("invalidResponse"));
}
}
// check Assertion and get back a Map of relevant data including,
// Subject, SOAPEntry for the partner and the List of Assertions.
Map ssMap = verifyAssertionAndGetSSMap(samlResponse);
if (debug.messageEnabled()) {
debug.message("processResponse: ssMap = " + ssMap);
}
if (ssMap == null) {
throw new SAMLException(bundle.getString("invalidAssertion"));
}
assertionSubject = (com.sun.identity.saml.assertion.Subject)
ssMap.get(SAMLConstants.SUBJECT);
if (assertionSubject == null) {
throw new SAMLException(bundle.getString("nullSubject"));
}
partnerdest = (SAMLServiceManager.SOAPEntry)ssMap
.get(SAMLConstants.SOURCE_SITE_SOAP_ENTRY);
if (partnerdest == null) {
throw new SAMLException(bundle.getString("failedAccountMapping"));
}
assertions = (List)ssMap.get(SAMLConstants.POST_ASSERTION);
Map sessMap = null;
try {
sessMap = getAttributeMap(partnerdest, assertions,
assertionSubject, target);
} catch (Exception se) {
debug.error("SAMLUtils.processResponse :" , se);
throw new SAMLException(
bundle.getString("failProcessResponse"));
}
return sessMap;
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2023-37471
- Severity: CRITICAL
- CVSS Score: 9.8
Description: GHSL-2023-143, GHSL-2023-144, deny unsigned SAML response (#624)
Function: processResponse
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
Fixed Code:
public static Map processResponse(Response samlResponse, String target)
throws SAMLException {
List assertions = null;
SAMLServiceManager.SOAPEntry partnerdest = null;
Subject assertionSubject = null;
// verify the signature
boolean isSignedandValid = verifySignature(samlResponse);
if (!isSignedandValid) {
throw new SAMLException(bundle.getString("invalidResponse"));
}
// check Assertion and get back a Map of relevant data including,
// Subject, SOAPEntry for the partner and the List of Assertions.
Map ssMap = verifyAssertionAndGetSSMap(samlResponse);
if (debug.messageEnabled()) {
debug.message("processResponse: ssMap = " + ssMap);
}
if (ssMap == null) {
throw new SAMLException(bundle.getString("invalidAssertion"));
}
assertionSubject = (com.sun.identity.saml.assertion.Subject)
ssMap.get(SAMLConstants.SUBJECT);
if (assertionSubject == null) {
throw new SAMLException(bundle.getString("nullSubject"));
}
partnerdest = (SAMLServiceManager.SOAPEntry)ssMap
.get(SAMLConstants.SOURCE_SITE_SOAP_ENTRY);
if (partnerdest == null) {
throw new SAMLException(bundle.getString("failedAccountMapping"));
}
assertions = (List)ssMap.get(SAMLConstants.POST_ASSERTION);
Map sessMap = null;
try {
sessMap = getAttributeMap(partnerdest, assertions,
assertionSubject, target);
} catch (Exception se) {
debug.error("SAMLUtils.processResponse :" , se);
throw new SAMLException(
bundle.getString("failProcessResponse"));
}
return sessMap;
}
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
processResponse
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
((ComposeActivity) getActivity()).finishSendConfirmDialog(mShowToast, mRecipients);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onClick
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
onClick
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void putShort(byte[] data, int index, short value) {
PlatformDependent0.putShort(data, index, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putShort
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
putShort
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean processMessage(Message message) {
boolean handleStatus = HANDLED;
switch (message.what) {
case CMD_RECONNECT:
case CMD_REASSOCIATE: {
if (mWifiP2pConnection.shouldTemporarilyDisconnectWifi()) {
// Drop a third party reconnect/reassociate if STA is
// temporarily disconnected for p2p
break;
} else {
// ConnectableState handles it
handleStatus = NOT_HANDLED;
}
break;
}
case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
// Got an approval for a TOFU network, trigger a scan to accelerate the
// auto-connection.
logd("User accepted TOFU provided certificate");
mWifiConnectivityManager.forceConnectivityScan(ClientModeImpl.WIFI_WORK_SOURCE);
break;
default: {
handleStatus = NOT_HANDLED;
break;
}
}
if (handleStatus == HANDLED) {
logStateAndMessage(message, this);
}
return handleStatus;
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21242
- Severity: CRITICAL
- CVSS Score: 9.8
Description: [TOFU] Validate full cert chains before displaying dialog
When a full chain including a Root CA is provided by the server,
perform a full validation of the chain before displaying the
TOFU dialog.
If validation passes: Display a TOFU dialog and ask the user if
they trust this network. Saying yes means that the Root can be
installed safely for that network. They might say no - this is
possible if an attacker creates a full chain they control which
results in a different SHA-256 (everything else looks correct).
If they say no, we stop the connection.
If validation fails: Display an error message saying that the
validation failed, we stop the connection and won't display the
TOFU dialog.
Use server certificate pinning for servers that send only a leaf
or a partial chain with no Root CA.
Additionally: clean up the debug logs to reduce the noise and
focus only on the important details.
Bug: 277824547
Test: atest InsecureEapNetworkHandler
Test: Connect to various Enterprise networks
Negative test: Confirm verification fails for invalid chains
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b0ee00ddf38bb677876a6cffb876e6f511e2c139)
Merged-In: I224c80e2787497634d3e68760122dac5f177585a
Change-Id: I224c80e2787497634d3e68760122dac5f177585a
Function: processMessage
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
Fixed Code:
@Override
public boolean processMessage(Message message) {
boolean handleStatus = HANDLED;
switch (message.what) {
case CMD_RECONNECT:
case CMD_REASSOCIATE: {
if (mWifiP2pConnection.shouldTemporarilyDisconnectWifi()) {
// Drop a third party reconnect/reassociate if STA is
// temporarily disconnected for p2p
break;
} else {
// ConnectableState handles it
handleStatus = NOT_HANDLED;
}
break;
}
default: {
handleStatus = NOT_HANDLED;
break;
}
}
if (handleStatus == HANDLED) {
logStateAndMessage(message, this);
}
return handleStatus;
}
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
processMessage
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 1
|
Analyze the following code function for security vulnerabilities
|
private static void getMatchingNodes(Node node, Pattern[] nodePath, int cur, List<Node> res) {
if (cur < 0 || cur >= nodePath.length) return;
boolean last = (cur == nodePath.length-1);
Pattern pattern = nodePath[cur];
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node c = children.item(i);
if (pattern.matcher(c.getNodeName()).matches()) {
if (last) {
res.add(c);
} else {
getMatchingNodes(c, nodePath, cur+1, res);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMatchingNodes
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getMatchingNodes
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pushState(AjaxRequestTarget target) {
PageParameters params = paramsOf(getProject(), state);
CharSequence url = RequestCycle.get().urlFor(ProjectBlobPage.class, params);
pushState(target, url.toString(), state);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushState
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
pushState
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
AlarmManagerInternal getAlarmManagerInternal() {
return LocalServices.getService(AlarmManagerInternal.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAlarmManagerInternal
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
|
getAlarmManagerInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void install(
String displayName, String description, String[] dependencies,
String account, String password, String config) throws URISyntaxException {
String javaHome = System.getProperty("java.home");
String javaBinary = javaHome + "\\bin\\java.exe";
File jar = new File(WindowsService.class.getProtectionDomain().getCodeSource().getLocation().toURI());
String command = javaBinary
+ " -Duser.dir=\"" + jar.getParentFile().getAbsolutePath() + "\""
+ " -jar \"" + jar.getAbsolutePath() + "\""
+ " --service \"" + config + "\"";
StringBuilder dep = new StringBuilder();
if (dependencies != null) {
for (String s : dependencies) {
dep.append(s);
dep.append("\0");
}
}
dep.append("\0");
SERVICE_DESCRIPTION desc = new SERVICE_DESCRIPTION();
desc.lpDescription = description;
SC_HANDLE serviceManager = openServiceControlManager(null, Winsvc.SC_MANAGER_ALL_ACCESS);
if (serviceManager != null) {
SC_HANDLE service = ADVAPI_32.CreateService(serviceManager, serviceName, displayName,
Winsvc.SERVICE_ALL_ACCESS, WinNT.SERVICE_WIN32_OWN_PROCESS, WinNT.SERVICE_AUTO_START,
WinNT.SERVICE_ERROR_NORMAL,
command,
null, null, dep.toString(), account, password);
if (service != null) {
ADVAPI_32.ChangeServiceConfig2(service, Winsvc.SERVICE_CONFIG_DESCRIPTION, desc);
ADVAPI_32.CloseServiceHandle(service);
}
ADVAPI_32.CloseServiceHandle(serviceManager);
}
}
|
Vulnerability Classification:
- CWE: CWE-428
- CVE: CVE-2021-21292
- Severity: LOW
- CVSS Score: 1.9
Description: Quote binary path
Function: install
File: src/main/java/org/traccar/WindowsService.java
Repository: traccar
Fixed Code:
public void install(
String displayName, String description, String[] dependencies,
String account, String password, String config) throws URISyntaxException {
String javaHome = System.getProperty("java.home");
String javaBinary = "\"" + javaHome + "\\bin\\java.exe\"";
File jar = new File(WindowsService.class.getProtectionDomain().getCodeSource().getLocation().toURI());
String command = javaBinary
+ " -Duser.dir=\"" + jar.getParentFile().getAbsolutePath() + "\""
+ " -jar \"" + jar.getAbsolutePath() + "\""
+ " --service \"" + config + "\"";
StringBuilder dep = new StringBuilder();
if (dependencies != null) {
for (String s : dependencies) {
dep.append(s);
dep.append("\0");
}
}
dep.append("\0");
SERVICE_DESCRIPTION desc = new SERVICE_DESCRIPTION();
desc.lpDescription = description;
SC_HANDLE serviceManager = openServiceControlManager(null, Winsvc.SC_MANAGER_ALL_ACCESS);
if (serviceManager != null) {
SC_HANDLE service = ADVAPI_32.CreateService(serviceManager, serviceName, displayName,
Winsvc.SERVICE_ALL_ACCESS, WinNT.SERVICE_WIN32_OWN_PROCESS, WinNT.SERVICE_AUTO_START,
WinNT.SERVICE_ERROR_NORMAL,
command,
null, null, dep.toString(), account, password);
if (service != null) {
ADVAPI_32.ChangeServiceConfig2(service, Winsvc.SERVICE_CONFIG_DESCRIPTION, desc);
ADVAPI_32.CloseServiceHandle(service);
}
ADVAPI_32.CloseServiceHandle(serviceManager);
}
}
|
[
"CWE-428"
] |
CVE-2021-21292
|
LOW
| 1.9
|
traccar
|
install
|
src/main/java/org/traccar/WindowsService.java
|
cc69a9907ac9878db3750aa14ffedb28626455da
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<RunningTaskInfo> getFilteredTasks(int maxNum, @ActivityType int ignoreActivityType,
@WindowingMode int ignoreWindowingMode) {
final int callingUid = Binder.getCallingUid();
ArrayList<RunningTaskInfo> list = new ArrayList<>();
synchronized(this) {
if (DEBUG_ALL) Slog.v(TAG, "getTasks: max=" + maxNum);
final boolean allowed = isGetTasksAllowed("getTasks", Binder.getCallingPid(),
callingUid);
mStackSupervisor.getRunningTasks(maxNum, list, ignoreActivityType,
ignoreWindowingMode, callingUid, allowed);
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilteredTasks
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
|
getFilteredTasks
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isScrollingEnabled(){
return scrollingEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isScrollingEnabled
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
|
isScrollingEnabled
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private String lockScreenShownToString() {
switch (mLockScreenShown) {
case LOCK_SCREEN_HIDDEN: return "LOCK_SCREEN_HIDDEN";
case LOCK_SCREEN_LEAVING: return "LOCK_SCREEN_LEAVING";
case LOCK_SCREEN_SHOWN: return "LOCK_SCREEN_SHOWN";
default: return "Unknown=" + mLockScreenShown;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lockScreenShownToString
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
|
lockScreenShownToString
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresApi(api = 29)
private boolean checkBackgroundLocationPermission() {
if (!AndroidNativeUtil.checkForPermission("android.permission.ACCESS_BACKGROUND_LOCATION", "This is required to get the location")) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkBackgroundLocationPermission
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
checkBackgroundLocationPermission
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@PasswordComplexity
public int getAggregatedPasswordComplexityForUser(int userId) {
return getAggregatedPasswordComplexityForUser(userId, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAggregatedPasswordComplexityForUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getAggregatedPasswordComplexityForUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private FilterChainBuilder createSpdyFilterChain(final FilterChainBuilder fcb, final boolean npnEnabled) {
FilterChainBuilder spdyFcb = FilterChainBuilder.stateless();
spdyFcb.addAll(fcb);
int idx = spdyFcb.indexOfType(SSLFilter.class);
Filter f = spdyFcb.get(idx);
// Adjust the SSLFilter to support NPN
if (npnEnabled) {
SSLBaseFilter sslBaseFilter = (SSLBaseFilter) f;
NextProtoNegSupport.getInstance().configure(sslBaseFilter);
}
// Remove the HTTP Client filter - this will be replaced by the
// SPDY framing and handler filters.
idx = spdyFcb.indexOfType(HttpClientFilter.class);
spdyFcb.set(idx, new SpdyFramingFilter());
final SpdyMode spdyMode = ((npnEnabled) ? SpdyMode.NPN : SpdyMode.PLAIN);
AsyncSpdyClientEventFilter spdyFilter = new AsyncSpdyClientEventFilter(new EventHandler(clientConfig), spdyMode,
clientConfig.executorService());
spdyFilter.setInitialWindowSize(clientConfig.getSpdyInitialWindowSize());
spdyFilter.setMaxConcurrentStreams(clientConfig.getSpdyMaxConcurrentStreams());
spdyFcb.add(idx + 1, spdyFilter);
// Remove the WebSocket filter - not currently supported.
idx = spdyFcb.indexOfType(WebSocketClientFilter.class);
spdyFcb.remove(idx);
return spdyFcb;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createSpdyFilterChain
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
createSpdyFilterChain
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
void dump(PrintWriter pw, String prefix, DumpFilter filter) {
if (filter != null && !filter.matches(pkg)) return;
pw.println(prefix + this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
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
|
dump
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeDetachListener(Command detachListener) {
assert detachListener != null;
detachListeners.remove(detachListener);
if (detachListeners.isEmpty()) {
detachListeners = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDetachListener
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
removeDetachListener
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean startViewCalendarEventInManagedProfile(String packageName, long eventId,
long start, long end, boolean allDay, int flags) {
if (!mHasFeature) {
return false;
}
Preconditions.checkStringNotEmpty(packageName, "Package name is empty");
final CallerIdentity caller = getCallerIdentity();
if (!isCallingFromPackage(packageName, caller.getUid())) {
throw new SecurityException("Input package name doesn't align with actual "
+ "calling package.");
}
return mInjector.binderWithCleanCallingIdentity(() -> {
final int workProfileUserId = getManagedUserId(caller.getUserId());
if (workProfileUserId < 0) {
return false;
}
if (!isPackageAllowedToAccessCalendarForUser(packageName, workProfileUserId)) {
Slogf.d(LOG_TAG, "Package %s is not allowed to access cross-profile calendar APIs",
packageName);
return false;
}
final Intent intent = new Intent(
CalendarContract.ACTION_VIEW_MANAGED_PROFILE_CALENDAR_EVENT);
intent.setPackage(packageName);
intent.putExtra(CalendarContract.EXTRA_EVENT_ID, eventId);
intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, start);
intent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, end);
intent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, allDay);
intent.setFlags(flags);
try {
mContext.startActivityAsUser(intent, UserHandle.of(workProfileUserId));
} catch (ActivityNotFoundException e) {
Slogf.e(LOG_TAG, "View event activity not found", e);
return false;
}
return true;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startViewCalendarEventInManagedProfile
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
|
startViewCalendarEventInManagedProfile
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private native boolean nativeIsIncognito(long nativeContentViewCoreImpl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeIsIncognito
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeIsIncognito
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setRefreshListeners(Collection<CredentialRefreshListener> refreshListeners) {
this.refreshListeners = Preconditions.checkNotNull(refreshListeners);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRefreshListeners
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
setRefreshListeners
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateBytes(
String columnName, byte @Nullable [] x) throws SQLException {
updateBytes(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBytes
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateBytes
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isTrackingBlocked() {
return mConflictingQsExpansionGesture && mQsExpanded;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTrackingBlocked
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
|
isTrackingBlocked
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String unescapeStringForXML(String s) {
StringBuilder result = new StringBuilder();
Matcher m = xmlEscapingPattern.matcher(s);
int end = 0;
while (m.find()) {
int start = m.start();
result.append(s, end, start);
end = m.end();
result.append(translate(s.substring(start, end)));
}
result.append(s, end, s.length());
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unescapeStringForXML
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
unescapeStringForXML
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void execute(Runnable command) {
internal.runOnContext(new Handler<Void>() {
@Override
public void handle(Void unused) {
command.run();
}
});
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2022-0981
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Use the correct context for RR
Function: execute
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
Fixed Code:
@Override
public void execute(Runnable command) {
current.runOnContext(new Handler<Void>() {
@Override
public void handle(Void unused) {
command.run();
}
});
}
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
execute
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 1
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_SUPPORT_MESSAGE, conditional = true)
public void setShortSupportMessage(@Nullable ComponentName admin,
@Nullable CharSequence message) {
throwIfParentInstance("setShortSupportMessage");
if (mService != null) {
try {
mService.setShortSupportMessage(admin, mContext.getPackageName(), message);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShortSupportMessage
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
|
setShortSupportMessage
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onViewCreated(@NonNull final View view, final Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
registerForContextMenu(getListView());
getListView().setFastScrollEnabled(true);
getListView().setDivider(null);
getListView().setDividerHeight(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onViewCreated
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onViewCreated
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private IBillingSupport getBillingSupport() {
if (billingSupport == null) {
billingSupport = createBillingSupport();
}
return billingSupport;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBillingSupport
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getBillingSupport
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean matches(String index, String action) {
return matcher.test(index) && perms.test(action);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: matches
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
matches
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public ProducerBrokerExchange getProducerBrokerExchangeIfExists(ProducerInfo producerInfo){
ProducerBrokerExchange result = null;
if (producerInfo != null && producerInfo.getProducerId() != null){
synchronized (producerExchanges){
result = producerExchanges.get(producerInfo.getProducerId());
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProducerBrokerExchangeIfExists
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
getProducerBrokerExchangeIfExists
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
void getTapExcludeRegion(Region outRegion) {
mTmpRect.set(mWindowFrames.mFrame);
mTmpRect.offsetTo(0, 0);
outRegion.set(mTapExcludeRegion);
outRegion.op(mTmpRect, Region.Op.INTERSECT);
// The region is on the window coordinates, so it needs to be translated into screen
// coordinates. There's no need to scale since that will be done by native code.
outRegion.translate(mWindowFrames.mFrame.left, mWindowFrames.mFrame.top);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTapExcludeRegion
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
|
getTapExcludeRegion
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean hasAnyCalls() {
return !mCalls.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAnyCalls
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
hasAnyCalls
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Organization getOrganization() {
return SecurityServiceSpringImpl.organization.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganization
File: modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2020-5206
|
MEDIUM
| 6.4
|
opencast
|
getOrganization
|
modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
|
b157e1fb3b35991ca7bf59f0730329fbe7ce82e8
| 0
|
Analyze the following code function for security vulnerabilities
|
final void showAskCompatModeDialogLocked(ActivityRecord r) {
Message msg = Message.obtain();
msg.what = SHOW_COMPAT_MODE_DIALOG_UI_MSG;
msg.obj = r.getTask().askedCompatMode ? null : r;
mUiHandler.sendMessage(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showAskCompatModeDialogLocked
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
|
showAskCompatModeDialogLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputSource resolveEntity(String publicId, String systemId) throws IOException {
// lookup the system id caches first
byte[] content;
systemId = translateLegacySystemId(systemId);
content = m_cachePermanent.get(systemId);
if (content != null) {
// permanent cache contains system id
return createInputSource(content, systemId);
} else if (systemId.equals(CmsXmlPage.XMLPAGE_XSD_SYSTEM_ID)) {
// XML page XSD reference
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(XMLPAGE_XSD_LOCATION)) {
content = CmsFileUtil.readFully(stream);
// cache the XML page DTD
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(
Messages.get().getBundle().key(Messages.LOG_XMLPAGE_XSD_NOT_FOUND_1, XMLPAGE_XSD_LOCATION),
t);
}
} else if (systemId.equals(XMLPAGE_OLD_DTD_SYSTEM_ID_1) || systemId.endsWith(XMLPAGE_OLD_DTD_SYSTEM_ID_2)) {
// XML page DTD reference
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(XMLPAGE_OLD_DTD_LOCATION)) {
// cache the XML page DTD
content = CmsFileUtil.readFully(stream);
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(
Messages.get().getBundle().key(Messages.LOG_XMLPAGE_DTD_NOT_FOUND_1, XMLPAGE_OLD_DTD_LOCATION),
t);
}
} else if ((m_cms != null) && systemId.startsWith(OPENCMS_SCHEME)) {
// opencms:// VFS reference
String cacheSystemId = systemId.substring(OPENCMS_SCHEME.length() - 1);
String cacheKey = getCacheKey(
cacheSystemId,
m_cms.getRequestContext().getCurrentProject().isOnlineProject());
// look up temporary cache
content = m_cacheTemporary.get(cacheKey);
if (content != null) {
return createInputSource(content, systemId);
}
String storedSiteRoot = m_cms.getRequestContext().getSiteRoot();
try {
// content not cached, read from VFS
m_cms.getRequestContext().setSiteRoot("/");
CmsFile file = m_cms.readFile(cacheSystemId, CmsResourceFilter.IGNORE_EXPIRATION);
content = file.getContents();
// store content in cache
m_cacheTemporary.put(cacheKey, content);
if (LOG.isDebugEnabled()) {
LOG.debug(Messages.get().getBundle().key(Messages.LOG_ERR_CACHED_SYS_ID_1, cacheKey));
}
return createInputSource(content, systemId);
} catch (CmsException e) {
throw new IOException(
Messages.get().getBundle().key(Messages.LOG_ENTITY_RESOLVE_FAILED_1, systemId),
e);
} finally {
m_cms.getRequestContext().setSiteRoot(storedSiteRoot);
}
} else if (systemId.startsWith(INTERNAL_SCHEME)) {
String location = systemId.substring(INTERNAL_SCHEME.length());
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(location)) {
content = CmsFileUtil.readFully(stream);
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(t.getLocalizedMessage(), t);
}
} else if (systemId.substring(0, systemId.lastIndexOf("/") + 1).equalsIgnoreCase(
CmsConfigurationManager.DEFAULT_DTD_PREFIX)) {
// default DTD location in the org.opencms.configuration package
String location = null;
try {
String dtdFilename = systemId.substring(systemId.lastIndexOf("/") + 1);
location = CmsConfigurationManager.DEFAULT_DTD_LOCATION + dtdFilename;
InputStream stream = getClass().getClassLoader().getResourceAsStream(location);
content = CmsFileUtil.readFully(stream);
// cache the DTD
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(Messages.get().getBundle().key(Messages.LOG_DTD_NOT_FOUND_1, location), t);
}
}
// use the default behaviour (i.e. resolve through external URL)
return null;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-3312
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Fixed XXE issue in SVG processing (github issue #725).
Function: resolveEntity
File: src/org/opencms/xml/CmsXmlEntityResolver.java
Repository: alkacon/opencms-core
Fixed Code:
public InputSource resolveEntity(String publicId, String systemId) throws IOException {
// lookup the system id caches first
byte[] content;
systemId = translateLegacySystemId(systemId);
content = m_cachePermanent.get(systemId);
if (content != null) {
// permanent cache contains system id
return createInputSource(content, systemId);
} else if (systemId.equals(CmsXmlPage.XMLPAGE_XSD_SYSTEM_ID)) {
// XML page XSD reference
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(XMLPAGE_XSD_LOCATION)) {
content = CmsFileUtil.readFully(stream);
// cache the XML page DTD
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(
Messages.get().getBundle().key(Messages.LOG_XMLPAGE_XSD_NOT_FOUND_1, XMLPAGE_XSD_LOCATION),
t);
}
} else if (systemId.equals(XMLPAGE_OLD_DTD_SYSTEM_ID_1) || systemId.endsWith(XMLPAGE_OLD_DTD_SYSTEM_ID_2)) {
// XML page DTD reference
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(XMLPAGE_OLD_DTD_LOCATION)) {
// cache the XML page DTD
content = CmsFileUtil.readFully(stream);
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(
Messages.get().getBundle().key(Messages.LOG_XMLPAGE_DTD_NOT_FOUND_1, XMLPAGE_OLD_DTD_LOCATION),
t);
}
} else if ((m_cms != null) && systemId.startsWith(OPENCMS_SCHEME)) {
// opencms:// VFS reference
String cacheSystemId = systemId.substring(OPENCMS_SCHEME.length() - 1);
String cacheKey = getCacheKey(
cacheSystemId,
m_cms.getRequestContext().getCurrentProject().isOnlineProject());
// look up temporary cache
content = m_cacheTemporary.get(cacheKey);
if (content != null) {
return createInputSource(content, systemId);
}
String storedSiteRoot = m_cms.getRequestContext().getSiteRoot();
try {
// content not cached, read from VFS
m_cms.getRequestContext().setSiteRoot("/");
CmsFile file = m_cms.readFile(cacheSystemId, CmsResourceFilter.IGNORE_EXPIRATION);
content = file.getContents();
// store content in cache
m_cacheTemporary.put(cacheKey, content);
if (LOG.isDebugEnabled()) {
LOG.debug(Messages.get().getBundle().key(Messages.LOG_ERR_CACHED_SYS_ID_1, cacheKey));
}
return createInputSource(content, systemId);
} catch (CmsException e) {
throw new IOException(
Messages.get().getBundle().key(Messages.LOG_ENTITY_RESOLVE_FAILED_1, systemId),
e);
} finally {
m_cms.getRequestContext().setSiteRoot(storedSiteRoot);
}
} else if (systemId.startsWith(INTERNAL_SCHEME)) {
String location = systemId.substring(INTERNAL_SCHEME.length());
try (InputStream stream = getClass().getClassLoader().getResourceAsStream(location)) {
content = CmsFileUtil.readFully(stream);
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(t.getLocalizedMessage(), t);
}
} else if (systemId.substring(0, systemId.lastIndexOf("/") + 1).equalsIgnoreCase(
CmsConfigurationManager.DEFAULT_DTD_PREFIX)//
) {
// default DTD location in the org.opencms.configuration package
String location = null;
try {
String dtdFilename = systemId.substring(systemId.lastIndexOf("/") + 1);
location = CmsConfigurationManager.DEFAULT_DTD_LOCATION + dtdFilename;
InputStream stream = getClass().getClassLoader().getResourceAsStream(location);
content = CmsFileUtil.readFully(stream);
// cache the DTD
m_cachePermanent.put(systemId, content);
return createInputSource(content, systemId);
} catch (Throwable t) {
LOG.error(Messages.get().getBundle().key(Messages.LOG_DTD_NOT_FOUND_1, location), t);
}
}
LOG.error("Entity reference not allowed: " + systemId, new IOException());
throw new IOException("Entity reference not allowed (see log for details)");
}
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
resolveEntity
|
src/org/opencms/xml/CmsXmlEntityResolver.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void setServerKexData(byte[] data) {
ValidateUtils.checkNotNullAndNotEmpty(data, "No server KEX seed");
synchronized (kexState) {
serverKexData = data.clone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerKexData
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
setServerKexData
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMessage() {
return message.getExpressionString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
void unbindServiceIfNeededLocked() {
if (mServiceBound) {
Log.d(TAG, "Unbinding from service " + mServiceName);
mContext.unbindService(mConnection);
mServiceBound = false;
mService = null;
mServiceName = null;
mServiceUserId = -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindServiceIfNeededLocked
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
unbindServiceIfNeededLocked
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Future<StompServer> listen() {
Promise<StompServer> promise = Promise.promise();
listen(promise);
return promise.future();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listen
File: src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
Repository: vert-x3/vertx-stomp
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-32081
|
MEDIUM
| 6.5
|
vert-x3/vertx-stomp
|
listen
|
src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
|
0de4bc5a44ddb57e74d92c445f16456fa03f265b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<JobPropertyDescriptor> getJobPropertyDescriptors(Class<? extends Job> clazz) {
return JobPropertyDescriptor.getPropertyDescriptors(clazz);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJobPropertyDescriptors
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
|
getJobPropertyDescriptors
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void takePersistableUriPermission(Uri uri, final int modeFlags,
@Nullable String toPackage, int userId) {
final int uid;
if (toPackage != null) {
enforceCallingPermission(android.Manifest.permission.FORCE_PERSISTABLE_URI_PERMISSIONS,
"takePersistableUriPermission");
uid = mPackageManagerInt.getPackageUid(toPackage, 0, userId);
} else {
enforceNotIsolatedCaller("takePersistableUriPermission");
uid = Binder.getCallingUid();
}
Preconditions.checkFlagsArgument(modeFlags,
Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
synchronized (this) {
boolean persistChanged = false;
GrantUri grantUri = new GrantUri(userId, uri, false);
UriPermission exactPerm = findUriPermissionLocked(uid, grantUri);
UriPermission prefixPerm = findUriPermissionLocked(uid,
new GrantUri(userId, uri, true));
final boolean exactValid = (exactPerm != null)
&& ((modeFlags & exactPerm.persistableModeFlags) == modeFlags);
final boolean prefixValid = (prefixPerm != null)
&& ((modeFlags & prefixPerm.persistableModeFlags) == modeFlags);
if (!(exactValid || prefixValid)) {
throw new SecurityException("No persistable permission grants found for UID "
+ uid + " and Uri " + grantUri.toSafeString());
}
if (exactValid) {
persistChanged |= exactPerm.takePersistableModes(modeFlags);
}
if (prefixValid) {
persistChanged |= prefixPerm.takePersistableModes(modeFlags);
}
persistChanged |= maybePrunePersistedUriGrantsLocked(uid);
if (persistChanged) {
schedulePersistUriGrants();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: takePersistableUriPermission
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
|
takePersistableUriPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean verify(String token) {
JWTVerifier verifier = JWT.require(Algorithm.HMAC256(SECRET))
.withIssuer(ISSUER)
.build();
try {
verifier.verify(token);
return true;
} catch (JWTVerificationException e) {
log.warn("verify jwt token failed " + e.getMessage());
return false;
}
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2022-24861
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fix some security bug (#103)
* fix: use hard-code secret
* feat: add driver class validate
* feat: optimize drvier resource code
* fix:ut failed
Function: verify
File: core/src/main/java/com/databasir/core/infrastructure/jwt/JwtTokens.java
Repository: vran-dev/databasir
Fixed Code:
public boolean verify(String token) {
JWTVerifier verifier = JWT.require(Algorithm.HMAC256(tokenSecret))
.withIssuer(ISSUER)
.build();
try {
verifier.verify(token);
return true;
} catch (JWTVerificationException e) {
log.warn("verify jwt token failed " + e.getMessage());
return false;
}
}
|
[
"CWE-20"
] |
CVE-2022-24861
|
MEDIUM
| 6.5
|
vran-dev/databasir
|
verify
|
core/src/main/java/com/databasir/core/infrastructure/jwt/JwtTokens.java
|
ca22a8fef7a31c0235b0b2951260a7819b89993b
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate() {
super.onCreate();
AndroidInjection.inject(this);
Log_OC.d(TAG, "Creating service");
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
HandlerThread thread = new HandlerThread("FileDownloaderThread", Process.THREAD_PRIORITY_BACKGROUND);
thread.start();
mServiceLooper = thread.getLooper();
mServiceHandler = new ServiceHandler(mServiceLooper, this);
mBinder = new FileDownloaderBinder();
NotificationCompat.Builder builder = new NotificationCompat.Builder(this).setContentTitle(
getApplicationContext().getResources().getString(R.string.app_name))
.setContentText(getApplicationContext().getResources().getString(R.string.foreground_service_download))
.setSmallIcon(R.drawable.notification_icon)
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.notification_icon))
.setColor(ThemeColorUtils.primaryColor(getApplicationContext(), true));
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
builder.setChannelId(NotificationUtils.NOTIFICATION_CHANNEL_DOWNLOAD);
}
mNotification = builder.build();
// add AccountsUpdatedListener
AccountManager am = AccountManager.get(getApplicationContext());
am.addOnAccountsUpdatedListener(this, null, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
onCreate
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean successfullyRetrievedAudioFocus() {
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
int result = audioManager.requestAudioFocus(this,
AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
return result == AudioManager.AUDIOFOCUS_GAIN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: successfullyRetrievedAudioFocus
File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
successfullyRetrievedAudioFocus
|
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return "LineCursor{" + uri + ":" + lineNumber + ":line=" + line + ", failure=" + failure + "}";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
Repository: crate
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-24565
|
MEDIUM
| 6.5
|
crate
|
toString
|
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
|
4e857d675683095945dd524d6ba03e692c70ecd6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasField(Descriptors.FieldDescriptor field) {
return extensions.hasField(field);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasField
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-3509
|
HIGH
| 7.5
|
protocolbuffers/protobuf
|
hasField
|
java/core/src/main/java/com/google/protobuf/MessageReflection.java
|
a3888f53317a8018e7a439bac4abeb8f3425d5e9
| 0
|
Analyze the following code function for security vulnerabilities
|
void detach() {
removeComponentIfPresent();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detach
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
detach
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition delete(final String path,
final Route.ZeroArgHandler handler) {
return appendDefinition(DELETE, path, handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
delete
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
List<Object> values = entry.getValue();
List<String> headers = new ArrayList<String>();
for (Object o : values) {
headers.add(String.valueOf(o));
}
responseHeaders.put(entry.getKey(), headers);
}
return responseHeaders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildResponseHeaders
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
|
buildResponseHeaders
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, String> mergeWorkflowConfiguration(Map<String, String> properties, String mediaPackageId) {
if (isBlank(mediaPackageId) || schedulerService == null)
return properties;
HashMap<String, String> mergedProperties = new HashMap<>();
try {
Map<String, String> recordingProperties = schedulerService.getCaptureAgentConfiguration(mediaPackageId);
logger.debug("Restoring workflow properties from scheduler event {}", mediaPackageId);
mergedProperties.putAll(recordingProperties);
} catch (SchedulerException e) {
logger.warn("Unable to get workflow properties from scheduler event {}", mediaPackageId, e);
} catch (NotFoundException e) {
logger.info("No capture event found for id {}", mediaPackageId);
} catch (UnauthorizedException e) {
throw new IllegalStateException(e);
}
if (properties != null) {
// Merge the properties, this must be after adding the recording properties
logger.debug("Merge workflow properties with the one from the scheduler event {}", mediaPackageId);
mergedProperties.putAll(properties);
}
return mergedProperties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mergeWorkflowConfiguration
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
mergeWorkflowConfiguration
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public FilePath[] getModuleRoots() {
AbstractBuild b = getBuildForDeprecatedMethods();
return b != null ? b.getModuleRoots() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleRoots
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getModuleRoots
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getMissingMessageString(String messageId) {
String caller = "";
StackTraceElement callerElement = getCallingMethod();
if (callerElement != null) {
caller = " called by " + callerElement;
}
if (messageId == null) {
messageId = "null";
}
String message = "*** ERROR: Message with id: [" + messageId +
"] not found.***" + caller;
log.error(message);
boolean exceptionMode = Config.get().getBoolean(
"java.l10n_missingmessage_exceptions");
if (exceptionMode) {
throw new IllegalArgumentException(message);
}
return "**" + messageId + "**";
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2016-3079
- Severity: MEDIUM
- CVSS Score: 4.3
Description: 1320444 - Bad bean-message ids and navbar-vars can lead to XSS issues
Fixed generally in LocalizationService and DialognavRenderer, removed
some attempts at fixing specific locations.
Function: getMissingMessageString
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
Fixed Code:
private String getMissingMessageString(String messageId) {
String caller = "";
StackTraceElement callerElement = getCallingMethod();
if (callerElement != null) {
caller = " called by " + callerElement;
}
if (messageId == null) {
messageId = "null";
}
String message = "*** ERROR: Message with id: [" + messageId +
"] not found.***" + caller;
log.error(message);
boolean exceptionMode = Config.get().getBoolean(
"java.l10n_missingmessage_exceptions");
if (exceptionMode) {
throw new IllegalArgumentException(message);
}
return StringEscapeUtils.escapeHtml("**" + messageId + "**");
}
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getMissingMessageString
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPlaybackSpeed(String packageName,
float speed) {
mSessionCb.setPlaybackSpeed(packageName, Binder.getCallingPid(), Binder.getCallingUid(),
speed);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPlaybackSpeed
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
setPlaybackSpeed
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
AccessControlList getAccessControlList(String mediaPackageId) throws NotFoundException,
SearchServiceDatabaseException;
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2021-21318
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Fix Engage Series Publication and Access
Access to series and series metadata on the search service (shown in
media module and player) depends on the events published which are part
of the series. Publishing an event will automatically publish a series
and update access to it. Removing an event or republishing the event
should do the same.
Incorrectly Hiding Public Series
--------------------------------
This patch fixes the access control update to the series when a new
episode is being published. Until now, a new episode publication would
always update the series access with the episode access.
While this is no security issue since it can only cause the access to be
stricter, it may cause public series to become private. This would
happen, for example, if a users sets one episode of a series to private
and republishes the episode.
Now, the search service will merge the access control lists of all
episodes to grant access based on their combined access rules.
Update Series on Removal
------------------------
This patch fixes Opencast not updating the series access or remove a
published series if an event is being removed.
This means that access to a series is re-calculated when an episode is
being deleted based on the remaining published episodes in the series.
For example, removing the last episode with public access will now make
the series private which it would have stayed public before.
It also means that if the last episode of a series is being removed, the
series itself will be unpublished as well, so no empty series will
continue to show up any longer.
Function: getAccessControlList
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
Repository: opencast
Fixed Code:
AccessControlList getAccessControlList(String mediaPackageId) throws NotFoundException,
SearchServiceDatabaseException;
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
getAccessControlList
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 1
|
Analyze the following code function for security vulnerabilities
|
private AMQCommand privateRpc(Method m, int timeout)
throws IOException, ShutdownSignalException, TimeoutException {
SimpleBlockingRpcContinuation k = new SimpleBlockingRpcContinuation(m);
rpc(m, k);
try {
return k.getReply(timeout);
} catch (TimeoutException e) {
cleanRpcChannelState();
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: privateRpc
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
privateRpc
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void adjustVolume(String packageName, String opPackageName, int direction,
int flags) {
int pid = Binder.getCallingPid();
int uid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
MediaSessionRecord.this.adjustVolume(packageName, opPackageName, pid, uid,
false, direction, flags, false /* useSuggested */);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustVolume
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
adjustVolume
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String filterUrlsByTransport(List<String> urlsList, List<String> transportList, String transportName) {
String endpointUrl = "";
if (transportList.contains(transportName)) {
for (String env : urlsList){
if (env.startsWith(transportName + ":")) {
endpointUrl = env;
}
}
}
return endpointUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterUrlsByTransport
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
filterUrlsByTransport
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(AtomicReferenceConfig c1, AtomicReferenceConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.getQuorumName(), c2.getQuorumName())
&& ConfigCompatibilityChecker.isCompatible(c1.getMergePolicyConfig(), c2.getMergePolicyConfig());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private ServiceProvider unmarshalSP(SpFileContent spFileContent, String tenantDomain)
throws IdentityApplicationManagementException {
if (StringUtils.isEmpty(spFileContent.getContent())) {
throw new IdentityApplicationManagementException(String.format("Empty Service Provider configuration file" +
" %s uploaded by tenant: %s", spFileContent.getFileName(), tenantDomain));
}
try {
JAXBContext jaxbContext = JAXBContext.newInstance(ServiceProvider.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return (ServiceProvider) unmarshaller.unmarshal(new ByteArrayInputStream(
spFileContent.getContent().getBytes(StandardCharsets.UTF_8)));
} catch (JAXBException e) {
throw new IdentityApplicationManagementException(String.format("Error in reading Service Provider " +
"configuration file %s uploaded by tenant: %s", spFileContent.getFileName(), tenantDomain), e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-42646
- Severity: MEDIUM
- CVSS Score: 6.4
Description: Create secure parser for unmarshalling SP file content
Function: unmarshalSP
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
Fixed Code:
private ServiceProvider unmarshalSP(SpFileContent spFileContent, String tenantDomain)
throws IdentityApplicationManagementException {
if (StringUtils.isEmpty(spFileContent.getContent())) {
throw new IdentityApplicationManagementException(String.format("Empty Service Provider configuration file" +
" %s uploaded by tenant: %s", spFileContent.getFileName(), tenantDomain));
}
try {
//Creating secure parser by disabling XXE
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
spf.setXIncludeAware(false);
try {
spf.setFeature(Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE, false);
spf.setFeature(Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE, false);
spf.setFeature(Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE, false);
spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
} catch (SAXException | ParserConfigurationException e) {
log.error("Failed to load XML Processor Feature " + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE + " or "
+ Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE + " or " + Constants.LOAD_EXTERNAL_DTD_FEATURE
+ " or secure-processing.");
}
//Creating source object using the secure parser
Source xmlSource = new SAXSource(spf.newSAXParser().getXMLReader(),
new InputSource(new StringReader(spFileContent.getContent())));
//Performing unmarshall operation by passing the generated source object to the unmarshaller
JAXBContext jaxbContext = JAXBContext.newInstance(ServiceProvider.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return (ServiceProvider) unmarshaller.unmarshal(xmlSource);
} catch (JAXBException | SAXException | ParserConfigurationException e) {
throw new IdentityApplicationManagementException(String.format("Error in reading Service Provider " +
"configuration file %s uploaded by tenant: %s", spFileContent.getFileName(), tenantDomain), e);
}
}
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
unmarshalSP
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void requestBindListener(ComponentName component) {
checkCallerIsSystemOrSameApp(component.getPackageName());
long identity = Binder.clearCallingIdentity();
try {
ManagedServices manager =
mRankerServices.isComponentEnabledForCurrentProfiles(component)
? mRankerServices
: mListeners;
manager.setComponentState(component, true);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestBindListener
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
|
requestBindListener
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isViewServerRunning() {
if (isSystemSecure()) {
return false;
}
if (!checkCallingPermission(Manifest.permission.DUMP, "isViewServerRunning")) {
return false;
}
return mViewServer != null && mViewServer.isRunning();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isViewServerRunning
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
|
isViewServerRunning
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(DurableExecutorConfig c1, DurableExecutorConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.getPoolSize(), c2.getPoolSize())
&& nullSafeEqual(c1.getDurability(), c2.getDurability())
&& nullSafeEqual(c1.getQuorumName(), c2.getQuorumName())
&& nullSafeEqual(c1.getCapacity(), c2.getCapacity());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFileProtocols(final String[] fileProtocols) {
this.fileProtocols = fileProtocols;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFileProtocols
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
setFileProtocols
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getUploadFinishMessage() {
return FileUploader.class.getName() + UPLOAD_FINISH_MESSAGE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUploadFinishMessage
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
getUploadFinishMessage
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getTag() {
return TAG + "[" + (mInterfaceName == null ? "unknown" : mInterfaceName) + "]";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTag
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getTag
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<CharacterDataChangeListener> safeGetCharacterDataListeners() {
synchronized (listeners_lock_) {
if (characterDataListeners_ == null) {
return null;
}
if (characterDataListenersList_ == null) {
characterDataListenersList_ = new ArrayList<>(characterDataListeners_);
}
return characterDataListenersList_;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: safeGetCharacterDataListeners
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
safeGetCharacterDataListeners
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unstableProviderDied(IBinder connection) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unstableProviderDied
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unstableProviderDied
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isThisCallbackActive() {
return mNetworkAgent != null && mNetworkAgent.getCallback() == this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isThisCallbackActive
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
isThisCallbackActive
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldCommit(int length, int size)
{
// If the length is above the configured maximum
if (length >= this.configuration.getIndexerBatchMaxLengh()) {
return true;
}
// If the size is above the configured maximum
return size >= this.configuration.getIndexerBatchSize();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldCommit
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
shouldCommit
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDevModeRequest(HttpServletRequest request) {
String pathInfo = request.getPathInfo();
if (pathInfo != null
&& (pathInfo.startsWith("/" + VAADIN_MAPPING)
|| APP_THEME_PATTERN.matcher(pathInfo).find())
&& !pathInfo.startsWith(
"/" + StreamRequestHandler.DYN_RES_PREFIX)) {
return true;
}
return manifestPaths.contains(pathInfo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDevModeRequest
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
isDevModeRequest
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void appendExplicitSpaceAndComponent(StringBuilder breadcrumb) {
if (getDomainName() != null) {
breadcrumb.append(getDomainName());
}
if (getComponentName() != null) {
if (getDomainName() != null) {
breadcrumb.append(CONNECTOR);
}
if (getComponentLink() != null) {
a href = new a(getComponentLink());
href.addElement(getComponentName());
breadcrumb.append(href.toString());
} else {
breadcrumb.append(getComponentName());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendExplicitSpaceAndComponent
File: core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
appendExplicitSpaceAndComponent
|
core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindService(Intent intent, ServiceConnection connection,
UserHandle userHandle) {
final long token = Binder.clearCallingIdentity();
try {
mContext.bindServiceAsUser(intent, connection, Context.BIND_AUTO_CREATE,
userHandle);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindService
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
|
bindService
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static void write(byte[] from, File to) throws IOException {
asByteSink(to).write(from);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: 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
|
write
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.