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
|
public XWikiDocument duplicate(DocumentReference newDocumentReference)
{
return cloneInternal(newDocumentReference, false, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: duplicate
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
|
duplicate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startBackgroundFetchService() {
LocalNotification n = new LocalNotification();
n.setId(BACKGROUND_FETCH_NOTIFICATION_ID);
cancelLocalNotification(BACKGROUND_FETCH_NOTIFICATION_ID);
// We schedule a local notification
// First callback will be at the repeat interval
// We don't specify a repeat interval because the scheduleLocalNotification will
// set that for us using the getPreferredBackgroundFetchInterval method.
scheduleLocalNotification(n, System.currentTimeMillis() + getPreferredBackgroundFetchInterval() * 1000, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startBackgroundFetchService
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
|
startBackgroundFetchService
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public ProfileOutput getProfileOutput(String id) {
for (ProfileOutput output: outputs) {
if (output.getId().equals(id)) return output;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOutput
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getProfileOutput
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean defaultAllowPoolingConnection() {
return getBoolean(ASYNC_CLIENT + "allowPoolingConnection", true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultAllowPoolingConnection
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultAllowPoolingConnection
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean replaceNamedDestination(PdfObject obj, HashMap names) {
obj = getPdfObject(obj);
int objIdx = lastXrefPartial;
releaseLastXrefPartial();
if (obj != null && obj.isDictionary()) {
PdfObject ob2 = getPdfObjectRelease(((PdfDictionary)obj).get(PdfName.DEST));
Object name = null;
if (ob2 != null) {
if (ob2.isName())
name = ob2;
else if (ob2.isString())
name = ob2.toString();
PdfArray dest = (PdfArray)names.get(name);
if (dest != null) {
((PdfDictionary)obj).put(PdfName.DEST, dest);
setXrefPartialObject(objIdx, obj);
return true;
}
}
else if ((ob2 = getPdfObject(((PdfDictionary)obj).get(PdfName.A))) != null) {
int obj2Idx = lastXrefPartial;
releaseLastXrefPartial();
PdfDictionary dic = (PdfDictionary)ob2;
PdfName type = (PdfName)getPdfObjectRelease(dic.get(PdfName.S));
if (PdfName.GOTO.equals(type)) {
PdfObject ob3 = getPdfObjectRelease(dic.get(PdfName.D));
if (ob3 != null) {
if (ob3.isName())
name = ob3;
else if (ob3.isString())
name = ob3.toString();
}
PdfArray dest = (PdfArray)names.get(name);
if (dest != null) {
dic.put(PdfName.D, dest);
setXrefPartialObject(obj2Idx, ob2);
setXrefPartialObject(objIdx, obj);
return true;
}
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceNamedDestination
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
replaceNamedDestination
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
static float fixScale(float scale) {
if (scale < 0) scale = 0;
else if (scale > 20) scale = 20;
return Math.abs(scale);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fixScale
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
|
fixScale
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public String getActions() {
return actions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActions
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getActions
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String deCompress(byte[] zipBytes) {
if (zipBytes == null || zipBytes.length == 0)
return null;
GZIPInputStream gzip = null;
ByteArrayInputStream in = null;
ByteArrayOutputStream baos = null;
try {
in = new ByteArrayInputStream(zipBytes);
gzip = new GZIPInputStream(in, 16384); // 16KB
byte[] buffer = new byte[1024];
baos = new ByteArrayOutputStream();
int len = -1;
while ((len = gzip.read(buffer, 0, buffer.length)) != -1) {
baos.write(buffer, 0, len);
}
String newstr = new String(baos.toByteArray(), "UTF-8");
return newstr;
} catch (Exception ex) {
OLogManager.instance().error(this, "Error on decompressing HTTP response", ex);
} finally {
try {
if (gzip != null)
gzip.close();
if (in != null)
in.close();
if (baos != null)
baos.close();
} catch (Exception ex) {
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deCompress
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
deCompress
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private static long getApplicationAccessTokenValidityPeriodInSeconds() {
return OAuthServerConfiguration.getInstance().getApplicationAccessTokenValidityPeriodInSeconds();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationAccessTokenValidityPeriodInSeconds
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
getApplicationAccessTokenValidityPeriodInSeconds
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
protected <T extends SQLDataSetTestBase> T setUp(T test) throws Exception {
test.testSettings = testSettings;
test.conn = conn;
return test;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUp
File: dashbuilder-backend/dashbuilder-dataset-sql/src/test/java/org/dashbuilder/dataprovider/sql/SQLTestSuite.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
setUp
|
dashbuilder-backend/dashbuilder-dataset-sql/src/test/java/org/dashbuilder/dataprovider/sql/SQLTestSuite.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isTopActivityImmersive() {
enforceNotIsolatedCaller("startActivity");
synchronized (this) {
ActivityRecord r = getFocusedStack().topRunningActivityLocked(null);
return (r != null) ? r.immersive : false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTopActivityImmersive
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
isTopActivityImmersive
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String convertImageUriToFilePath(Uri imageUri, Context activity) {
Cursor cursor = null;
String[] proj = {MediaStore.Images.Media.DATA};
cursor = activity.getContentResolver().query(imageUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
String path = cursor.getString(column_index);
cursor.close();
return path;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertImageUriToFilePath
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
|
convertImageUriToFilePath
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setForcedDisplayDensity(int displayId, int density) {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.WRITE_SECURE_SETTINGS) !=
PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Must hold permission " +
android.Manifest.permission.WRITE_SECURE_SETTINGS);
}
if (displayId != Display.DEFAULT_DISPLAY) {
throw new IllegalArgumentException("Can only set the default display");
}
final long ident = Binder.clearCallingIdentity();
try {
synchronized(mWindowMap) {
final DisplayContent displayContent = getDisplayContentLocked(displayId);
if (displayContent != null) {
setForcedDisplayDensityLocked(displayContent, density);
Settings.Global.putString(mContext.getContentResolver(),
Settings.Global.DISPLAY_DENSITY_FORCED, Integer.toString(density));
}
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setForcedDisplayDensity
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
|
setForcedDisplayDensity
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
ActiveAdmin getActiveAdminOrCheckPermissionsForCallerLocked(
@Nullable ComponentName who,
int reqPolicy,
boolean parent,
Set<String> permissions) throws SecurityException {
ensureLocked();
if (parent) {
Preconditions.checkCallingUser(isManagedProfile(getCallerIdentity().getUserId()));
}
ActiveAdmin admin = getActiveAdminOrCheckPermissionsForCallerLocked(
who, reqPolicy, permissions);
return parent ? admin.getParentActiveAdmin() : admin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminOrCheckPermissionsForCallerLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getActiveAdminOrCheckPermissionsForCallerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJsonMime
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
isJsonMime
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private UploadPackageResultDto buildUploadPackageResultDto(PluginPackages pluginPackageEntity) {
UploadPackageResultDto result = new UploadPackageResultDto();
result.setId(pluginPackageEntity.getId());
result.setName(pluginPackageEntity.getName());
result.setStatus(pluginPackageEntity.getStatus());
result.setVersion(pluginPackageEntity.getVersion());
result.setUiPackageIncluded(pluginPackageEntity.getUiPackageIncluded());
result.setEdition(pluginPackageEntity.getEdition());
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildUploadPackageResultDto
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
buildUploadPackageResultDto
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
private void destroySurfaces(boolean cleanupOnResume) {
boolean destroyedSomething = false;
// Copying to a different list as multiple children can be removed.
final ArrayList<WindowState> children = new ArrayList<>(mChildren);
for (int i = children.size() - 1; i >= 0; i--) {
final WindowState win = children.get(i);
destroyedSomething |= win.destroySurface(cleanupOnResume, mAppStopped);
}
if (destroyedSomething) {
final DisplayContent dc = getDisplayContent();
dc.assignWindowLayers(true /*setLayoutNeeded*/);
updateLetterboxSurface(null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroySurfaces
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
destroySurfaces
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getLastBugReportRequestTime() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || canManageUsers(caller));
return getUserData(UserHandle.USER_SYSTEM).mLastBugReportRequestTime;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastBugReportRequestTime
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
|
getLastBugReportRequestTime
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected IssuesWithBLOBs insertIssues(IssuesWithBLOBs issues) {
if (StringUtils.isBlank(issues.getId())) {
issues.setId(UUID.randomUUID().toString());
}
issues.setCreateTime(System.currentTimeMillis());
issues.setUpdateTime(System.currentTimeMillis());
issues.setNum(getNextNum(issues.getProjectId()));
issues.setCreator(SessionUtils.getUserId());
issuesMapper.insert(issues);
return issues;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertIssues
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
insertIssues
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String chooseLockAction = getActivity().getIntent().getAction();
mFingerprintManager = Utils.getFingerprintManagerOrNull(getActivity());
mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
mKeyStore = KeyStore.getInstance();
mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this.getActivity());
mLockPatternUtils = new LockPatternUtils(getActivity());
mIsSetNewPassword = ACTION_SET_NEW_PARENT_PROFILE_PASSWORD.equals(chooseLockAction)
|| ACTION_SET_NEW_PASSWORD.equals(chooseLockAction);
// Defaults to needing to confirm credentials
final boolean confirmCredentials = getActivity().getIntent()
.getBooleanExtra(CONFIRM_CREDENTIALS, true);
if (getActivity() instanceof ChooseLockGeneric.InternalActivity) {
mPasswordConfirmed = !confirmCredentials;
mUserPassword = getActivity().getIntent().getStringExtra(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
mHideDrawer = getActivity().getIntent().getBooleanExtra(EXTRA_HIDE_DRAWER, false);
mHasChallenge = getActivity().getIntent().getBooleanExtra(
ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, false);
mChallenge = getActivity().getIntent().getLongExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE, 0);
mForFingerprint = getActivity().getIntent().getBooleanExtra(
ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT, false);
mForChangeCredRequiredForBoot = getArguments() != null && getArguments().getBoolean(
ChooseLockSettingsHelper.EXTRA_KEY_FOR_CHANGE_CRED_REQUIRED_FOR_BOOT);
mUserManager = UserManager.get(getActivity());
if (savedInstanceState != null) {
mPasswordConfirmed = savedInstanceState.getBoolean(PASSWORD_CONFIRMED);
mWaitingForConfirmation = savedInstanceState.getBoolean(WAITING_FOR_CONFIRMATION);
mEncryptionRequestQuality = savedInstanceState.getInt(ENCRYPT_REQUESTED_QUALITY);
mEncryptionRequestDisabled = savedInstanceState.getBoolean(
ENCRYPT_REQUESTED_DISABLED);
if (mUserPassword == null) {
mUserPassword = savedInstanceState.getString(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
}
// a) If this is started from other user, use that user id.
// b) If this is started from the same user, read the extra if this is launched
// from Settings app itself.
// c) Otherwise, use UserHandle.myUserId().
mUserId = Utils.getSecureTargetUser(
getActivity().getActivityToken(),
UserManager.get(getActivity()),
getArguments(),
getActivity().getIntent().getExtras()).getIdentifier();
mController = new ChooseLockGenericController(getContext(), mUserId);
if (ACTION_SET_NEW_PASSWORD.equals(chooseLockAction)
&& UserManager.get(getActivity()).isManagedProfile(mUserId)
&& mLockPatternUtils.isSeparateProfileChallengeEnabled(mUserId)) {
getActivity().setTitle(R.string.lock_settings_picker_title_profile);
}
mManagedPasswordProvider = ManagedLockPasswordProvider.get(getActivity(), mUserId);
if (mPasswordConfirmed) {
updatePreferencesOrFinish(savedInstanceState != null);
if (mForChangeCredRequiredForBoot) {
maybeEnableEncryption(mLockPatternUtils.getKeyguardStoredPasswordQuality(
mUserId), false);
}
} else if (!mWaitingForConfirmation) {
ChooseLockSettingsHelper helper =
new ChooseLockSettingsHelper(this.getActivity(), this);
boolean managedProfileWithUnifiedLock =
UserManager.get(getActivity()).isManagedProfile(mUserId)
&& !mLockPatternUtils.isSeparateProfileChallengeEnabled(mUserId);
boolean skipConfirmation = managedProfileWithUnifiedLock && !mIsSetNewPassword;
if (skipConfirmation
|| !helper.launchConfirmationActivity(CONFIRM_EXISTING_REQUEST,
getString(R.string.unlock_set_unlock_launch_picker_title), true, mUserId)) {
mPasswordConfirmed = true; // no password set, so no need to confirm
updatePreferencesOrFinish(savedInstanceState != null);
} else {
mWaitingForConfirmation = true;
}
}
addHeaderView();
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2018-9501
- Severity: HIGH
- CVSS Score: 7.2
Description: Disable changing lock when device is not provisioned.
When the device is not yet provisioned and settings is launched:
- disable the entry point for changing device lock
- remove the search panel from settings home page
- remove the search menu
Bug: 110034419
Test: make RunSettingsRoboTests
Change-Id: Ieb7eb0e8699229ec0824ccc19d7b958ac44965a2
Merged-In: Ieb7eb0e8699229ec0824ccc19d7b958ac44965a2
(cherry picked from commit 770f4abf9de2bb7d74497cc4b5f6795023229ef2)
Function: onCreate
File: src/com/android/settings/password/ChooseLockGeneric.java
Repository: android
Fixed Code:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Activity activity = getActivity();
if (!Utils.isDeviceProvisioned(activity) && !canRunBeforeDeviceProvisioned()) {
activity.finish();
return;
}
String chooseLockAction = getActivity().getIntent().getAction();
mFingerprintManager = Utils.getFingerprintManagerOrNull(getActivity());
mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
mKeyStore = KeyStore.getInstance();
mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this.getActivity());
mLockPatternUtils = new LockPatternUtils(getActivity());
mIsSetNewPassword = ACTION_SET_NEW_PARENT_PROFILE_PASSWORD.equals(chooseLockAction)
|| ACTION_SET_NEW_PASSWORD.equals(chooseLockAction);
// Defaults to needing to confirm credentials
final boolean confirmCredentials = getActivity().getIntent()
.getBooleanExtra(CONFIRM_CREDENTIALS, true);
if (getActivity() instanceof ChooseLockGeneric.InternalActivity) {
mPasswordConfirmed = !confirmCredentials;
mUserPassword = getActivity().getIntent().getStringExtra(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
mHideDrawer = getActivity().getIntent().getBooleanExtra(EXTRA_HIDE_DRAWER, false);
mHasChallenge = getActivity().getIntent().getBooleanExtra(
ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, false);
mChallenge = getActivity().getIntent().getLongExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE, 0);
mForFingerprint = getActivity().getIntent().getBooleanExtra(
ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT, false);
mForChangeCredRequiredForBoot = getArguments() != null && getArguments().getBoolean(
ChooseLockSettingsHelper.EXTRA_KEY_FOR_CHANGE_CRED_REQUIRED_FOR_BOOT);
mUserManager = UserManager.get(getActivity());
if (savedInstanceState != null) {
mPasswordConfirmed = savedInstanceState.getBoolean(PASSWORD_CONFIRMED);
mWaitingForConfirmation = savedInstanceState.getBoolean(WAITING_FOR_CONFIRMATION);
mEncryptionRequestQuality = savedInstanceState.getInt(ENCRYPT_REQUESTED_QUALITY);
mEncryptionRequestDisabled = savedInstanceState.getBoolean(
ENCRYPT_REQUESTED_DISABLED);
if (mUserPassword == null) {
mUserPassword = savedInstanceState.getString(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
}
// a) If this is started from other user, use that user id.
// b) If this is started from the same user, read the extra if this is launched
// from Settings app itself.
// c) Otherwise, use UserHandle.myUserId().
mUserId = Utils.getSecureTargetUser(
getActivity().getActivityToken(),
UserManager.get(getActivity()),
getArguments(),
getActivity().getIntent().getExtras()).getIdentifier();
mController = new ChooseLockGenericController(getContext(), mUserId);
if (ACTION_SET_NEW_PASSWORD.equals(chooseLockAction)
&& UserManager.get(getActivity()).isManagedProfile(mUserId)
&& mLockPatternUtils.isSeparateProfileChallengeEnabled(mUserId)) {
getActivity().setTitle(R.string.lock_settings_picker_title_profile);
}
mManagedPasswordProvider = ManagedLockPasswordProvider.get(getActivity(), mUserId);
if (mPasswordConfirmed) {
updatePreferencesOrFinish(savedInstanceState != null);
if (mForChangeCredRequiredForBoot) {
maybeEnableEncryption(mLockPatternUtils.getKeyguardStoredPasswordQuality(
mUserId), false);
}
} else if (!mWaitingForConfirmation) {
ChooseLockSettingsHelper helper =
new ChooseLockSettingsHelper(this.getActivity(), this);
boolean managedProfileWithUnifiedLock =
UserManager.get(getActivity()).isManagedProfile(mUserId)
&& !mLockPatternUtils.isSeparateProfileChallengeEnabled(mUserId);
boolean skipConfirmation = managedProfileWithUnifiedLock && !mIsSetNewPassword;
if (skipConfirmation
|| !helper.launchConfirmationActivity(CONFIRM_EXISTING_REQUEST,
getString(R.string.unlock_set_unlock_launch_picker_title), true, mUserId)) {
mPasswordConfirmed = true; // no password set, so no need to confirm
updatePreferencesOrFinish(savedInstanceState != null);
} else {
mWaitingForConfirmation = true;
}
}
addHeaderView();
}
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
onCreate
|
src/com/android/settings/password/ChooseLockGeneric.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void saveProject(Project project) throws IOException {
ProjectUtilities.save(project);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveProject
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
saveProject
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void copyToClipboard(final Object obj) {
if (getActivity() == null) {
return;
}
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
int sdk = android.os.Build.VERSION.SDK_INT;
if (sdk < 11) {
android.text.ClipboardManager clipboard = (android.text.ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.setText(obj.toString());
} else {
android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
android.content.ClipData clip = ClipData.newPlainText("Codename One", obj.toString());
clipboard.setPrimaryClip(clip);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyToClipboard
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
|
copyToClipboard
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTrafficListener(TrafficListener trafficListener) {
this.trafficListener = trafficListener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTrafficListener
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setTrafficListener
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated
public String getRealLanguage()
{
String lang = getLanguage();
if (lang.equals("")) {
return getDefaultLanguage();
} else {
return lang;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRealLanguage
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
|
getRealLanguage
|
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 readBool() throws TException {
return (readByte() == 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readBool
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readBool
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder defaultHostname(String defaultHostname) {
defaultVirtualHostBuilder.defaultHostname(defaultHostname);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultHostname
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
|
defaultHostname
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public BaseObject getObject(String className, int nb)
{
return getXObject(resolveClassReference(className), nb);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
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
|
getObject
|
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 void onAllChildrenAddedToPage(final boolean postponed) {
// Empty by default.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAllChildrenAddedToPage
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
onAllChildrenAddedToPage
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void renameUser(final String oldName, final String newName) throws Exception {
update();
m_writeLock.lock();
try {
// Get the old data
if (m_users.containsKey(oldName)) {
final User data = m_users.get(oldName);
if (data == null) {
m_users.remove(oldName);
throw new Exception("UserFactory:rename the data contained for old user " + oldName + " is null");
} else {
// Rename the user in the user map.
m_users.remove(oldName);
data.setUserId(newName);
m_users.put(newName, data);
// Refresh the groups config first
m_groupManager.update();
// Rename the user in the group.
m_groupManager.renameUser(oldName, newName);
// Rename the user in the view.
// viewFactory.renameUser(oldName, newName);
}
} else {
throw new Exception("UserFactory:rename the old user name " + oldName + " is not found");
}
_saveCurrent();
} finally {
m_writeLock.unlock();
}
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2021-25931
- Severity: MEDIUM
- CVSS Score: 6.8
Description: NMS-13124: Fixed user deletion by renaming bug and CSRF privilege escalation issue
Function: renameUser
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
Fixed Code:
public void renameUser(final String oldName, final String newName) throws Exception {
update();
m_writeLock.lock();
try {
// Get the old data
if (m_users.containsKey(oldName)) {
final User data = m_users.get(oldName);
if (data == null) {
m_users.remove(oldName);
throw new Exception("UserFactory:rename the data contained for old user " + oldName + " is null");
} else {
if (m_users.containsKey(newName)) {
throw new Exception("UserFactory: cannot rename user " + oldName + ". An user with the given name " + newName + " already exists");
}
// Rename the user in the user map.
m_users.remove(oldName);
data.setUserId(newName);
m_users.put(newName, data);
// Refresh the groups config first
m_groupManager.update();
// Rename the user in the group.
m_groupManager.renameUser(oldName, newName);
// Rename the user in the view.
// viewFactory.renameUser(oldName, newName);
}
} else {
throw new Exception("UserFactory:rename the old user name " + oldName + " is not found");
}
_saveCurrent();
} finally {
m_writeLock.unlock();
}
}
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
renameUser
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setFooterVisible(boolean footerVisible) {
getFooter().setVisible(footerVisible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFooterVisible
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setFooterVisible
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
void insertPage(int pageNum, PRIndirectReference ref) {
--pageNum;
if (refsn != null) {
if (pageNum >= refsn.size())
refsn.add(ref);
else
refsn.add(pageNum, ref);
}
else {
++sizep;
lastPageRead = -1;
if (pageNum >= size()) {
refsp.put(size(), ref.getNumber());
}
else {
IntHashtable refs2 = new IntHashtable((refsp.size() + 1) * 2);
for (Iterator it = refsp.getEntryIterator(); it.hasNext();) {
IntHashtable.Entry entry = (IntHashtable.Entry)it.next();
int p = entry.getKey();
refs2.put(p >= pageNum ? p + 1 : p, entry.getValue());
}
refs2.put(pageNum, ref.getNumber());
refsp = refs2;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertPage
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
insertPage
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toString(int indentFactor) throws JSONException {
return toString(indentFactor, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
toString
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setHeader(final String iHeader) {
headers = iHeader;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHeader
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
setHeader
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if(source == addEmailLink) {
doAddEmail(ureq);
} else if(source instanceof FormLink && source.getUserObject() instanceof IdentityWrapper) {
if(source.getName().startsWith("rm-")) {
for(Iterator<IdentityWrapper> wrapperIt=toValues.iterator(); wrapperIt.hasNext(); ) {
IdentityWrapper wrapper = wrapperIt.next();
if(source.getUserObject().equals(wrapper)) {
wrapperIt.remove();
}
}
}
userListBox.setDirty(true);
}
super.formInnerEvent(ureq, source, event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formInnerEvent
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
formInnerEvent
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected <K, V> NearCacheService<K, V> createNearCacheService(NearCacheConfiguration cfg) {
return NearCacheService.create(cfg, listenerNotifier);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNearCacheService
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
createNearCacheService
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getAllRecordingIds(String path, String[] format) {
List<String> ids = new ArrayList<>();
for (String aFormat : format) {
List<File> recordings = getDirectories(path + File.separatorChar + aFormat);
for (File recording : recordings) {
if (!ids.contains(recording.getName())) {
ids.add(recording.getName());
}
}
}
return ids;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllRecordingIds
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
getAllRecordingIds
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void initXWiki(XWikiConfig config, XWikiContext context, XWikiEngineContext engineContext, boolean noupdate)
throws XWikiException
{
getProgress().pushLevelProgress(4, this);
try {
getProgress().startStep(this);
setDatabase(context.getMainXWiki());
setEngineContext(engineContext);
context.setWiki(this);
// "Pre-initialize" XWikiStubContextProvider with a XWikiContext containing a XWiki instance as soon as
// possible
Utils.<XWikiStubContextProvider>getComponent(XWikiStubContextProvider.class).initialize(context);
// Prepare the store
if (config != null) {
setConfig(config);
}
try {
initializeStores();
} catch (ComponentLookupException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to initialize stores", e);
}
setCriteriaService((XWikiCriteriaService) createClassFromConfig("xwiki.criteria.class",
"com.xpn.xwiki.criteria.impl.XWikiCriteriaServiceImpl", context));
// "Pre-initialize" XWikiStubContextProvider so that rendering engine, plugins or listeners reacting to
// potential document changes can use it
Utils.<XWikiStubContextProvider>getComponent(XWikiStubContextProvider.class).initialize(context);
getProgress().endStep(this);
getProgress().startStep(this);
// Make sure these classes exists
if (noupdate) {
getProgress().pushLevelProgress(2, this);
try {
getProgress().startStep(this);
initializeMandatoryDocuments(context);
getProgress().startStep(this);
getStatsService(context);
} finally {
getProgress().popLevelProgress(this);
}
}
getProgress().endStep(this);
getProgress().startStep(this);
// Prepare the Plugin Engine
preparePlugins(context);
getProgress().endStep(this);
getProgress().startStep(this);
String ro = getConfiguration().getProperty("xwiki.readonly", "no");
this.isReadOnly = ("yes".equalsIgnoreCase(ro) || "true".equalsIgnoreCase(ro) || "1".equalsIgnoreCase(ro));
// Save the configured syntaxes
String syntaxes = getConfiguration().getProperty("xwiki.rendering.syntaxes", "xwiki/1.0");
this.configuredSyntaxes = Arrays.asList(StringUtils.split(syntaxes, " ,"));
getObservationManager().addListener(this);
} finally {
getProgress().popLevelProgress(this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initXWiki
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
|
initXWiki
|
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
protected Class<? extends XWikiForm> getFormClass()
{
return EditForm.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFormClass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-46242
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getFormClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
|
cf8eb861998ea423c3645d2e5e974420b0e882be
| 0
|
Analyze the following code function for security vulnerabilities
|
public static double[] uncompressDoubleArray(byte[] input)
throws IOException
{
return uncompressDoubleArray(input, 0, input.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressDoubleArray
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressDoubleArray
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCheckClassDefErrors() {
return checkClassDefErrors;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCheckClassDefErrors
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
isCheckClassDefErrors
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String processAuthResponse(String authRes, boolean jsonResponse)
{
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processAuthResponse
File: src/main/java/com/mxgraph/online/AbsAuthServlet.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-601",
"CWE-918"
] |
CVE-2022-1767
|
MEDIUM
| 5
|
jgraph/drawio
|
processAuthResponse
|
src/main/java/com/mxgraph/online/AbsAuthServlet.java
|
c63f3a04450f30798df47f9badbc74eb8a69fbdf
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isAccessible(DocumentReference documentReference, XWikiContext context)
{
if (!Utils.getComponent(ContextualAuthorizationManager.class).hasAccess(Right.VIEW, documentReference)) {
LOGGER.debug("[{}] The current user [{}] does not have 'view' rights on the Skin Extension document [{}]",
getName(), context.getUserReference(), documentReference);
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAccessible
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
isAccessible
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean deleteInstalledPackageLI(PackageSetting ps,
boolean deleteCodeAndResources, int flags,
int[] allUserHandles, boolean[] perUserInstalled,
PackageRemovedInfo outInfo, boolean writeSettings) {
if (outInfo != null) {
outInfo.uid = ps.appId;
}
// Delete package data from internal structures and also remove data if flag is set
removePackageDataLI(ps, allUserHandles, perUserInstalled, outInfo, flags, writeSettings);
// Delete application code and resources
if (deleteCodeAndResources && (outInfo != null)) {
outInfo.args = createInstallArgsForExisting(packageFlagsToInstallFlags(ps),
ps.codePathString, ps.resourcePathString, getAppDexInstructionSets(ps));
if (DEBUG_SD_INSTALL) Slog.i(TAG, "args=" + outInfo.args);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteInstalledPackageLI
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
|
deleteInstalledPackageLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void saveDocument(XWikiDocument doc, String comment, XWikiContext context) throws XWikiException
{
saveDocument(doc, comment, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveDocument
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
|
saveDocument
|
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 FilePath[] getModuleRoots(FilePath workspace, AbstractBuild build) {
if (build == null) {
return getModuleRoots(workspace);
}
// TODO: can't I get the build listener here?
TaskListener listener = new LogTaskListener(LOGGER, WARNING);
final EnvVars env;
try {
env = build.getEnvironment(listener);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
final ModuleLocation[] moduleLocations = getLocations();
if (moduleLocations.length > 0) {
FilePath[] moduleRoots = new FilePath[moduleLocations.length];
for (int i = 0; i < moduleLocations.length; i++) {
moduleRoots[i] = _getModuleRoot(workspace, moduleLocations[i].getLocalDir(), env);
}
return moduleRoots;
}
return new FilePath[] { getModuleRoot(workspace, build) };
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleRoots
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getModuleRoots
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addImpl(Headers<? extends K, ? extends V, ?> headers) {
if (headers instanceof DefaultHeaders) {
@SuppressWarnings("unchecked")
final DefaultHeaders<? extends K, ? extends V, T> defaultHeaders =
(DefaultHeaders<? extends K, ? extends V, T>) headers;
HeaderEntry<? extends K, ? extends V> e = defaultHeaders.head.after;
if (defaultHeaders.hashingStrategy == hashingStrategy &&
defaultHeaders.nameValidator == nameValidator) {
// Fastest copy
while (e != defaultHeaders.head) {
add0(e.hash, index(e.hash), e.key, e.value);
e = e.after;
}
} else {
// Fast copy
while (e != defaultHeaders.head) {
add(e.key, e.value);
e = e.after;
}
}
} else {
// Slow copy
for (Entry<? extends K, ? extends V> header : headers) {
add(header.getKey(), header.getValue());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addImpl
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
|
addImpl
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static short getShortSafe(byte[] bytes, int offset) {
if (BIG_ENDIAN_NATIVE_ORDER) {
return (short) (bytes[offset] << 8 | (bytes[offset + 1] & 0xff));
}
return (short) (bytes[offset] & 0xff | (bytes[offset + 1] << 8));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortSafe
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
|
getShortSafe
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;
dumpNoCheck(fd, pw, args);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
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
|
dump
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeTask(int taskId) {
return mActivityTaskManager.removeTask(taskId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTask
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
removeTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject editFile() {
JSONObject array = new JSONObject();
// 读取文件信息
try {
String content = FileManagerUtils.readString(getRealFilePath());
content = FileManagerUtils.encodeContent(content);
array.put("Path", this.get.get("path"));
array.put("Content", content);
array.put("Error", "");
array.put("Code", 0);
} catch (JSONException e) {
this.error("JSONObject error");
} catch (IOException e) {
e.printStackTrace();
}
return array;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: editFile
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
editFile
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void add(int index, BaseObject element)
{
// Check if the index is valid
rangeCheckForAdd(index);
// Move right values
if (index < this.size) {
for (int i = this.size - 1; i >= index; --i) {
put(i + 1, get(i));
}
}
// Insert new value
put(index, element);
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2023-26470
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-19223: Improve xobject memory storage in XWikidocument
* fix List#remove implementation
* override List#clear implementation for performances
Function: add
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void add(int index, BaseObject element)
{
// Check if the index is valid
rangeCheckForAdd(index);
// Shifts right values to the right
if (index < this.size) {
for (int i = this.size - 1; i >= index; --i) {
put(i + 1, get(i));
}
}
// Insert new value
put(index, element);
}
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
add
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java
|
fdfce062642b0ac062da5cda033d25482f4600fa
| 1
|
Analyze the following code function for security vulnerabilities
|
private static boolean isValidLink(PendingIntent pendingIntent, Intent intent) {
if (pendingIntent == null) {
Slog.w(TAG, "isValidLink(): custom description without pending intent");
return false;
}
if (!pendingIntent.isActivity()) {
Slog.w(TAG, "isValidLink(): pending intent not for activity");
return false;
}
if (intent == null) {
Slog.w(TAG, "isValidLink(): no intent");
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidLink
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
isValidLink
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getInt(String key) throws JSONException {
final Object object = this.get(key);
if(object instanceof Number) {
return ((Number)object).intValue();
}
try {
return Integer.parseInt(object.toString());
} catch (Exception e) {
throw wrongValueFormatException(key, "int", object, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInt
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
|
getInt
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
static public boolean postProcessRetrievedFile(
File rawDataDir, File file, ObjectNode fileRecord, ArrayNode fileRecords, final Progress progress) {
String mimeType = JSONUtilities.getString(fileRecord, "declaredMimeType", null);
String contentEncoding = JSONUtilities.getString(fileRecord, "declaredEncoding", null);
InputStream archiveIS = tryOpenAsArchive(file, mimeType, contentEncoding);
if (archiveIS != null) {
try {
if (explodeArchive(rawDataDir, archiveIS, fileRecord, fileRecords, progress)) {
file.delete();
return true;
}
} finally {
try {
archiveIS.close();
} catch (IOException e) {
// TODO: what to do?
}
}
}
InputStream uncompressedIS = tryOpenAsCompressedFile(file, mimeType, contentEncoding);
if (uncompressedIS != null) {
try {
File file2 = uncompressFile(rawDataDir, uncompressedIS, fileRecord, progress);
file.delete();
file = file2;
} catch (IOException e) {
// TODO: what to do?
e.printStackTrace();
} finally {
try {
uncompressedIS.close();
} catch (IOException e) {
// TODO: what to do?
}
}
}
postProcessSingleRetrievedFile(file, fileRecord);
JSONUtilities.append(fileRecords, fileRecord);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postProcessRetrievedFile
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
postProcessRetrievedFile
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
void showLockTaskEscapeMessageLocked(TaskRecord task) {
if (mLockTaskModeTasks.contains(task)) {
mHandler.sendEmptyMessage(SHOW_LOCK_TASK_ESCAPE_MESSAGE_MSG);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showLockTaskEscapeMessageLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
showLockTaskEscapeMessageLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dump(PrintWriter pw, String[] args) {
pw.println("NotificationGutsManager state:");
pw.print(" mKeyToRemoveOnGutsClosed (legacy): ");
pw.println(mKeyToRemoveOnGutsClosed);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
dump
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void disableRenderingEvents()
{
this.contentListener = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disableRenderingEvents
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
disableRenderingEvents
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case CHOOSE_ACCOUNT_REQUEST:
if (resultCode == RESULT_CANCELED) {
setResult(resultCode);
finish();
return;
}
// Go to account setup screen. finish() is called inside mCallback.
addAccount(data.getStringExtra(EXTRA_SELECTED_ACCOUNT));
break;
case ADD_ACCOUNT_REQUEST:
setResult(resultCode);
if (mPendingIntent != null) {
mPendingIntent.cancel();
mPendingIntent = null;
}
finish();
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onActivityResult
File: src/com/android/settings/accounts/AddAccountSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-8609
|
HIGH
| 7.2
|
android
|
onActivityResult
|
src/com/android/settings/accounts/AddAccountSettings.java
|
f5d3e74ecc2b973941d8adbe40c6b23094b5abb7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition notBetween(ComparableFunction<T> from, ComparableFunction<T> to) {
Condition conditionLocal = new BetweenCondition<T>(new NotSelector(selector),
Arrays.asList(selector.generateParameter(from), selector.generateParameter(to)));
return getOnGoingLogicalCondition(conditionLocal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notBetween
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
notBetween
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean bindHeaderAppName(RemoteViews contentView, StandardTemplateParams p,
boolean force) {
if (p.mViewType == StandardTemplateParams.VIEW_TYPE_MINIMIZED && !force) {
// unless the force flag is set, don't show the app name in the minimized state.
return false;
}
if (p.mHeaderless && p.hasTitle()) {
// the headerless template will have the TITLE in this position; return true to
// keep the divider visible between that title and the next text element.
return true;
}
if (p.mHideAppName) {
// The app name is being hidden, so we definitely want to return here.
// Assume that there is a title which will replace it in the header.
return p.hasTitle();
}
contentView.setViewVisibility(R.id.app_name_text, View.VISIBLE);
contentView.setTextViewText(R.id.app_name_text, loadHeaderAppName());
contentView.setTextColor(R.id.app_name_text, getSecondaryTextColor(p));
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindHeaderAppName
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
bindHeaderAppName
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEmpty(Group group) {
// the only fast check available is on epeople...
boolean hasMembers = (!group.getMembers().isEmpty());
if (hasMembers) {
return false;
} else {
// well, groups is never null...
for (Group subGroup : group.getMemberGroups()) {
hasMembers = !isEmpty(subGroup);
if (hasMembers) {
return false;
}
}
return !hasMembers;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEmpty
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
isEmpty
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public com.xpn.xwiki.api.Object addObjectFromRequest() throws XWikiException
{
// Call to getDoc() ensures that we are working on a clone()
com.xpn.xwiki.api.Object obj =
new com.xpn.xwiki.api.Object(getDoc().addXObjectFromRequest(getXWikiContext()), getXWikiContext());
updateAuthor();
return obj;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObjectFromRequest
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
|
addObjectFromRequest
|
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
|
void registerCallback(IBluetoothCallback cb) {
mCallbacks.register(cb);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerCallback
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
registerCallback
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public SecurityRoles getSecurityRoles() {
return securityRoles;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecurityRoles
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
getSecurityRoles
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public NodeOwner getOwner() {
return owner;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOwner
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getOwner
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasDynamicCustomMappings()
{
return getHibernateConfiguration().hasDynamicCustomMappings();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasDynamicCustomMappings
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
|
hasDynamicCustomMappings
|
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 boolean performAccessibilityAction(int action, Bundle arguments) {
if (mAccessibilityInjector.supportsAccessibilityAction(action)) {
return mAccessibilityInjector.performAccessibilityAction(action, arguments);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performAccessibilityAction
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
performAccessibilityAction
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public Builder setDataStoreFactory(DataStoreFactory dataStoreFactory) throws IOException {
return setCredentialDataStore(StoredCredential.getDefaultDataStore(dataStoreFactory));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDataStoreFactory
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
setDataStoreFactory
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final boolean forceStopPackageLocked(String packageName, int appId,
boolean callerWillRestart, boolean purgeCache, boolean doit,
boolean evenPersistent, boolean uninstalling, int userId, String reason) {
int i;
if (userId == UserHandle.USER_ALL && packageName == null) {
Slog.w(TAG, "Can't force stop all processes of all users, that is insane!");
}
if (appId < 0 && packageName != null) {
appId = UserHandle.getAppId(getPackageManagerInternal().getPackageUid(packageName,
MATCH_DEBUG_TRIAGED_MISSING | MATCH_ANY_USER, UserHandle.USER_SYSTEM));
}
boolean didSomething;
if (doit) {
if (packageName != null) {
Slog.i(TAG, "Force stopping " + packageName + " appid=" + appId
+ " user=" + userId + ": " + reason);
} else {
Slog.i(TAG, "Force stopping u" + userId + ": " + reason);
}
mAppErrors.resetProcessCrashTime(packageName == null, appId, userId);
}
synchronized (mProcLock) {
// Notify first that the package is stopped, so its process won't be restarted
// unexpectedly if there is an activity of the package without attached process
// becomes visible when killing its other processes with visible activities.
didSomething = mAtmInternal.onForceStopPackage(
packageName, doit, evenPersistent, userId);
didSomething |= mProcessList.killPackageProcessesLSP(packageName, appId, userId,
ProcessList.INVALID_ADJ, callerWillRestart, false /* allowRestart */, doit,
evenPersistent, true /* setRemoved */, uninstalling,
packageName == null ? ApplicationExitInfo.REASON_USER_STOPPED
: ApplicationExitInfo.REASON_USER_REQUESTED,
ApplicationExitInfo.SUBREASON_FORCE_STOP,
(packageName == null ? ("stop user " + userId) : ("stop " + packageName))
+ " due to " + reason);
}
if (mServices.bringDownDisabledPackageServicesLocked(
packageName, null /* filterByClasses */, userId, evenPersistent, true, doit)) {
if (!doit) {
return true;
}
didSomething = true;
}
if (packageName == null) {
// Remove all sticky broadcasts from this user.
mStickyBroadcasts.remove(userId);
}
ArrayList<ContentProviderRecord> providers = new ArrayList<>();
if (mCpHelper.getProviderMap().collectPackageProvidersLocked(packageName, null, doit,
evenPersistent, userId, providers)) {
if (!doit) {
return true;
}
didSomething = true;
}
for (i = providers.size() - 1; i >= 0; i--) {
mCpHelper.removeDyingProviderLocked(null, providers.get(i), true);
}
// Remove transient permissions granted from/to this package/user
mUgmInternal.removeUriPermissionsForPackage(packageName, userId, false, false);
if (doit) {
for (i = mBroadcastQueues.length - 1; i >= 0; i--) {
didSomething |= mBroadcastQueues[i].cleanupDisabledPackageReceiversLocked(
packageName, null, userId, doit);
}
}
if (packageName == null || uninstalling) {
didSomething |= mPendingIntentController.removePendingIntentsForPackage(
packageName, userId, appId, doit);
}
if (doit) {
if (purgeCache && packageName != null) {
AttributeCache ac = AttributeCache.instance();
if (ac != null) {
ac.removePackage(packageName);
}
}
if (mBooted) {
mAtmInternal.resumeTopActivities(true /* scheduleIdle */);
}
}
return didSomething;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceStopPackageLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
forceStopPackageLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelLockoutReset() {
mAlarmManager.cancel(getLockoutResetIntent());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelLockoutReset
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
|
cancelLockoutReset
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onLaunchAnimationStart(boolean isExpandingFullyAbove) {
setOccluded(true /* occluded */, false /* animate */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLaunchAnimationStart
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onLaunchAnimationStart
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVersion(String version)
{
this.version = version;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVersion
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
|
setVersion
|
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 String getModalTitle() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModalTitle
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
getModalTitle
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPasswordMinimumSymbols(ComponentName who, int length, boolean parent) {
if (!mHasFeature || notSupportedOnAutomotive("setPasswordMinimumSymbols")) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final int userId = mInjector.userHandleGetCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
ensureMinimumQuality(userId, ap, PASSWORD_QUALITY_COMPLEX, "setPasswordMinimumSymbols");
final PasswordPolicy passwordPolicy = ap.mPasswordPolicy;
if (passwordPolicy.symbols != length) {
ap.mPasswordPolicy.symbols = length;
updatePasswordValidityCheckpointLocked(userId, parent);
saveSettingsLocked(userId);
}
logPasswordQualitySetIfSecurityLogEnabled(who, userId, parent, passwordPolicy);
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PASSWORD_MINIMUM_SYMBOLS)
.setAdmin(who)
.setInt(length)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordMinimumSymbols
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
|
setPasswordMinimumSymbols
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void fillNullValues(SQLiteDatabase db) {
ContentValues values = new ContentValues();
values.put(Downloads.Impl.COLUMN_CURRENT_BYTES, 0);
fillNullValuesForColumn(db, values);
values.put(Downloads.Impl.COLUMN_TOTAL_BYTES, -1);
fillNullValuesForColumn(db, values);
values.put(Downloads.Impl.COLUMN_TITLE, "");
fillNullValuesForColumn(db, values);
values.put(Downloads.Impl.COLUMN_DESCRIPTION, "");
fillNullValuesForColumn(db, values);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillNullValues
File: src/com/android/providers/downloads/DownloadProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
fillNullValues
|
src/com/android/providers/downloads/DownloadProvider.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract HttpMessage createInvalidMessage();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInvalidMessage
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
createInvalidMessage
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setBadgeIconType(int icon) {
mN.mBadgeIcon = icon;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBadgeIconType
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setBadgeIconType
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private String objectToString(Map<String, Object> options, Object obj) {
String out = "null";
if (obj != null) {
Map<Class<?>, Object> toString = options.containsKey(Printer.OBJECT_TO_STRING)
? (Map<Class<?>, Object>) options.get(Printer.OBJECT_TO_STRING)
: new HashMap<>();
if (toString.containsKey(obj.getClass())) {
out = (String) engine.execute(toString.get(obj.getClass()), obj);
} else if (objectToString.containsKey(obj.getClass())) {
out = objectToString.get(obj.getClass()).apply(obj);
} else if (obj instanceof Class) {
out = ((Class<?>) obj).getName();
} else if (engine != null) {
out = engine.toString(obj);
} else {
out = obj.toString();
}
}
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: objectToString
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
objectToString
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public Registration addAfterNavigationListener(
AfterNavigationListener listener) {
return addListener(AfterNavigationHandler.class, listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAfterNavigationListener
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
addAfterNavigationListener
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void uploadNewFile(
Context context,
Account account,
String[] localPaths,
String[] remotePaths,
String[] mimeTypes,
Integer behaviour,
Boolean createRemoteFolder,
int createdBy,
boolean requiresWifi,
boolean requiresCharging,
NameCollisionPolicy nameCollisionPolicy
) {
Intent intent = new Intent(context, FileUploader.class);
intent.putExtra(FileUploader.KEY_ACCOUNT, account);
intent.putExtra(FileUploader.KEY_LOCAL_FILE, localPaths);
intent.putExtra(FileUploader.KEY_REMOTE_FILE, remotePaths);
intent.putExtra(FileUploader.KEY_MIME_TYPE, mimeTypes);
intent.putExtra(FileUploader.KEY_LOCAL_BEHAVIOUR, behaviour);
intent.putExtra(FileUploader.KEY_CREATE_REMOTE_FOLDER, createRemoteFolder);
intent.putExtra(FileUploader.KEY_CREATED_BY, createdBy);
intent.putExtra(FileUploader.KEY_WHILE_ON_WIFI_ONLY, requiresWifi);
intent.putExtra(FileUploader.KEY_WHILE_CHARGING_ONLY, requiresCharging);
intent.putExtra(FileUploader.KEY_NAME_COLLISION_POLICY, nameCollisionPolicy);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startForegroundService(intent);
} else {
context.startService(intent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uploadNewFile
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
uploadNewFile
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public static User findByEmail(String email) {
if (email == null || email.isEmpty())
return null;
String emailNormalized = WebUtils.validateAndNormalizeEmailAddr(email);
if (emailNormalized == null)
return null;
return Database.findOneById(User.class, email);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByEmail
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
findByEmail
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Item> getAllItems() {
return getAllItems(Item.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllItems
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
|
getAllItems
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@SneakyThrows
private void addLoginsSpecification(String tenantName) {
String specificationName = applicationProperties.getTenantLoginPropertiesName();
InputStream in = new ClassPathResource(Constants.DEFAULT_LOGINS_CONFIG_PATH).getInputStream();
String specification = IOUtils.toString(in, UTF_8);
tenantConfigRepository.updateConfig(tenantName, "/" + specificationName, specification);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLoginsSpecification
File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
Repository: xm-online/xm-uaa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15557
|
HIGH
| 7.5
|
xm-online/xm-uaa
|
addLoginsSpecification
|
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
|
bd235434f119c67090952e08fc28abe41aea2e2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SuppressWarnings("deprecation")
boolean check(MapConfig c1, MapConfig c2) {
if (c1 == c2) {
return true;
}
if (c1 == null || c2 == null) {
return false;
}
int maxSize1 = c1.getMaxSizeConfig().getSize();
int maxSize2 = c2.getMaxSizeConfig().getSize();
return nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.getInMemoryFormat(), c2.getInMemoryFormat())
&& nullSafeEqual(c1.isStatisticsEnabled(), c2.isStatisticsEnabled())
&& nullSafeEqual(c1.isOptimizeQueries(), c2.isOptimizeQueries())
&& nullSafeEqual(c1.getCacheDeserializedValues(), c2.getCacheDeserializedValues())
&& nullSafeEqual(c1.getBackupCount(), c2.getBackupCount())
&& nullSafeEqual(c1.getAsyncBackupCount(), c2.getAsyncBackupCount())
&& nullSafeEqual(c1.getTimeToLiveSeconds(), c2.getTimeToLiveSeconds())
&& nullSafeEqual(c1.getMaxIdleSeconds(), c2.getMaxIdleSeconds())
&& nullSafeEqual(c1.getEvictionPolicy(), c2.getEvictionPolicy())
&& (nullSafeEqual(maxSize1, maxSize2)
|| (Math.min(maxSize1, maxSize2) == 0 && Math.max(maxSize1, maxSize2) == Integer.MAX_VALUE))
&& nullSafeEqual(c1.getEvictionPercentage(), c2.getEvictionPercentage())
&& nullSafeEqual(c1.getMinEvictionCheckMillis(), c2.getMinEvictionCheckMillis())
&& ConfigCompatibilityChecker.isCompatible(c1.getMergePolicyConfig(), c2.getMergePolicyConfig())
&& nullSafeEqual(c1.isReadBackupData(), c2.isReadBackupData())
&& ConfigCompatibilityChecker.isCompatible(c1.getHotRestartConfig(), c2.getHotRestartConfig())
&& isCompatible(c1.getMapStoreConfig(), c2.getMapStoreConfig())
&& isCompatible(c1.getNearCacheConfig(), c2.getNearCacheConfig())
&& isCompatible(c1.getWanReplicationRef(), c2.getWanReplicationRef())
&& isCollectionCompatible(c1.getMapIndexConfigs(), c2.getMapIndexConfigs(), new MapIndexConfigChecker())
&& isCollectionCompatible(c1.getMapAttributeConfigs(), c2.getMapAttributeConfigs(),
new MapAttributeConfigChecker())
&& isCollectionCompatible(c1.getEntryListenerConfigs(), c2.getEntryListenerConfigs(),
new EntryListenerConfigChecker())
&& nullSafeEqual(c1.getPartitionLostListenerConfigs(), c2.getPartitionLostListenerConfigs())
&& nullSafeEqual(c1.getQuorumName(), c2.getQuorumName())
&& nullSafeEqual(c1.getPartitioningStrategyConfig(), c2.getPartitioningStrategyConfig());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PropertiesRequest getRequestedFields( InputStream in ) {
final Set<QName> set = new LinkedHashSet<QName>();
try {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
StreamUtils.readTo( in, bout, false, true );
byte[] arr = bout.toByteArray();
if( arr.length > 1 ) {
ByteArrayInputStream bin = new ByteArrayInputStream( arr );
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
PropFindSaxHandler handler = new PropFindSaxHandler();
reader.setContentHandler( handler );
try {
reader.parse( new InputSource( bin ) );
if( handler.isAllProp() ) {
return new PropertiesRequest();
} else {
set.addAll( handler.getAttributes().keySet() );
}
} catch( IOException e ) {
log.warn( "exception parsing request body", e );
// ignore
} catch( SAXException e ) {
log.warn( "exception parsing request body", e );
// ignore
}
}
} catch( Exception ex ) {
// There's a report of an exception being thrown here by IT Hit Webdav client
// Perhaps we can just log the error and return an empty set. Usually this
// class is wrapped by the MsPropFindRequestFieldParser which will use a default
// set of properties if this returns an empty set
log.warn("Exception parsing PROPFIND request fields. Returning empty property set", ex);
//throw new RuntimeException( ex );
}
return PropertiesRequest.toProperties(set);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2015-7326
- Severity: HIGH
- CVSS Score: 7.5
Description: patch XXE vulnerability
Function: getRequestedFields
File: milton-server-ce/src/main/java/io/milton/http/webdav/DefaultPropFindRequestFieldParser.java
Repository: miltonio/milton2
Fixed Code:
@Override
public PropertiesRequest getRequestedFields( InputStream in ) {
final Set<QName> set = new LinkedHashSet<QName>();
try {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
StreamUtils.readTo( in, bout, false, true );
byte[] arr = bout.toByteArray();
if( arr.length > 1 ) {
ByteArrayInputStream bin = new ByteArrayInputStream( arr );
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
// https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
PropFindSaxHandler handler = new PropFindSaxHandler();
reader.setContentHandler( handler );
try {
reader.parse( new InputSource( bin ) );
if( handler.isAllProp() ) {
return new PropertiesRequest();
} else {
set.addAll( handler.getAttributes().keySet() );
}
} catch( IOException e ) {
log.warn( "exception parsing request body", e );
// ignore
} catch( SAXException e ) {
log.warn( "exception parsing request body", e );
// ignore
}
}
} catch( Exception ex ) {
// There's a report of an exception being thrown here by IT Hit Webdav client
// Perhaps we can just log the error and return an empty set. Usually this
// class is wrapped by the MsPropFindRequestFieldParser which will use a default
// set of properties if this returns an empty set
log.warn("Exception parsing PROPFIND request fields. Returning empty property set", ex);
//throw new RuntimeException( ex );
}
return PropertiesRequest.toProperties(set);
}
|
[
"CWE-611"
] |
CVE-2015-7326
|
HIGH
| 7.5
|
miltonio/milton2
|
getRequestedFields
|
milton-server-ce/src/main/java/io/milton/http/webdav/DefaultPropFindRequestFieldParser.java
|
5f81b0c48a817d4337d8b0e99ea0b4744ecd720b
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isEncryptionMethodZipStandard(LocalFileHeader localFileHeader) {
return localFileHeader.isEncrypted() && EncryptionMethod.ZIP_STANDARD.equals(localFileHeader.getEncryptionMethod());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEncryptionMethodZipStandard
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
|
isEncryptionMethodZipStandard
|
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initGlobalSettingsDefaultValForWearLocked(String key, boolean val) {
initGlobalSettingsDefaultValForWearLocked(key, val ? "1" : "0");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initGlobalSettingsDefaultValForWearLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
initGlobalSettingsDefaultValForWearLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerIndex(Integer serverIndex) {
this.serverIndex = serverIndex;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerIndex
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setServerIndex
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void handleStartedWakingUp() {
updateFingerprintListeningState();
final int count = mCallbacks.size();
for (int i = 0; i < count; i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onStartedWakingUp();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleStartedWakingUp
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleStartedWakingUp
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isCompatible(Set<PermissionConfig> c1, Set<PermissionConfig> c2) {
if (c1 == c2) {
return true;
}
if (c1 == null || c2 == null || c1.size() != c2.size()) {
return false;
}
List<PermissionConfig> configs1 = asList(c1.toArray());
List<PermissionConfig> configs2 = asList(c2.toArray());
for (PermissionConfig a : configs1) {
if (!configs2.contains(a)) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatible
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
|
isCompatible
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public URI getWebhookUrl() {
return webhookUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWebhookUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getWebhookUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public static MappedByteBuffer map(File file, MapMode mode) throws IOException {
return mapInternal(file, mode, -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: map
File: android/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
|
map
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
void startPackageOneTimeSession(@NonNull String packageName, long timeoutMillis,
long revokeAfterKilledDelayMillis, int importanceToResetTimer,
int importanceToKeepSessionAlive) {
int uid;
try {
uid = mContext.getPackageManager().getPackageUid(packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
Log.e(LOG_TAG, "Unknown package name " + packageName, e);
return;
}
synchronized (mLock) {
PackageInactivityListener listener = mListeners.get(uid);
if (listener != null) {
listener.updateSessionParameters(timeoutMillis, revokeAfterKilledDelayMillis,
importanceToResetTimer, importanceToKeepSessionAlive);
return;
}
listener = new PackageInactivityListener(uid, packageName, timeoutMillis,
revokeAfterKilledDelayMillis, importanceToResetTimer,
importanceToKeepSessionAlive);
mListeners.put(uid, listener);
}
}
|
Vulnerability Classification:
- CWE: CWE-281
- CVE: CVE-2023-21249
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Watch uid proc state instead of importance for 1-time permissions
The system process may bind to an app with the flag
BIND_FOREGROUND_SERVICE, this will put the client in the foreground
service importance level without the normal requirement that foreground
services must show a notification. Looking at proc states instead allows
us to differentiate between these two levels of foreground service and
revoke the client when not in use.
This change makes the parameters `importanceToResetTimer` and
`importanceToKeepSessionAlive` in PermissionManager#startOneTimePermissionSession
obsolete.
Test: atest CtsPermissionTestCases + manual testing with mic/cam/loc
Bug: 217981062
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0be78fbbf7d92bf29858aa0c48b171045ab5057f)
Merged-In: I7a725647c001062d1a76a82b680a02e3e2edcb03
Change-Id: I7a725647c001062d1a76a82b680a02e3e2edcb03
Function: startPackageOneTimeSession
File: services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
Repository: android
Fixed Code:
void startPackageOneTimeSession(@NonNull String packageName, long timeoutMillis,
long revokeAfterKilledDelayMillis) {
int uid;
try {
uid = mContext.getPackageManager().getPackageUid(packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
Log.e(LOG_TAG, "Unknown package name " + packageName, e);
return;
}
synchronized (mLock) {
PackageInactivityListener listener = mListeners.get(uid);
if (listener != null) {
listener.updateSessionParameters(timeoutMillis, revokeAfterKilledDelayMillis);
return;
}
listener = new PackageInactivityListener(uid, packageName, timeoutMillis,
revokeAfterKilledDelayMillis);
mListeners.put(uid, listener);
}
}
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
startPackageOneTimeSession
|
services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean setCenter(float centerX, float centerY, boolean animate) {
final IAccessibilityServiceConnection connection =
AccessibilityInteractionClient.getInstance().getConnection(
mService.mConnectionId);
if (connection != null) {
try {
return connection.setMagnificationScaleAndCenter(
Float.NaN, centerX, centerY, animate);
} catch (RemoteException re) {
Log.w(LOG_TAG, "Failed to set center", re);
re.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCenter
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
setCenter
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M2")
public BaseObject updateObjectFromRequest(String className, String prefix, XWikiContext context)
throws XWikiException
{
return updateObjectFromRequest(className, prefix, 0, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObjectFromRequest
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
|
updateObjectFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkGetAccountsPermission(String packageName, int userId) {
return isPermittedForPackage(packageName, userId, Manifest.permission.GET_ACCOUNTS,
Manifest.permission.GET_ACCOUNTS_PRIVILEGED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkGetAccountsPermission
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
checkGetAccountsPermission
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getScript() {
return theScript == null ? "" : theScript;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScript
File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
Repository: geosolutions-it/jai-ext
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-24816
|
HIGH
| 7.5
|
geosolutions-it/jai-ext
|
getScript
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void broadcastIntentToManifestReceivers(
Intent intent, UserHandle parentHandle, boolean requiresPermission) {
Objects.requireNonNull(intent);
Objects.requireNonNull(parentHandle);
Slogf.i(LOG_TAG, "Sending %s broadcast to manifest receivers.", intent.getAction());
broadcastIntentToCrossProfileManifestReceivers(
intent, parentHandle, requiresPermission);
broadcastIntentToDevicePolicyManagerRoleHolder(intent, parentHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastIntentToManifestReceivers
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
|
broadcastIntentToManifestReceivers
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyForSettingsChange(int key, String name) {
final int userId = getUserIdFromKey(key);
Uri uri = getNotificationUriFor(key, name);
mGenerationRegistry.incrementGeneration(key);
mHandler.obtainMessage(MyHandler.MSG_NOTIFY_URI_CHANGED,
userId, 0, uri).sendToTarget();
if (isSecureSettingsKey(key)) {
maybeNotifyProfiles(getTypeFromKey(key), userId, uri, name,
sSecureCloneToManagedSettings);
} else if (isSystemSettingsKey(key)) {
maybeNotifyProfiles(getTypeFromKey(key), userId, uri, name,
sSystemCloneToManagedSettings);
}
mHandler.obtainMessage(MyHandler.MSG_NOTIFY_DATA_CHANGED).sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyForSettingsChange
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
|
notifyForSettingsChange
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> Queue<T> newMpscQueue() {
return Mpsc.newMpscQueue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newMpscQueue
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
|
newMpscQueue
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.