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 MediaPackage addTrack(URI uri, MediaPackageElementFlavor flavor, MediaPackage mediaPackage)
throws IOException, IngestException {
String[] tags = null;
return this.addTrack(uri, flavor, tags, mediaPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTrack
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
addTrack
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
void fadeOutMenu() {
mMenuContainer.setAlpha(0f);
mSettingsButton.setAlpha(0f);
mDismissButton.setAlpha(0f);
mEnterSplitButton.setAlpha(0f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fadeOutMenu
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
fadeOutMenu
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isContentDirty()
{
return this.isContentDirty;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isContentDirty
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
|
isContentDirty
|
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 boolean hasCustomScmCheckoutRetryCount(){
return scmCheckoutRetryCount != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCustomScmCheckoutRetryCount
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
|
hasCustomScmCheckoutRetryCount
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isOnlyCoreApps() {
return mOnlyCore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOnlyCoreApps
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
|
isOnlyCoreApps
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasPgp() {
return xmppConnectionService.getPgpEngine() != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasPgp
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
hasPgp
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetVerticalPanelPosition() {
setVerticalPanelTranslation(0f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetVerticalPanelPosition
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
|
resetVerticalPanelPosition
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean minimizeApplication() {
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startMain.putExtra("WaitForResult", Boolean.FALSE);
getContext().startActivity(startMain);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: minimizeApplication
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
|
minimizeApplication
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public int size() {
if(accumulator != null) {
return accumulator.size() + NON_BODY_SIZE;
} else {
return payload.length + NON_BODY_SIZE;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
size
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stopProfilerLocked(ProcessRecord proc, int profileType) {
if (proc == null || proc == mProfileProc) {
proc = mProfileProc;
profileType = mProfileType;
clearProfilerLocked();
}
if (proc == null) {
return;
}
try {
proc.thread.profilerControl(false, null, profileType);
} catch (RemoteException e) {
throw new IllegalStateException("Process disappeared");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopProfilerLocked
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
|
stopProfilerLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long[] getProcessPss(int[] pids) {
enforceNotIsolatedCaller("getProcessPss");
long[] pss = new long[pids.length];
for (int i=pids.length-1; i>=0; i--) {
ProcessRecord proc;
int oomAdj;
synchronized (this) {
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(pids[i]);
oomAdj = proc != null ? proc.setAdj : 0;
}
}
long[] tmpUss = new long[3];
long startTime = SystemClock.currentThreadTimeMillis();
pss[i] = Debug.getPss(pids[i], tmpUss, null);
long endTime = SystemClock.currentThreadTimeMillis();
if (proc != null) {
synchronized (this) {
if (proc.thread != null && proc.setAdj == oomAdj) {
// Record this for posterity if the process has been stable.
proc.baseProcessTracker.addPss(pss[i], tmpUss[0], tmpUss[2], false,
ProcessStats.ADD_PSS_EXTERNAL, endTime-startTime, proc.pkgList);
}
}
}
}
return pss;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessPss
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
|
getProcessPss
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void trimFilename(StringBuilder res, int maxBytes) {
byte[] raw = res.toString().getBytes(StandardCharsets.UTF_8);
if (raw.length > maxBytes) {
maxBytes -= 3;
while (raw.length > maxBytes) {
res.deleteCharAt(res.length() / 2);
raw = res.toString().getBytes(StandardCharsets.UTF_8);
}
res.insert(res.length() / 2, "...");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trimFilename
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
trimFilename
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder workerGroup(int numThreads) {
checkArgument(numThreads >= 0, "numThreads: %s (expected: >= 0)", numThreads);
workerGroup(EventLoopGroups.newEventLoopGroup(numThreads), true);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: workerGroup
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
workerGroup
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void performEnableScreen() {
synchronized(mWindowMap) {
if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
+ " mForceDisplayEnabled=" + mForceDisplayEnabled
+ " mShowingBootMessages=" + mShowingBootMessages
+ " mSystemBooted=" + mSystemBooted
+ " mOnlyCore=" + mOnlyCore,
new RuntimeException("here").fillInStackTrace());
if (mDisplayEnabled) {
return;
}
if (!mSystemBooted && !mShowingBootMessages) {
return;
}
// Don't enable the screen until all existing windows have been drawn.
if (!mForceDisplayEnabled && checkWaitingForWindowsLocked()) {
return;
}
if (!mBootAnimationStopped) {
// Do this one time.
try {
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
if (surfaceFlinger != null) {
//Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
Parcel data = Parcel.obtain();
data.writeInterfaceToken("android.ui.ISurfaceComposer");
surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
data, null, 0);
data.recycle();
}
} catch (RemoteException ex) {
Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
}
mBootAnimationStopped = true;
}
if (!mForceDisplayEnabled && !checkBootAnimationCompleteLocked()) {
if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: Waiting for anim complete");
return;
}
mDisplayEnabled = true;
if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!");
// Enable input dispatch.
mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
}
try {
mActivityManager.bootAnimationComplete();
} catch (RemoteException e) {
}
mPolicy.enableScreenAfterBoot();
// Make sure the last requested orientation has been applied.
updateRotationUnchecked(false, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performEnableScreen
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
|
performEnableScreen
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void scanAvailableAsecs() {
updateExternalMediaStatusInner(true, false, false);
if (mShouldRestoreconData) {
SELinuxMMAC.setRestoreconDone();
mShouldRestoreconData = false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanAvailableAsecs
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
|
scanAvailableAsecs
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<DhcpOption> convertToInternalDhcpOptions(List<android.net.DhcpOption> options) {
List<DhcpOption> internalOptions = new ArrayList<DhcpOption>();
for (android.net.DhcpOption option : options) {
DhcpOption internalOption = new DhcpOption();
internalOption.type = option.getType();
if (option.getValue() != null) {
byte[] value = option.getValue();
internalOption.value = Arrays.copyOf(value, value.length);
}
internalOptions.add(internalOption);
}
return internalOptions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToInternalDhcpOptions
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
|
convertToInternalDhcpOptions
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String render(XWikiContext context) throws XWikiException
{
XWikiException e = (XWikiException) context.get("exception");
if ((e != null) && (e.getCode() == XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY)) {
return "docalreadyexists";
}
if ("edit".equals(context.get("display"))) {
// When form validation (xvalidate) fails the save action forwards to the "Inline form" edit mode. In this
// case the context action is not "save" anymore because it was changed in #save(XWikiContext). The context
// action should be the action used by the "Inline form" edit mode (either "edit" or "inline").
return context.getAction();
}
return "exception";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: render
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
render
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeWindowInnerLocked(WindowState win) {
removeWindowInnerLocked(win, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeWindowInnerLocked
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
|
removeWindowInnerLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void reject(String callId, Session.Info info) throws RemoteException {
rejectedCallIds.add(callId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reject
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
reject
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addNewIncomingCall(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
synchronized (mLock) {
Log.i(this, "Adding new incoming call with phoneAccountHandle %s",
phoneAccountHandle);
if (phoneAccountHandle != null && phoneAccountHandle.getComponentName() != null) {
// TODO(sail): Add unit tests for adding incoming calls from a SIM call manager.
if (isCallerSimCallManager() && TelephonyUtil.isPstnComponentName(
phoneAccountHandle.getComponentName())) {
Log.v(this, "Allowing call manager to add incoming call with PSTN handle");
} else {
mAppOpsManager.checkPackage(
Binder.getCallingUid(),
phoneAccountHandle.getComponentName().getPackageName());
// Make sure it doesn't cross the UserHandle boundary
enforceUserHandleMatchesCaller(phoneAccountHandle);
}
long token = Binder.clearCallingIdentity();
try {
Intent intent = new Intent(TelecomManager.ACTION_INCOMING_CALL);
intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
phoneAccountHandle);
intent.putExtra(CallIntentProcessor.KEY_IS_INCOMING_CALL, true);
if (extras != null) {
intent.putExtra(TelecomManager.EXTRA_INCOMING_CALL_EXTRAS, extras);
}
CallIntentProcessor.processIncomingCallIntent(mCallsManager, intent);
} finally {
Binder.restoreCallingIdentity(token);
}
} else {
Log.w(this,
"Null phoneAccountHandle. Ignoring request to add new incoming call");
}
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-0847
- Severity: HIGH
- CVSS Score: 7.2
Description: DO NOT MERGE Check PAH in addNewIncomingCall
Check to be sure that the PhoneAccountHandle in addNewIncomingCall
corresponds to an existing registered PhoneAccount in Telecom and that
the PhoneAccount is enabled. Otherwise, throw a SecurityException.
Bug: 26864502
Change-Id: I6bbd8a1ece821b62bee2c94decde87a41afbf8b0
Function: addNewIncomingCall
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
Fixed Code:
@Override
public void addNewIncomingCall(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
synchronized (mLock) {
Log.i(this, "Adding new incoming call with phoneAccountHandle %s",
phoneAccountHandle);
if (phoneAccountHandle != null && phoneAccountHandle.getComponentName() != null) {
// TODO(sail): Add unit tests for adding incoming calls from a SIM call manager.
if (isCallerSimCallManager() && TelephonyUtil.isPstnComponentName(
phoneAccountHandle.getComponentName())) {
Log.v(this, "Allowing call manager to add incoming call with PSTN handle");
} else {
mAppOpsManager.checkPackage(
Binder.getCallingUid(),
phoneAccountHandle.getComponentName().getPackageName());
// Make sure it doesn't cross the UserHandle boundary
enforceUserHandleMatchesCaller(phoneAccountHandle);
enforcePhoneAccountIsRegisteredEnabled(phoneAccountHandle);
}
long token = Binder.clearCallingIdentity();
try {
Intent intent = new Intent(TelecomManager.ACTION_INCOMING_CALL);
intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,
phoneAccountHandle);
intent.putExtra(CallIntentProcessor.KEY_IS_INCOMING_CALL, true);
if (extras != null) {
intent.putExtra(TelecomManager.EXTRA_INCOMING_CALL_EXTRAS, extras);
}
CallIntentProcessor.processIncomingCallIntent(mCallsManager, intent);
} finally {
Binder.restoreCallingIdentity(token);
}
} else {
Log.w(this,
"Null phoneAccountHandle. Ignoring request to add new incoming call");
}
}
}
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
addNewIncomingCall
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Closeable getInnerCloseable() {
Closeable closer = builder()
.parallel(toString(), getServices())
.close(getIoSession())
.build();
closer.addCloseFutureListener(future -> clearAttributes());
return closer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInnerCloseable
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
|
getInnerCloseable
|
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 getTitle() {
return title;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTitle
File: src/main/java/cn/luischen/model/ContentDomain.java
Repository: WinterChenS/my-site
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29638
|
MEDIUM
| 5.4
|
WinterChenS/my-site
|
getTitle
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.AssetDefinition assets(final String path, final Path basedir) {
return assets(path, new AssetHandler(basedir));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assets
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
|
assets
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRevocationReason(Integer revocationReason) {
this.revocationReason = revocationReason;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRevocationReason
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRevocationReason
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
if (icicle != null) {
if (icicle.containsKey(SAVE_ADDING_USER)) {
mAddedUserId = icicle.getInt(SAVE_ADDING_USER);
}
if (icicle.containsKey(SAVE_REMOVING_USER)) {
mRemovingUserId = icicle.getInt(SAVE_REMOVING_USER);
}
mEditUserInfoController.onRestoreInstanceState(icicle);
}
final Context context = getActivity();
mUserCaps = UserCapabilities.create(context);
mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
if (!mUserCaps.mEnabled) {
return;
}
final int myUserId = UserHandle.myUserId();
addPreferencesFromResource(R.xml.user_settings);
mUserListCategory = (PreferenceGroup) findPreference(KEY_USER_LIST);
mMePreference = new UserPreference(getPrefContext(), null /* attrs */, myUserId,
null /* settings icon handler */,
null /* delete icon handler */);
mMePreference.setKey(KEY_USER_ME);
mMePreference.setOnPreferenceClickListener(this);
if (mUserCaps.mIsAdmin) {
mMePreference.setSummary(R.string.user_admin);
}
mAddUser = (DimmableIconPreference) findPreference(KEY_ADD_USER);
// Determine if add user/profile button should be visible
if (mUserCaps.mCanAddUser && Utils.isDeviceProvisioned(getActivity())) {
mAddUser.setOnPreferenceClickListener(this);
// change label to only mention user, if restricted profiles are not supported
if (!mUserCaps.mCanAddRestrictedProfile) {
mAddUser.setTitle(R.string.user_add_user_menu);
}
}
mLockScreenSettings = (PreferenceGroup) findPreference("lock_screen_settings");
mAddUserWhenLocked = (RestrictedSwitchPreference) findPreference("add_users_when_locked");
mEmergencyInfoPreference = findPreference(KEY_EMERGENCY_INFO);
setHasOptionsMenu(true);
IntentFilter filter = new IntentFilter(Intent.ACTION_USER_REMOVED);
filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
context.registerReceiverAsUser(mUserChangeReceiver, UserHandle.ALL, filter, null, mHandler);
loadProfile();
updateUserList();
mShouldUpdateUserList = false;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3889
- Severity: HIGH
- CVSS Score: 7.2
Description: Pre-setup restrictions
- Don't let user settings run
Bug: 29194585
Change-Id: Ia9c46c7ba04ce2809304bebe8a4c5cdac2108611
Function: onCreate
File: src/com/android/settings/users/UserSettings.java
Repository: android
Fixed Code:
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
if (icicle != null) {
if (icicle.containsKey(SAVE_ADDING_USER)) {
mAddedUserId = icicle.getInt(SAVE_ADDING_USER);
}
if (icicle.containsKey(SAVE_REMOVING_USER)) {
mRemovingUserId = icicle.getInt(SAVE_REMOVING_USER);
}
mEditUserInfoController.onRestoreInstanceState(icicle);
}
final Context context = getActivity();
mUserCaps = UserCapabilities.create(context);
mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
if (!mUserCaps.mEnabled) {
return;
}
final int myUserId = UserHandle.myUserId();
addPreferencesFromResource(R.xml.user_settings);
mUserListCategory = (PreferenceGroup) findPreference(KEY_USER_LIST);
mMePreference = new UserPreference(getPrefContext(), null /* attrs */, myUserId,
null /* settings icon handler */,
null /* delete icon handler */);
mMePreference.setKey(KEY_USER_ME);
mMePreference.setOnPreferenceClickListener(this);
if (mUserCaps.mIsAdmin) {
mMePreference.setSummary(R.string.user_admin);
}
mAddUser = (DimmableIconPreference) findPreference(KEY_ADD_USER);
// Determine if add user/profile button should be visible
if (mUserCaps.mCanAddUser && Utils.isDeviceProvisioned(getActivity())) {
mAddUser.setOnPreferenceClickListener(this);
// change label to only mention user, if restricted profiles are not supported
if (!mUserCaps.mCanAddRestrictedProfile) {
mAddUser.setTitle(R.string.user_add_user_menu);
}
}
mLockScreenSettings = (PreferenceGroup) findPreference("lock_screen_settings");
mAddUserWhenLocked = (RestrictedSwitchPreference) findPreference("add_users_when_locked");
mEmergencyInfoPreference = findPreference(KEY_EMERGENCY_INFO);
setHasOptionsMenu(true);
IntentFilter filter = new IntentFilter(Intent.ACTION_USER_REMOVED);
filter.addAction(Intent.ACTION_USER_INFO_CHANGED);
context.registerReceiverAsUser(mUserChangeReceiver, UserHandle.ALL, filter, null, mHandler);
loadProfile();
updateUserList();
mShouldUpdateUserList = false;
if (Global.getInt(getContext().getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
getActivity().finish();
return;
}
}
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
onCreate
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 1
|
Analyze the following code function for security vulnerabilities
|
private void migrateAllLegacySettingsIfNeeded() {
synchronized (mLock) {
final int key = makeKey(SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM);
File globalFile = getSettingsFile(key);
if (globalFile.exists()) {
return;
}
final long identity = Binder.clearCallingIdentity();
try {
List<UserInfo> users = mUserManager.getUsers(true);
final int userCount = users.size();
for (int i = 0; i < userCount; i++) {
final int userId = users.get(i).id;
DatabaseHelper dbHelper = new DatabaseHelper(getContext(), userId);
SQLiteDatabase database = dbHelper.getWritableDatabase();
migrateLegacySettingsForUserLocked(dbHelper, database, userId);
// Upgrade to the latest version.
UpgradeController upgrader = new UpgradeController(userId);
upgrader.upgradeIfNeededLocked();
// Drop from memory if not a running user.
if (!mUserManager.isUserRunning(new UserHandle(userId))) {
removeUserStateLocked(userId, false);
}
}
} finally {
Binder.restoreCallingIdentity(identity);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrateAllLegacySettingsIfNeeded
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
migrateAllLegacySettingsIfNeeded
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String pathOffset(String path, RoutingContext context) {
final Route route = context.currentRoute();
// cannot make any assumptions
if (route == null) {
return path;
}
if (!route.isExactPath()) {
final String rest = context.pathParam("*");
if (rest != null) {
// normalize
if (rest.length() > 0) {
if (rest.charAt(0) == '/') {
return rest;
} else {
return "/" + rest;
}
} else {
return "/";
}
}
}
int prefixLen = 0;
String mountPoint = context.mountPoint();
if (mountPoint != null) {
prefixLen = mountPoint.length();
// special case we need to verify if a trailing slash is present and exclude
if (mountPoint.charAt(mountPoint.length() - 1) == '/') {
prefixLen--;
}
}
// we can only safely skip the route path if there are no variables or regex
if (!route.isRegexPath()) {
String routePath = route.getPath();
if (routePath != null) {
prefixLen += routePath.length();
// special case we need to verify if a trailing slash is present and exclude
if (routePath.charAt(routePath.length() - 1) == '/') {
prefixLen--;
}
}
}
return prefixLen != 0 ? path.substring(prefixLen) : path;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2023-24815
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Fix the webroot escape to classpath on windows
Signed-off-by: Paulo Lopes <pmlopes@gmail.com>
Function: pathOffset
File: vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
Repository: vert-x3/vertx-web
Fixed Code:
public static String pathOffset(String path, RoutingContext context) {
final Route route = context.currentRoute();
// cannot make any assumptions
if (route == null) {
return path;
}
if (!route.isExactPath()) {
String rest = context.pathParam("*");
if (rest != null) {
// normalize
if (rest.length() > 0) {
// remove any attempt to escape the web root and use UNIX style path separators
rest = HttpUtils.removeDots(rest.replace('\\', '/'));
if (rest.charAt(0) == '/') {
return rest;
} else {
return "/" + rest;
}
} else {
return "/";
}
}
}
int prefixLen = 0;
String mountPoint = context.mountPoint();
if (mountPoint != null) {
prefixLen = mountPoint.length();
// special case we need to verify if a trailing slash is present and exclude
if (mountPoint.charAt(mountPoint.length() - 1) == '/') {
prefixLen--;
}
}
// we can only safely skip the route path if there are no variables or regex
if (!route.isRegexPath()) {
String routePath = route.getPath();
if (routePath != null) {
prefixLen += routePath.length();
// special case we need to verify if a trailing slash is present and exclude
if (routePath.charAt(routePath.length() - 1) == '/') {
prefixLen--;
}
}
}
return prefixLen != 0 ? path.substring(prefixLen) : path;
}
|
[
"CWE-22"
] |
CVE-2023-24815
|
MEDIUM
| 5.3
|
vert-x3/vertx-web
|
pathOffset
|
vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
|
9e3a783b1d1a731055e9049078b1b1494ece9c15
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getMySQLScript() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMySQLScript
File: dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-17542
|
LOW
| 3.5
|
dotCMS/core
|
getMySQLScript
|
dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
|
782c342b660d359a71e190c8b5110bc651736591
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private T thisT() {
return (T) this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: thisT
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
thisT
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
void startCleaningPackages() {
// reader
synchronized (mPackages) {
if (!isExternalMediaAvailable()) {
return;
}
if (mSettings.mPackagesToBeCleaned.isEmpty()) {
return;
}
}
Intent intent = new Intent(PackageManager.ACTION_CLEAN_EXTERNAL_STORAGE);
intent.setComponent(DEFAULT_CONTAINER_COMPONENT);
IActivityManager am = ActivityManagerNative.getDefault();
if (am != null) {
try {
am.startService(null, intent, null, mContext.getOpPackageName(),
UserHandle.USER_OWNER);
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startCleaningPackages
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
|
startCleaningPackages
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendLockoutReset() {
if (mCallback != null) {
try {
mCallback.onLockoutReset(mHalDeviceId);
} catch (DeadObjectException e) {
Slog.w(TAG, "Death object while invoking onLockoutReset: ", e);
mHandler.post(mRemoveCallbackRunnable);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to invoke onLockoutReset: ", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendLockoutReset
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
sendLockoutReset
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected float getOverExpansionAmount() {
return mNotificationStackScroller.getCurrentOverScrollAmount(true /* top */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOverExpansionAmount
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
|
getOverExpansionAmount
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getSpacePreferenceAsInt(String preference, XWikiContext context)
{
return Integer.parseInt(getSpacePreference(preference, context));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpacePreferenceAsInt
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getSpacePreferenceAsInt
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CBORReadContext getParsingContext() {
return _parsingContext;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParsingContext
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
getParsingContext
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private String join(Map<CaseInsensitiveString, Boolean> pipelinesWithThisMaterial) {
if (pipelinesWithThisMaterial == null || pipelinesWithThisMaterial.isEmpty()) {
return "";
}
StringBuilder builder = new StringBuilder();
pipelinesWithThisMaterial.forEach((key, value) -> {
builder.append(format("%s (%s),\n ", key, getAutoUpdateStatus(value)));
});
return builder.delete(builder.lastIndexOf(","), builder.length()).toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
join
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
AudioState getAudioState() {
return mCallAudioManager.getAudioState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAudioState
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
|
getAudioState
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
static String parseStringAttribute(TypedXmlPullParser parser, String attribute) {
return parser.getAttributeValue(null, attribute);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseStringAttribute
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
parseStringAttribute
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeInstallDevicePolicyManagementRoleHolderInUser(int targetUserId) {
String devicePolicyManagerRoleHolderPackageName =
getDevicePolicyManagementRoleHolderPackageName(mContext);
if (devicePolicyManagerRoleHolderPackageName == null) {
Slogf.d(LOG_TAG, "No device policy management role holder specified.");
return;
}
try {
if (mIPackageManager.isPackageAvailable(
devicePolicyManagerRoleHolderPackageName, targetUserId)) {
Slogf.d(LOG_TAG, "The device policy management role holder "
+ devicePolicyManagerRoleHolderPackageName + " is already installed in "
+ "user " + targetUserId);
return;
}
Slogf.d(LOG_TAG, "Installing the device policy management role holder "
+ devicePolicyManagerRoleHolderPackageName + " in user " + targetUserId);
mIPackageManager.installExistingPackageAsUser(
devicePolicyManagerRoleHolderPackageName,
targetUserId,
PackageManager.INSTALL_ALL_WHITELIST_RESTRICTED_PERMISSIONS,
PackageManager.INSTALL_REASON_POLICY,
/* whiteListedPermissions= */ null);
} catch (RemoteException e) {
// Does not happen, same process
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeInstallDevicePolicyManagementRoleHolderInUser
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
|
maybeInstallDevicePolicyManagementRoleHolderInUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRestTemplate
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
|
setRestTemplate
|
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
|
private static <T> void checkCompatibleConfigs(String type, Config c1, Config c2, Map<String, T> configs1,
Map<String, T> configs2, ConfigChecker<T> checker) {
Set<String> configNames = new HashSet<String>(configs1.keySet());
configNames.addAll(configs2.keySet());
for (String name : configNames) {
T config1 = lookupByPattern(c1.getConfigPatternMatcher(), configs1, name);
T config2 = lookupByPattern(c2.getConfigPatternMatcher(), configs2, name);
if (config1 != null && config2 != null && !checker.check(config1, config2)) {
throw new HazelcastException(format("Incompatible " + type + " config :\n{0}\n vs \n{1}", config1, config2));
}
}
T config1 = checker.getDefault(c1);
T config2 = checker.getDefault(c2);
if (!checker.check(config1, config2)) {
throw new HazelcastException(format("Incompatible default " + type + " config :\n{0}\n vs \n{1}", config1, config2));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCompatibleConfigs
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
|
checkCompatibleConfigs
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public TopLevelSettings getMainFragment() {
return mMainFragment;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMainFragment
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
getMainFragment
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(anyOf = {
android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS,
android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS
})
//@SystemApi
public void updatePermissionFlags(@NonNull String packageName, @NonNull String permissionName,
@PackageManager.PermissionFlags int flagMask,
@PackageManager.PermissionFlags int flagValues, @NonNull UserHandle user) {
if (DEBUG_TRACE_PERMISSION_UPDATES && shouldTraceGrant(packageName, permissionName,
user.getIdentifier())) {
Log.i(LOG_TAG, "App " + mContext.getPackageName() + " is updating flags for "
+ packageName + " " + permissionName + " for user "
+ user.getIdentifier() + ": " + DebugUtils.flagsToString(
PackageManager.class, "FLAG_PERMISSION_", flagMask) + " := "
+ DebugUtils.flagsToString(PackageManager.class, "FLAG_PERMISSION_",
flagValues), new RuntimeException());
}
try {
final boolean checkAdjustPolicyFlagPermission =
mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.Q;
mPermissionManager.updatePermissionFlags(packageName, permissionName, flagMask,
flagValues, checkAdjustPolicyFlagPermission, user.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePermissionFlags
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
updatePermissionFlags
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setKeyguardStatusViewVisibility(int statusBarState, boolean keyguardFadingAway,
boolean goingToFullShade) {
if ((!keyguardFadingAway && mStatusBarState == StatusBarState.KEYGUARD
&& statusBarState != StatusBarState.KEYGUARD) || goingToFullShade) {
mKeyguardStatusView.animate().cancel();
mKeyguardStatusViewAnimating = true;
mKeyguardStatusView.animate()
.alpha(0f)
.setStartDelay(0)
.setDuration(160)
.setInterpolator(Interpolators.ALPHA_OUT)
.withEndAction(mAnimateKeyguardStatusViewInvisibleEndRunnable);
if (keyguardFadingAway) {
mKeyguardStatusView.animate()
.setStartDelay(mStatusBar.getKeyguardFadingAwayDelay())
.setDuration(mStatusBar.getKeyguardFadingAwayDuration()/2)
.start();
}
} else if (mStatusBarState == StatusBarState.SHADE_LOCKED
&& statusBarState == StatusBarState.KEYGUARD) {
mKeyguardStatusView.animate().cancel();
mKeyguardStatusView.setVisibility(View.VISIBLE);
mKeyguardStatusViewAnimating = true;
mKeyguardStatusView.setAlpha(0f);
mKeyguardStatusView.animate()
.alpha(1f)
.setStartDelay(0)
.setDuration(320)
.setInterpolator(Interpolators.ALPHA_IN)
.withEndAction(mAnimateKeyguardStatusViewVisibleEndRunnable);
} else if (statusBarState == StatusBarState.KEYGUARD) {
mKeyguardStatusView.animate().cancel();
mKeyguardStatusViewAnimating = false;
mKeyguardStatusView.setVisibility(View.VISIBLE);
mKeyguardStatusView.setAlpha(1f);
} else {
mKeyguardStatusView.animate().cancel();
mKeyguardStatusViewAnimating = false;
mKeyguardStatusView.setVisibility(View.GONE);
mKeyguardStatusView.setAlpha(1f);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyguardStatusViewVisibility
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
|
setKeyguardStatusViewVisibility
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readUntilEndOfEntry() throws IOException {
if (endOfEntryBuffer == null) {
endOfEntryBuffer = new byte[512];
}
//noinspection StatementWithEmptyBody
while (read(endOfEntryBuffer) != -1);
this.entryEOFReached = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readUntilEndOfEntry
File: src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
readUntilEndOfEntry
|
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ValueInstantiator findValueInstantiator(DeserializationContext ctxt,
BeanDescription beanDesc)
throws JsonMappingException
{
final DeserializationConfig config = ctxt.getConfig();
ValueInstantiator instantiator = null;
// Check @JsonValueInstantiator before anything else
AnnotatedClass ac = beanDesc.getClassInfo();
Object instDef = ctxt.getAnnotationIntrospector().findValueInstantiator(ac);
if (instDef != null) {
instantiator = _valueInstantiatorInstance(config, ac, instDef);
}
if (instantiator == null) {
// Second: see if some of standard Jackson/JDK types might provide value
// instantiators.
instantiator = JDKValueInstantiators.findStdValueInstantiator(config, beanDesc.getBeanClass());
if (instantiator == null) {
instantiator = _constructDefaultValueInstantiator(ctxt, beanDesc);
}
}
// finally: anyone want to modify ValueInstantiator?
if (_factoryConfig.hasValueInstantiators()) {
for (ValueInstantiators insts : _factoryConfig.valueInstantiators()) {
instantiator = insts.findValueInstantiator(config, beanDesc, instantiator);
// let's do sanity check; easier to spot buggy handlers
if (instantiator == null) {
ctxt.reportBadTypeDefinition(beanDesc,
"Broken registered ValueInstantiators (of type %s): returned null ValueInstantiator",
insts.getClass().getName());
}
}
}
// Sanity check: does the chosen ValueInstantiator have incomplete creators?
if (instantiator.getIncompleteParameter() != null) {
final AnnotatedParameter nonAnnotatedParam = instantiator.getIncompleteParameter();
final AnnotatedWithParams ctor = nonAnnotatedParam.getOwner();
throw new IllegalArgumentException("Argument #"+nonAnnotatedParam.getIndex()
+" of constructor "+ctor+" has no property name annotation; must have name when multiple-parameter constructor annotated as Creator");
}
return instantiator;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findValueInstantiator
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
findValueInstantiator
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setRequestId(RequestId requestId) {
this.requestId = requestId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestId
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRequestId
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Optional<Integer>> internalGetMaxConsumersPerSubscription() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getMaxConsumersPerSubscription));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetMaxConsumersPerSubscription
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGetMaxConsumersPerSubscription
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public JobPropertyDescriptor getJobProperty(String shortClassName) {
// combining these two lines triggers javac bug. See issue #610.
Descriptor d = findDescriptor(shortClassName, JobPropertyDescriptor.all());
return (JobPropertyDescriptor) d;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJobProperty
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getJobProperty
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate fetchByGroupId_First(long groupId,
OrderByComparator<KBTemplate> orderByComparator) {
List<KBTemplate> list = findByGroupId(groupId, 0, 1, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchByGroupId_First
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
fetchByGroupId_First
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public int addAttachments(String fieldName) throws XWikiException
{
if (!hasAccessLevel("edit")) {
java.lang.Object[] args = { this.getFullName() };
throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED,
"Access denied in edit mode on document {0}", null, args);
}
XWiki xwiki = getXWikiContext().getWiki();
FileUploadPlugin fileupload = (FileUploadPlugin) xwiki.getPlugin("fileupload", getXWikiContext());
List<FileItem> fileuploadlist = fileupload.getFileItems(getXWikiContext());
List<XWikiAttachment> attachments = new ArrayList<XWikiAttachment>();
// adding attachment list to context so we find the names
this.context.put("addedAttachments", attachments);
int nb = 0;
if (fileuploadlist == null) {
return 0;
}
for (FileItem item : fileuploadlist) {
String name = item.getFieldName();
if (fieldName != null && !fieldName.equals(name)) {
continue;
}
if (item.isFormField()) {
continue;
}
byte[] data = fileupload.getFileItemData(name, getXWikiContext());
String filename;
String fname = fileupload.getFileName(name, getXWikiContext());
int i = fname.lastIndexOf("\\");
if (i == -1) {
i = fname.lastIndexOf("/");
}
filename = fname.substring(i + 1);
filename = filename.replaceAll("\\+", " ");
if ((data != null) && (data.length > 0)) {
XWikiAttachment attachment = this.getDoc().addAttachment(filename, data, getXWikiContext());
getDoc().saveAttachmentContent(attachment, getXWikiContext());
// commenting because this was already done by addAttachment
// getDoc().getAttachmentList().add(attachment);
attachments.add(attachment);
nb++;
}
}
if (nb > 0) {
getXWikiContext().getWiki().saveDocument(getDoc(), getXWikiContext());
this.initialDoc = this.doc;
}
return nb;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
addAttachments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalSetReplicatedSubscriptionStatus(AsyncResponse asyncResponse, String subName,
boolean authoritative, boolean enabled) {
log.info("[{}] Attempting to change replicated subscription status to {} - {} {}", clientAppId(), enabled,
topicName, subName);
// Reject the request if the topic is not persistent
if (!topicName.isPersistent()) {
asyncResponse.resume(new RestException(Status.METHOD_NOT_ALLOWED,
"Cannot enable/disable replicated subscriptions on non-persistent topics"));
return;
}
// Reject the request if the topic is not global
if (!topicName.isGlobal()) {
asyncResponse.resume(new RestException(Status.METHOD_NOT_ALLOWED,
"Cannot enable/disable replicated subscriptions on non-global topics"));
return;
}
// Permission to consume this topic is required
try {
validateTopicOperation(topicName, TopicOperation.SET_REPLICATED_SUBSCRIPTION_STATUS, subName);
} catch (Exception e) {
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
// Redirect the request to the peer-cluster if the local cluster is not included in the replication clusters
try {
validateGlobalNamespaceOwnership(namespaceName);
} catch (Exception e) {
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
// If the topic name is a partition name, no need to get partition topic metadata again
if (topicName.isPartitioned()) {
internalSetReplicatedSubscriptionStatusForNonPartitionedTopic(asyncResponse, subName, authoritative,
enabled);
} else {
getPartitionedTopicMetadataAsync(topicName, authoritative, false).thenAccept(partitionMetadata -> {
if (partitionMetadata.partitions > 0) {
final List<CompletableFuture<Void>> futures = Lists.newArrayList();
for (int i = 0; i < partitionMetadata.partitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
futures.add(pulsar().getAdminClient().topics().setReplicatedSubscriptionStatusAsync(
topicNamePartition.toString(), subName, enabled));
} catch (Exception e) {
log.warn("[{}] Failed to change replicated subscription status to {} - {} {}",
clientAppId(), enabled, topicNamePartition, subName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
}
FutureUtil.waitForAll(futures).handle((result, exception) -> {
if (exception != null) {
Throwable t = exception.getCause();
if (t instanceof NotFoundException) {
asyncResponse
.resume(new RestException(Status.NOT_FOUND, "Topic or subscription not found"));
return null;
} else if (t instanceof PreconditionFailedException) {
asyncResponse.resume(new RestException(Status.PRECONDITION_FAILED,
"Cannot enable/disable replicated subscriptions on non-global topics"));
return null;
} else {
log.warn("[{}] Failed to change replicated subscription status to {} - {} {}",
clientAppId(), enabled, topicName, subName, t);
asyncResponse.resume(new RestException(t));
return null;
}
}
asyncResponse.resume(Response.noContent().build());
return null;
});
} else {
internalSetReplicatedSubscriptionStatusForNonPartitionedTopic(asyncResponse, subName, authoritative,
enabled);
}
}).exceptionally(ex -> {
log.warn("[{}] Failed to change replicated subscription status to {} - {} {}", clientAppId(), enabled,
topicName, subName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSetReplicatedSubscriptionStatus
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalSetReplicatedSubscriptionStatus
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSchemaDefinitionInPublishList(CmsUUID publishHistoryId) {
if (m_cms == null) {
// CmsObject not available, assume there may be a schema definition in the publish history
return true;
}
try {
List<CmsPublishedResource> publishedResources = m_cms.readPublishedResources(publishHistoryId);
for (CmsPublishedResource cmsPublishedResource : publishedResources) {
String resourceRootPath = cmsPublishedResource.getRootPath();
String resourceRootPathLowerCase = resourceRootPath.toLowerCase();
if (resourceRootPathLowerCase.endsWith(".xsd")
|| resourceRootPathLowerCase.endsWith(".dtd")
|| m_cacheTemporary.containsKey(getCacheKey(resourceRootPath, true))) {
return true;
}
}
} catch (CmsException e) {
// error reading published Resources.
LOG.warn(e.getMessage(), e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSchemaDefinitionInPublishList
File: src/org/opencms/xml/CmsXmlEntityResolver.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
isSchemaDefinitionInPublishList
|
src/org/opencms/xml/CmsXmlEntityResolver.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("GoodTime") // reading system time without TimeSource
public static void touch(File file) throws IOException {
checkNotNull(file);
if (!file.createNewFile() && !file.setLastModified(System.currentTimeMillis())) {
throw new IOException("Unable to update modification time of " + file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: touch
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
touch
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onNetworkTemporarilyDisabled(WifiConfiguration config, int disableReason) {
if (disableReason == DISABLED_NO_INTERNET_TEMPORARY) return;
if (config.networkId == mTargetNetworkId || config.networkId == mLastNetworkId) {
// Disconnect and let autojoin reselect a new network
sendMessage(CMD_DISCONNECT, StaEvent.DISCONNECT_NETWORK_TEMPORARY_DISABLED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNetworkTemporarilyDisabled
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
|
onNetworkTemporarilyDisabled
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVariable(String key, Object value) {
if (nativeVideo != null && Media.VARIABLE_NATIVE_CONTRLOLS_EMBEDDED.equals(key) && value instanceof Boolean) {
setNativeController((Boolean)value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVariable
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
|
setVariable
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private UIComponent createComponentApplyAnnotations(FacesContext ctx, String componentType, String rendererType, boolean applyAnnotations) {
UIComponent component;
try {
component = newThing(componentType, componentMap);
} catch (Exception ex) {
if (LOGGER.isLoggable(SEVERE)) {
LOGGER.log(Level.SEVERE, "jsf.cannot_instantiate_component_error", componentType);
}
throw new FacesException(ex);
}
notNullNamedObject(component, componentType, "jsf.cannot_instantiate_component_error");
if (LOGGER.isLoggable(FINE)) {
LOGGER.log(FINE, MessageFormat.format("Created component with component type of ''{0}''", componentType));
}
if (applyAnnotations) {
applyAnnotations(ctx, rendererType, component);
}
return component;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createComponentApplyAnnotations
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
createComponentApplyAnnotations
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTsConfigFile() {
return tsConfigFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTsConfigFile
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getTsConfigFile
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject accumulate(String key, Object value) throws JSONException {
testValidity(value);
Object object = this.opt(key);
if (object == null) {
this.put(key,
value instanceof JSONArray ? new JSONArray().put(value)
: value);
} else if (object instanceof JSONArray) {
((JSONArray) object).put(value);
} else {
this.put(key, new JSONArray().put(object).put(value));
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: accumulate
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
accumulate
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getShortcutInfoAsync(
int launcherUserId, @NonNull String packageName, @NonNull String shortcutId,
int userId, @NonNull Consumer<ShortcutInfo> cb) {
Preconditions.checkStringNotEmpty(packageName, "packageName");
Preconditions.checkStringNotEmpty(shortcutId, "shortcutId");
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
final ShortcutPackage p;
synchronized (mLock) {
p = getUserShortcutsLocked(userId).getPackageShortcutsIfExists(packageName);
}
if (p == null) {
cb.accept(null);
return;
}
p.getShortcutByIdsAsync(Collections.singleton(shortcutId), shortcuts ->
cb.accept(shortcuts == null || shortcuts.isEmpty() ? null : shortcuts.get(0)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutInfoAsync
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getShortcutInfoAsync
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeGeoFencing(final String id) {
//Display.getInstance().scheduleBackgroundTask(new Runnable() {
Thread t = new Thread(new Runnable() {
@Override
public void run() {
//wait until the client is connected, otherwise the call to
//requestLocationUpdates will fail
//com.codename1.io.Log.p("PLACES remove "+id);
while (!getmGoogleApiClient().isConnected()) {
try {
Thread.sleep(300);
} catch (Exception ex) {
}
}
//com.codename1.io.Log.p("PLACES remove "+id+" 2");
Handler mHandler = new Handler(Looper.getMainLooper());
mHandler.post(new Runnable() {
public void run() {
ArrayList<String> ids = new ArrayList<String>();
ids.add(id);
geofencingClient = geofencingClient == null ? LocationServices.getGeofencingClient(AndroidNativeUtil.getContext().getApplicationContext()) :
geofencingClient;
geofencingClient.removeGeofences(ids);
}
});
}
});
t.setUncaughtExceptionHandler(AndroidImplementation.exceptionHandler);
t.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeGeoFencing
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
|
removeGeoFencing
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private String parseDN(String subject, String subjectAttributeName)
{
String temp = subject;
int begin = temp.toLowerCase().indexOf(
subjectAttributeName.toLowerCase());
temp = temp.substring(begin + subjectAttributeName.length());
int end = temp.indexOf(',');
if (end == -1)
{
end = temp.length();
}
while (temp.charAt(end - 1) == '\\')
{
end = temp.indexOf(',', end + 1);
if (end == -1)
{
end = temp.length();
}
}
temp = temp.substring(0, end);
begin = temp.indexOf('=');
temp = temp.substring(begin + 1);
if (temp.charAt(0) == ' ')
{
temp = temp.substring(1);
}
if (temp.startsWith("\""))
{
temp = temp.substring(1);
}
if (temp.endsWith("\""))
{
temp = temp.substring(0, temp.length() - 1);
}
return temp;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDN
File: prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-295"
] |
CVE-2023-33201
|
MEDIUM
| 5.3
|
bcgit/bc-java
|
parseDN
|
prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
|
e8c409a8389c815ea3fda5e8b94c92fdfe583bcc
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final Augmentations locationAugs() {
HTMLAugmentations augs = null;
if (fAugmentations) {
fLocationItem.setValues(fBeginLineNumber, fBeginColumnNumber,
fBeginCharacterOffset, fEndLineNumber,
fEndColumnNumber, fEndCharacterOffset);
augs = fInfosetAugs;
augs.removeAllItems();
augs.putItem(AUGMENTATIONS, fLocationItem);
}
return augs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: locationAugs
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
locationAugs
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String encoding = request.getHeader("Accept-Encoding");
boolean supportsGzip = (encoding != null && encoding.toLowerCase().indexOf("gzip") > -1);
SessionTerminal st = (SessionTerminal) request.getSession(true).getAttribute("terminal");
if (st == null || st.isClosed()) {
st = new SessionTerminal(getCommandProcessor(), getThreadIO());
request.getSession().setAttribute("terminal", st);
}
String str = request.getParameter("k");
String f = request.getParameter("f");
String dump = st.handle(str, f != null && f.length() > 0);
if (dump != null) {
if (supportsGzip) {
response.setHeader("Content-Encoding", "gzip");
response.setHeader("Content-Type", "text/html");
try {
GZIPOutputStream gzos = new GZIPOutputStream(response.getOutputStream());
gzos.write(dump.getBytes());
gzos.close();
} catch (IOException ie) {
LOG.info("Exception writing response: ", ie);
}
} else {
response.getOutputStream().write(dump.getBytes());
}
}
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2014-0121
- Severity: HIGH
- CVSS Score: 7.5
Description: Ensure we secure hawtio-karaf-terminal's /term context
Function: doPost
File: hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java
Repository: hawtio
Fixed Code:
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession(false);
if (session == null) {
AccessControlContext acc = AccessController.getContext();
Subject subject = Subject.getSubject(acc);
if (subject == null) {
Helpers.doForbidden(response);
return;
}
session = request.getSession(true);
session.setAttribute("subject", subject);
} else {
Subject subject = (Subject) session.getAttribute("subject");
if (subject == null) {
session.invalidate();
Helpers.doForbidden(response);
return;
}
}
String encoding = request.getHeader("Accept-Encoding");
boolean supportsGzip = (encoding != null && encoding.toLowerCase().indexOf("gzip") > -1);
SessionTerminal st = (SessionTerminal) session.getAttribute("terminal");
if (st == null || st.isClosed()) {
st = new SessionTerminal(getCommandProcessor(), getThreadIO());
session.setAttribute("terminal", st);
}
String str = request.getParameter("k");
String f = request.getParameter("f");
String dump = st.handle(str, f != null && f.length() > 0);
if (dump != null) {
if (supportsGzip) {
response.setHeader("Content-Encoding", "gzip");
response.setHeader("Content-Type", "text/html");
try {
GZIPOutputStream gzos = new GZIPOutputStream(response.getOutputStream());
gzos.write(dump.getBytes());
gzos.close();
} catch (IOException ie) {
LOG.info("Exception writing response: ", ie);
}
} else {
response.getOutputStream().write(dump.getBytes());
}
}
}
|
[
"CWE-287"
] |
CVE-2014-0121
|
HIGH
| 7.5
|
hawtio
|
doPost
|
hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java
|
5289715e4f2657562fdddcbad830a30969b96e1e
| 1
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void maybeResumeDeviceWideLoggingLocked() {
boolean allUsersAffiliated = areAllUsersAffiliatedWithDeviceLocked();
boolean orgOwnedProfileDevice = isOrganizationOwnedDeviceWithManagedProfile();
mInjector.binderWithCleanCallingIdentity(() -> {
if (allUsersAffiliated || orgOwnedProfileDevice) {
mSecurityLogMonitor.resume();
}
// If there is no device owner, then per-user network logging may be enabled for the
// managed profile. In which case, all users do not need to be affiliated.
if (allUsersAffiliated || !mOwners.hasDeviceOwner()) {
if (mNetworkLogger != null) {
mNetworkLogger.resume();
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeResumeDeviceWideLoggingLocked
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
|
maybeResumeDeviceWideLoggingLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPause() {
super.onPause();
mState = STATE_PAUSED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPause
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
onPause
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
private ConsoleResult execute(CommandLine hgCmd) {
return runOrBomb(hgCmd);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
execute
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setValidationScript(String validationScript)
{
getDoc().setValidationScript(validationScript);
updateAuthor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setValidationScript
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
setValidationScript
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onHeightUpdated(float expandedHeight) {
if (!mQsExpanded || mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted) {
positionClockAndNotifications();
}
if (mQsExpandImmediate || mQsExpanded && !mQsTracking && mQsExpansionAnimator == null
&& !mQsExpansionFromOverscroll) {
float t;
if (mKeyguardShowing) {
// On Keyguard, interpolate the QS expansion linearly to the panel expansion
t = expandedHeight / (getMaxPanelHeight());
} else {
// In Shade, interpolate linearly such that QS is closed whenever panel height is
// minimum QS expansion + minStackHeight
float panelHeightQsCollapsed = mNotificationStackScroller.getIntrinsicPadding()
+ mNotificationStackScroller.getLayoutMinHeight();
float panelHeightQsExpanded = calculatePanelHeightQsExpanded();
t = (expandedHeight - panelHeightQsCollapsed)
/ (panelHeightQsExpanded - panelHeightQsCollapsed);
}
setQsExpansion(mQsMinExpansionHeight
+ t * (getTempQsMaxExpansion() - mQsMinExpansionHeight));
}
updateExpandedHeight(expandedHeight);
updateHeader();
updateUnlockIcon();
updateNotificationTranslucency();
updatePanelExpanded();
mNotificationStackScroller.setShadeExpanded(!isFullyCollapsed());
if (DEBUG) {
invalidate();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHeightUpdated
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
|
onHeightUpdated
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(DocumentReference documentReference, String action, String queryString, String anchor,
XWikiContext context)
{
// We need to serialize the space reference because the old createURL() API doesn't accept a DocumentReference.
String spaces = getLocalStringEntityReferenceSerializer().serialize(documentReference.getLastSpaceReference());
// Take into account the specified document locale.
Locale documentLocale = documentReference.getLocale();
String actualQueryString = queryString;
if (documentLocale != null && documentLocale != Locale.ROOT) {
String localeQueryString = "language=" + documentLocale;
if (StringUtils.isEmpty(queryString)) {
actualQueryString = localeQueryString;
} else {
// Note: if the locale is already specified on the given query string then it won't be overwriten
// because the first parameter value is taken into account.
actualQueryString += '&' + localeQueryString;
}
}
URL url = context.getURLFactory().createURL(spaces, documentReference.getName(), action, actualQueryString,
anchor, documentReference.getWikiReference().getName(), context);
return context.getURLFactory().getURL(url, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public SingleButtonPanel insertNewAjaxActionButton(final AjaxCallback ajaxCallback, final int position, final String label,
final String... classnames)
{
final SingleButtonPanel result = addNewAjaxActionButton(ajaxCallback, label, classnames);
this.actionButtons.add(position, result);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertNewAjaxActionButton
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
insertNewAjaxActionButton
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void registerBroadcastReceivers() {
IntentFilter userFilter = new IntentFilter();
userFilter.addAction(Intent.ACTION_USER_REMOVED);
userFilter.addAction(Intent.ACTION_USER_STOPPED);
getContext().registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE,
UserHandle.USER_SYSTEM);
switch (intent.getAction()) {
case Intent.ACTION_USER_REMOVED: {
synchronized (mLock) {
mSettingsRegistry.removeUserStateLocked(userId, true);
}
} break;
case Intent.ACTION_USER_STOPPED: {
synchronized (mLock) {
mSettingsRegistry.removeUserStateLocked(userId, false);
}
} break;
}
}
}, userFilter);
PackageMonitor monitor = new PackageMonitor() {
@Override
public void onPackageRemoved(String packageName, int uid) {
synchronized (mLock) {
mSettingsRegistry.onPackageRemovedLocked(packageName,
UserHandle.getUserId(uid));
}
}
};
// package changes
monitor.register(getContext(), BackgroundThread.getHandler().getLooper(),
UserHandle.ALL, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerBroadcastReceivers
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
registerBroadcastReceivers
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isNotificationPolicyAccessGrantedForPackage(String pkg) {;
enforceSystemOrSystemUIOrSamePackage(pkg,
"request policy access status for another package");
return checkPolicyAccess(pkg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotificationPolicyAccessGrantedForPackage
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
|
isNotificationPolicyAccessGrantedForPackage
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
void disconnectAllCalls() {
Log.v(this, "disconnectAllCalls");
for (Call call : mCalls) {
disconnectCall(call);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disconnectAllCalls
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
|
disconnectAllCalls
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeStreamSink(int streamId) {
StreamHolder existing = currentStreams.get(streamId);
if(existing == null) {
return;
}
existing.sinkClosed = true;
existing.sinkChannel = null;
if(existing.sourceClosed) {
if(streamId % 2 == (isClient() ? 1 : 0)) {
sendConcurrentStreamsAtomicUpdater.getAndDecrement(this);
} else {
receiveConcurrentStreamsAtomicUpdater.getAndDecrement(this);
}
currentStreams.remove(streamId);
}
if(isLastFrameReceived() && currentStreams.isEmpty()) {
sendGoAway(ERROR_NO_ERROR);
} else if(parseTimeoutUpdater != null && currentStreams.isEmpty()) {
parseTimeoutUpdater.connectionIdle();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeStreamSink
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
|
removeStreamSink
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Unstable
public void readTemporaryUploadedFiles(EditForm editForm)
{
getTemporaryAttachmentManager().attachTemporaryAttachmentsInDocument(this, editForm.getTemporaryUploadedFiles());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readTemporaryUploadedFiles
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
readTemporaryUploadedFiles
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ByteBuffer directBuffer(long memoryAddress, int size) {
if (PlatformDependent0.hasDirectBufferNoCleanerConstructor()) {
return PlatformDependent0.newDirectBuffer(memoryAddress, size);
}
throw new UnsupportedOperationException(
"sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: directBuffer
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
|
directBuffer
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> T unmarshal(final Class<T> clazz, final InputSource inputSource, final boolean validate) {
return unmarshal(clazz, inputSource, null, validate, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-0871
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
unmarshal
|
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
|
3c17231714e3d55809efc580a05734ed530f9ad4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void detachStack(int stackId) {
synchronized (mWindowMap) {
TaskStack stack = mStackIdToStack.get(stackId);
if (stack != null) {
final DisplayContent displayContent = stack.getDisplayContent();
if (displayContent != null) {
if (stack.isAnimating()) {
stack.mDeferDetach = true;
return;
}
detachStackLocked(displayContent, stack);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detachStack
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
|
detachStack
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setCheckClassDefErrors(boolean checkClassDefErrors) {
this.checkClassDefErrors = checkClassDefErrors;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCheckClassDefErrors
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setCheckClassDefErrors
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setIdleConnectionInPoolTimeoutInMs(int idleConnectionInPoolTimeoutInMs) {
this.idleConnectionInPoolTimeoutInMs = idleConnectionInPoolTimeoutInMs;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIdleConnectionInPoolTimeoutInMs
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setIdleConnectionInPoolTimeoutInMs
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element pdElement = document.createElement("policyDefault");
pdElement.setAttribute("id", name);
pdElement.setAttribute("classId", classId);
if (text != null) {
Element descriptionElement = document.createElement("description");
descriptionElement.appendChild(document.createTextNode(text));
pdElement.appendChild(descriptionElement);
}
for (ProfileAttribute attribute : attributes) {
Element attributeElement = document.createElement("policyAttribute");
if (attribute.getName() != null) {
attributeElement.setAttribute("name", attribute.getName());
}
if (attribute.getValue() != null) {
Element valueElement = document.createElement("Value");
valueElement.appendChild(document.createTextNode(attribute.getValue()));
attributeElement.appendChild(valueElement);
}
Descriptor descriptor = attribute.getDescriptor();
if (descriptor != null) {
Element descriptorElement = descriptor.toDOM(document);
attributeElement.appendChild(descriptorElement);
}
pdElement.appendChild(attributeElement);
}
for (ProfileParameter param : params) {
Element parameterElement = document.createElement("params");
if (param.getName() != null) {
parameterElement.setAttribute("name", param.getName());
}
if (param.getValue() != null) {
Element valueElement = document.createElement("value");
valueElement.appendChild(document.createTextNode(param.getValue()));
parameterElement.appendChild(valueElement);
}
pdElement.appendChild(parameterElement);
}
return pdElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cancel(String accountName) {
if (mCurrentUpload != null && mCurrentUpload.getUser().nameEquals(accountName)) {
mCurrentUpload.cancel(ResultCode.CANCELLED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
cancel
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void deleteByPojoFailedConnection(TestContext context) throws FieldException {
createFoo(context).delete(Future.failedFuture("bad"), FOO, new SimplePojo(), context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteByPojoFailedConnection
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
deleteByPojoFailedConnection
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void appendChar( StringBuffer str, int value )
{
if ( value > Character.MAX_VALUE )
{
char[] chars = Character.toChars( value );
str.append( chars, 0, chars.length );
}
else
{
str.append( (char) value );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendChar
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
appendChar
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeVersion() {
for (Iterator<NodeTuple> it = getValue().iterator(); it.hasNext();) {
ScalarNode keyNode = (ScalarNode) it.next().getKeyNode();
if (keyNode.getValue().equals("version"))
it.remove();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeVersion
File: server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21249
|
MEDIUM
| 6.5
|
theonedev/onedev
|
removeVersion
|
server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java
|
d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder text(String value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: text
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
text
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract String getLocation();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocation
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getLocation
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMaxKeyguardNotifications() {
return getMaxKeyguardNotifications(false /* recompute */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxKeyguardNotifications
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
getMaxKeyguardNotifications
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setUserAgent(String userAgent) {
userAgent = userAgent;
addDefaultHeader("User-Agent", userAgent);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserAgent
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setUserAgent
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beginFormat(WikiFormat format)
{
WikiParameters wikiParameters = new WikiParameters(format.getParams());
if (isMetaDataElement(wikiParameters)) {
getListener().beginMetaData(createMetaData(wikiParameters));
WikiParameters cleanParameters = cleanParametersFromMetadata(wikiParameters);
if (cleanParameters.getSize() > 0 || !format.getStyles().isEmpty()) {
WikiFormat newFormat = format;
if (wikiParameters.getSize() != cleanParameters.getSize()) {
newFormat = format.setParameters(cleanParameters.toList());
}
super.beginFormat(newFormat);
}
} else {
super.beginFormat(format);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginFormat
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
beginFormat
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInvertFilter() {
return invertFilter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInvertFilter
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
isInvertFilter
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<? extends Post> getQuestions(Profile authUser, Profile showUser, boolean isMyProfile, Pager itemcount) {
if (utils.postsNeedApproval() && (isMyProfile || utils.isMod(authUser))) {
List<Question> qlist = new ArrayList<>();
Pager p = new Pager(itemcount.getPage(), itemcount.getLimit());
qlist.addAll(showUser.getAllQuestions(itemcount));
qlist.addAll(showUser.getAllUnapprovedQuestions(p));
itemcount.setCount(itemcount.getCount() + p.getCount());
return qlist;
} else {
return showUser.getAllQuestions(itemcount);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQuestions
File: src/main/java/com/erudika/scoold/controllers/ProfileController.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getQuestions
|
src/main/java/com/erudika/scoold/controllers/ProfileController.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void sendSync(String content) throws IOException {
try {
// FireFox posts a "loading" state twice as well.
this.changeState(ReadyState.LOADING, 0, null, null);
URLConnection c;
synchronized (this) {
c = this.connection;
}
c.setRequestProperty("User-Agent", this.context.getUserAgent());
c.setRequestProperty("Accept-Encoding", UserAgentContext.GZIP_ENCODING);
int istatus;
String istatusText;
InputStream err;
if (c instanceof HttpURLConnection) {
HttpURLConnection hc = (HttpURLConnection) c;
String method = req.getMethod();
if (method == null) {
throw new IOException("Null method.");
}
method = method.toUpperCase();
hc.setRequestMethod(method);
if ("POST".equals(method) && content != null) {
hc.setDoOutput(true);
byte[] contentBytes = content.getBytes(this.getPostCharset());
hc.setFixedLengthStreamingMode(contentBytes.length);
OutputStream out = hc.getOutputStream();
try {
out.write(contentBytes);
} finally {
out.flush();
}
}
istatus = hc.getResponseCode();
istatusText = hc.getResponseMessage();
err = hc.getErrorStream();
} else {
istatus = 0;
istatusText = "";
err = null;
}
synchronized (this) {
this.responseHeaders = this.getAllResponseHeaders(c);
this.responseHeadersMap = c.getHeaderFields();
}
this.changeState(ReadyState.LOADED, istatus, istatusText, null);
InputStream in = err == null ? IORoutines.getInputStream(c) : err;
int contentLength = c.getContentLength();
this.changeState(ReadyState.INTERACTIVE, istatus, istatusText, null);
byte[] bytes = IORoutines.load(in, contentLength == -1 ? 4096 : contentLength);
this.changeState(ReadyState.COMPLETE, istatus, istatusText, bytes);
} finally {
synchronized (this) {
this.connection = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSync
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
sendSync
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setDoubleQuotedArgumentEscaped( boolean doubleQuotedArgumentEscaped )
{
this.doubleQuotedArgumentEscaped = doubleQuotedArgumentEscaped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDoubleQuotedArgumentEscaped
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
setDoubleQuotedArgumentEscaped
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initializeVelocity() {
if (velocityEngine == null) {
velocityEngine = new VelocityEngine();
Properties props = new Properties();
props.setProperty(RuntimeConstants.RUNTIME_LOG, "startup_wizard_vel.log");
// Linux requires setting logging properties to initialize Velocity Context.
props.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
"org.apache.velocity.runtime.log.CommonsLogLogChute");
props.setProperty(CommonsLogLogChute.LOGCHUTE_COMMONS_LOG_NAME, "initial_wizard_velocity");
// so the vm pages can import the header/footer
props.setProperty(RuntimeConstants.RESOURCE_LOADER, "class");
props.setProperty("class.resource.loader.description", "Velocity Classpath Resource Loader");
props.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
try {
velocityEngine.init(props);
}
catch (Exception e) {
log.error("velocity init failed, because: " + e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-23612
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix bug
Function: initializeVelocity
File: web/src/main/java/org/openmrs/web/filter/StartupFilter.java
Repository: openmrs/openmrs-core
Fixed Code:
private void initializeVelocity() {
if (velocityEngine == null) {
velocityEngine = new VelocityEngine();
Properties props = new Properties();
props.setProperty(RuntimeConstants.RUNTIME_LOG, "startup_wizard_vel.log");
// Linux requires setting logging properties to initialize Velocity Context.
props.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
"org.apache.velocity.runtime.log.CommonsLogLogChute");
props.setProperty(CommonsLogLogChute.LOGCHUTE_COMMONS_LOG_NAME, "initial_wizard_velocity");
// so the vm pages can import the header/footer
props.setProperty(RuntimeConstants.RESOURCE_LOADER, "class");
props.setProperty("class.resource.loader.description", "Velocity Classpath Resource Loader");
props.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
try {
velocityEngine.init(props);
}
catch (Exception e) {
log.error("velocity init failed, because: {}", e, e);
}
}
}
|
[
"CWE-22"
] |
CVE-2022-23612
|
MEDIUM
| 5
|
openmrs/openmrs-core
|
initializeVelocity
|
web/src/main/java/org/openmrs/web/filter/StartupFilter.java
|
db8454bf19a092a78d53ee4dba2af628b730a6e7
| 1
|
Analyze the following code function for security vulnerabilities
|
public static <T extends Describable<T>>
Map<Descriptor<T>,T> toMap(Iterable<T> describables) {
Map<Descriptor<T>,T> m = new LinkedHashMap<Descriptor<T>,T>();
for (T d : describables) {
m.put(d.getDescriptor(),d);
}
return m;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toMap
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
toMap
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void extractZip(File zipFile, File destDir) throws IOException
{
byte[] buffer = new byte[1024];
if (!destDir.exists())
destDir.mkdirs();
ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
ZipEntry ze = zis.getNextEntry();
try
{
while (ze != null)
{
String fileName = ze.getName();
File newFile = new File(destDir, fileName);
if (ze.isDirectory())
{
if (newFile.exists())
deleteDirAndContents(newFile);
newFile.mkdirs();
}
else
{
if (newFile.exists())
newFile.delete();
if (newFile.getParentFile() != null && !newFile.getParentFile().exists())
newFile.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(newFile);
int len;
while ((len = zis.read(buffer)) > 0)
fos.write(buffer, 0, len);
fos.close();
}
ze = zis.getNextEntry();
}
}
finally
{
zis.closeEntry();
zis.close();
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-4494
- Severity: CRITICAL
- CVSS Score: 9.8
Description: vuln-fix: Zip Slip Vulnerability
This fixes a Zip-Slip vulnerability.
This change does one of two things. This change either
1. Inserts a guard to protect against Zip Slip.
OR
2. Replaces `dir.getCanonicalPath().startsWith(parent.getCanonicalPath())`, which is vulnerable to partial path traversal attacks, with the more secure `dir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath())`.
For number 2, consider `"/usr/outnot".startsWith("/usr/out")`.
The check is bypassed although `/outnot` is not under the `/out` directory.
It's important to understand that the terminating slash may be removed when using various `String` representations of the `File` object.
For example, on Linux, `println(new File("/var"))` will print `/var`, but `println(new File("/var", "/")` will print `/var/`;
however, `println(new File("/var", "/").getCanonicalPath())` will print `/var`.
Weakness: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Severity: High
CVSSS: 7.4
Detection: CodeQL (https://codeql.github.com/codeql-query-help/java/java-zipslip/) & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.ZipSlip)
Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/16
Co-authored-by: Moderne <team@moderne.io>
Function: extractZip
File: src/main/java/bspkrs/mmv/RemoteZipHandler.java
Repository: bspkrs/MCPMappingViewer
Fixed Code:
public static void extractZip(File zipFile, File destDir) throws IOException
{
byte[] buffer = new byte[1024];
if (!destDir.exists())
destDir.mkdirs();
ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
ZipEntry ze = zis.getNextEntry();
try
{
while (ze != null)
{
String fileName = ze.getName();
File newFile = new File(destDir, fileName);
if (!newFile.toPath().normalize().startsWith(destDir.toPath().normalize())) {
throw new IOException("Bad zip entry");
}
if (ze.isDirectory())
{
if (newFile.exists())
deleteDirAndContents(newFile);
newFile.mkdirs();
}
else
{
if (newFile.exists())
newFile.delete();
if (newFile.getParentFile() != null && !newFile.getParentFile().exists())
newFile.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(newFile);
int len;
while ((len = zis.read(buffer)) > 0)
fos.write(buffer, 0, len);
fos.close();
}
ze = zis.getNextEntry();
}
}
finally
{
zis.closeEntry();
zis.close();
}
}
|
[
"CWE-22"
] |
CVE-2022-4494
|
CRITICAL
| 9.8
|
bspkrs/MCPMappingViewer
|
extractZip
|
src/main/java/bspkrs/mmv/RemoteZipHandler.java
|
6e602746c96b4756c271d080dae7d22ad804a1bd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isRotationDrawingSupported() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRotationDrawingSupported
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
|
isRotationDrawingSupported
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setHidden(Boolean hidden)
{
if (hidden == null) {
this.hidden = false;
} else {
this.hidden = hidden;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHidden
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
|
setHidden
|
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
|
@Test
public void testDeserializationWithTypeInfo04() throws Exception
{
Duration duration = Duration.ofSeconds(13498L, 8374);
String prefix = "[\"" + Duration.class.getName() + "\",";
ObjectMapper mapper = newMapper();
mapper.addMixIn(TemporalAmount.class, MockObjectConfiguration.class);
TemporalAmount value = mapper.readValue(prefix + '"' + duration.toString() + "\"]", TemporalAmount.class);
assertNotNull("The value should not be null.", value);
assertTrue("The value should be a Duration.", value instanceof Duration);
assertEquals("The value is not correct.", duration, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationWithTypeInfo04
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationWithTypeInfo04
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.