instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
try {
String name = desc.getName();
return Class.forName(name, false, classLoader);
} catch (ClassNotFoundException e) {
return super.resolveClass(desc);
}
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2023-42809
- Severity: HIGH
- CVSS Score: 8.8
Description: Feature - allowedClasses setting added to SerializationCodec https://github.com/redisson/redisson/security/code-scanning/4
Function: resolveClass
File: redisson/src/main/java/org/redisson/codec/CustomObjectInputStream.java
Repository: redisson
Fixed Code:
@Override
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
try {
String name = desc.getName();
if (allowedClasses != null && !allowedClasses.contains(name)) {
throw new InvalidClassException("Class " + name + " isn't allowed");
}
return Class.forName(name, false, classLoader);
} catch (ClassNotFoundException e) {
return super.resolveClass(desc);
}
}
|
[
"CWE-502"
] |
CVE-2023-42809
|
HIGH
| 8.8
|
redisson
|
resolveClass
|
redisson/src/main/java/org/redisson/codec/CustomObjectInputStream.java
|
fe6a2571801656ff1599ef87bdee20f519a5d1fe
| 1
|
Analyze the following code function for security vulnerabilities
|
void setProfileApp(ApplicationInfo app, String processName, ProfilerInfo profilerInfo) {
synchronized (this) {
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
if (!isDebuggable) {
if ((app.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + app.packageName);
}
}
mProfileApp = processName;
if (mProfilerInfo != null) {
if (mProfilerInfo.profileFd != null) {
try {
mProfilerInfo.profileFd.close();
} catch (IOException e) {
}
}
}
mProfilerInfo = new ProfilerInfo(profilerInfo);
mProfileType = 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileApp
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
setProfileApp
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setSortOrder(List<SortOrder> order, boolean userOriginated)
throws IllegalStateException, IllegalArgumentException {
if (!(getContainerDataSource() instanceof Container.Sortable)) {
throw new IllegalStateException(
"Attached container is not sortable (does not implement Container.Sortable)");
}
if (order == null) {
throw new IllegalArgumentException("Order list may not be null!");
}
sortOrder.clear();
Collection<?> sortableProps = ((Container.Sortable) getContainerDataSource())
.getSortableContainerPropertyIds();
for (SortOrder o : order) {
if (!sortableProps.contains(o.getPropertyId())) {
throw new IllegalArgumentException("Property "
+ o.getPropertyId()
+ " does not exist or is not sortable in the current container");
}
}
sortOrder.addAll(order);
sort(userOriginated);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSortOrder
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
|
setSortOrder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doPreUpdateChecks(String storedAppName, ServiceProvider updatedApp, String tenantDomain,
String username) throws IdentityApplicationManagementException {
String updatedAppName = updatedApp.getApplicationName();
validateAuthorization(updatedAppName, storedAppName, username, tenantDomain);
validateAppName(storedAppName, updatedApp, tenantDomain);
validateApplicationCertificate(updatedApp, tenantDomain);
// Will be supported with 'Advance Consent Management Feature'.
// validateConsentPurposes(serviceProvider);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doPreUpdateChecks
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
doPreUpdateChecks
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
void update(int duration) {
this.duration = duration;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
update
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelSync(Account account, String authority, ComponentName cname) {
cancelSyncAsUser(account, authority, cname, UserHandle.getCallingUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelSync
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
cancelSync
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected File getShortcutPackageItemFile() {
final File path = new File(mShortcutUser.mService.injectUserDataPath(
mShortcutUser.getUserId()), ShortcutUser.DIRECTORY_PACKAGES);
final String fileName = getPackageName() + ".xml";
return new File(path, fileName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutPackageItemFile
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
getShortcutPackageItemFile
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private static NetworkInfo makeNetworkInfo(DetailedState networkAgentState) {
final NetworkInfo ni = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, NETWORKTYPE, "");
ni.setDetailedState(networkAgentState, null, null);
return ni;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeNetworkInfo
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
makeNetworkInfo
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public Component getActiveDragSourceComponent() {
return activeDragSourceComponent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveDragSourceComponent
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
|
getActiveDragSourceComponent
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public Icon getShortcutIcon() {
return mShortcutIcon;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutIcon
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getShortcutIcon
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
void setAllowOthers(boolean b) {
if (b) {
key = null;
}
allowOthers = b;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowOthers
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
setAllowOthers
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean containsBoolean(K name, boolean value) {
return contains(name, fromBoolean(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsBoolean
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
|
containsBoolean
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long queryNumEntries(SQLiteDatabase db, String table, String selection) {
return queryNumEntries(db, table, selection, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryNumEntries
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
queryNumEntries
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private JSONArray buildQuickFilterItems(String quickFields) {
Set<String> usesFields = ParseHelper.buildQuickFields(rootEntity, quickFields);
JSONArray items = new JSONArray();
for (String field : usesFields) {
items.add(JSON.parseObject("{ op:'LK', value:'{1}', field:'" + field + "' }"));
}
return items;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildQuickFilterItems
File: src/main/java/com/rebuild/core/service/query/AdvFilterParser.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
buildQuickFilterItems
|
src/main/java/com/rebuild/core/service/query/AdvFilterParser.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getUuid() {
return myUuid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUuid
File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
getUuid
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveResponseBodyToHtml(File file, String copy) {
if (copy != null) {
byte[] bytes = copy.getBytes(StandardCharsets.UTF_8);
FileUtils.tryResizeDiskSpace(CACHE_HTML_PATH + Constants.getArticleUri(), bytes.length, Constants.getMaxCacheHtmlSize());
if (!file.exists()) {
file.getParentFile().mkdirs();
}
IOUtil.writeBytesToFile(bytes, file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveResponseBodyToHtml
File: web/src/main/java/com/zrlog/web/handler/GlobalResourceHandler.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
saveResponseBodyToHtml
|
web/src/main/java/com/zrlog/web/handler/GlobalResourceHandler.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void scrollBy(int xPix, int yPix) {
if (mNativeContentViewCore != 0) {
nativeScrollBy(mNativeContentViewCore,
SystemClock.uptimeMillis(), 0, 0, xPix, yPix);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scrollBy
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
|
scrollBy
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUrl(URI url) {
this.url = url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/PagerdutyNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/PagerdutyNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String keyToString(int key) {
return SettingsState.keyToString(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyToString
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
|
keyToString
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeUriPermissionIfNeededLocked(UriPermission perm) {
if (perm.modeFlags == 0) {
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(
perm.targetUid);
if (perms != null) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG,
"Removing " + perm.targetUid + " permission to " + perm.uri);
perms.remove(perm.uri);
if (perms.isEmpty()) {
mGrantedUriPermissions.remove(perm.targetUid);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUriPermissionIfNeededLocked
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
|
removeUriPermissionIfNeededLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void syncProgressFromCache() {
database.updateProgress(model.getId(), model.getSoFar());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncProgressFromCache
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
syncProgressFromCache
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int stopUserWithDelayedLocking(final int userId, boolean force,
final IStopUserCallback callback) {
return mUserController.stopUser(userId, force, /* allowDelayedLocking= */ true,
/* callback= */ callback, /* keyEvictedCallback= */ null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopUserWithDelayedLocking
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
|
stopUserWithDelayedLocking
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRenewal() {
return renewal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRenewal
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
|
isRenewal
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private String truncate4nanorc(String obj) {
String val = obj;
if (val.length() > NANORC_MAX_STRING_LENGTH && !val.contains("\n")) {
val = val.substring(0, NANORC_MAX_STRING_LENGTH - 1);
}
return val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: truncate4nanorc
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
|
truncate4nanorc
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void replaceNonSystemPackageLI(PackageParser.Package deletedPackage,
PackageParser.Package pkg, int parseFlags, int scanFlags, UserHandle user,
int[] allUsers, boolean[] perUserInstalled, String installerPackageName,
String volumeUuid, PackageInstalledInfo res) {
String pkgName = deletedPackage.packageName;
boolean deletedPkg = true;
boolean updatedSettings = false;
if (DEBUG_INSTALL) Slog.d(TAG, "replaceNonSystemPackageLI: new=" + pkg + ", old="
+ deletedPackage);
long origUpdateTime;
if (pkg.mExtras != null) {
origUpdateTime = ((PackageSetting)pkg.mExtras).lastUpdateTime;
} else {
origUpdateTime = 0;
}
// First delete the existing package while retaining the data directory
if (!deletePackageLI(pkgName, null, true, null, null, PackageManager.DELETE_KEEP_DATA,
res.removedInfo, true)) {
// If the existing package wasn't successfully deleted
res.setError(INSTALL_FAILED_REPLACE_COULDNT_DELETE, "replaceNonSystemPackageLI");
deletedPkg = false;
} else {
// Successfully deleted the old package; proceed with replace.
// If deleted package lived in a container, give users a chance to
// relinquish resources before killing.
if (deletedPackage.isForwardLocked() || isExternal(deletedPackage)) {
if (DEBUG_INSTALL) {
Slog.i(TAG, "upgrading pkg " + deletedPackage + " is ASEC-hosted -> UNAVAILABLE");
}
final int[] uidArray = new int[] { deletedPackage.applicationInfo.uid };
final ArrayList<String> pkgList = new ArrayList<String>(1);
pkgList.add(deletedPackage.applicationInfo.packageName);
sendResourcesChangedBroadcast(false, true, pkgList, uidArray, null);
}
deleteCodeCacheDirsLI(pkg.volumeUuid, pkgName);
try {
final PackageParser.Package newPackage = scanPackageLI(pkg, parseFlags,
scanFlags | SCAN_UPDATE_TIME, System.currentTimeMillis(), user);
updateSettingsLI(newPackage, installerPackageName, volumeUuid, allUsers,
perUserInstalled, res, user);
updatedSettings = true;
} catch (PackageManagerException e) {
res.setError("Package couldn't be installed in " + pkg.codePath, e);
}
}
if (res.returnCode != PackageManager.INSTALL_SUCCEEDED) {
// remove package from internal structures. Note that we want deletePackageX to
// delete the package data and cache directories that it created in
// scanPackageLocked, unless those directories existed before we even tried to
// install.
if(updatedSettings) {
if (DEBUG_INSTALL) Slog.d(TAG, "Install failed, rolling pack: " + pkgName);
deletePackageLI(
pkgName, null, true, allUsers, perUserInstalled,
PackageManager.DELETE_KEEP_DATA,
res.removedInfo, true);
}
// Since we failed to install the new package we need to restore the old
// package that we deleted.
if (deletedPkg) {
if (DEBUG_INSTALL) Slog.d(TAG, "Install failed, reinstalling: " + deletedPackage);
File restoreFile = new File(deletedPackage.codePath);
// Parse old package
boolean oldExternal = isExternal(deletedPackage);
int oldParseFlags = mDefParseFlags | PackageParser.PARSE_CHATTY |
(deletedPackage.isForwardLocked() ? PackageParser.PARSE_FORWARD_LOCK : 0) |
(oldExternal ? PackageParser.PARSE_EXTERNAL_STORAGE : 0);
int oldScanFlags = SCAN_UPDATE_SIGNATURE | SCAN_UPDATE_TIME;
try {
scanPackageLI(restoreFile, oldParseFlags, oldScanFlags, origUpdateTime, null);
} catch (PackageManagerException e) {
Slog.e(TAG, "Failed to restore package : " + pkgName + " after failed upgrade: "
+ e.getMessage());
return;
}
// Restore of old package succeeded. Update permissions.
// writer
synchronized (mPackages) {
updatePermissionsLPw(deletedPackage.packageName, deletedPackage,
UPDATE_PERMISSIONS_ALL);
// can downgrade to reader
mSettings.writeLPr();
}
Slog.i(TAG, "Successfully restored package : " + pkgName + " after failed upgrade");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceNonSystemPackageLI
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
|
replaceNonSystemPackageLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void init(Config.Scope config) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
init
|
services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayPrettyName(String fieldname, boolean showMandatory, Object obj)
{
if (obj == null) {
return "";
}
return this.doc.displayPrettyName(fieldname, showMandatory, obj.getBaseObject(), getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayPrettyName
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
|
displayPrettyName
|
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
|
ArrayList<ProcessRecord> collectProcesses(PrintWriter pw, int start, boolean allPkgs,
String[] args) {
ArrayList<ProcessRecord> procs;
synchronized (this) {
if (args != null && args.length > start
&& args[start].charAt(0) != '-') {
procs = new ArrayList<ProcessRecord>();
int pid = -1;
try {
pid = Integer.parseInt(args[start]);
} catch (NumberFormatException e) {
}
for (int i=mLruProcesses.size()-1; i>=0; i--) {
ProcessRecord proc = mLruProcesses.get(i);
if (proc.pid > 0 && proc.pid == pid) {
procs.add(proc);
} else if (allPkgs && proc.pkgList != null
&& proc.pkgList.containsKey(args[start])) {
procs.add(proc);
} else if (proc.processName.equals(args[start])) {
procs.add(proc);
}
}
if (procs.size() <= 0) {
return null;
}
} else {
procs = new ArrayList<ProcessRecord>(mLruProcesses);
}
}
return procs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectProcesses
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
collectProcesses
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
void seamlesslyRotateIfAllowed(Transaction transaction, @Rotation int oldRotation,
@Rotation int rotation, boolean requested) {
// Invisible windows and the wallpaper do not participate in the seamless rotation animation
if (!isVisibleNow() || mIsWallpaper) {
return;
}
if (mToken.hasFixedRotationTransform()) {
// The transform of its surface is handled by fixed rotation.
return;
}
final Task task = getTask();
if (task != null && task.inPinnedWindowingMode()) {
// It is handled by PinnedTaskController. Note that the windowing mode of activity
// and windows may still be fullscreen.
return;
}
if (mPendingSeamlessRotate != null) {
oldRotation = mPendingSeamlessRotate.getOldRotation();
}
// Skip performing seamless rotation when the controlled insets is IME with visible state.
if (mControllableInsetProvider != null
&& mControllableInsetProvider.getSource().getType() == ITYPE_IME) {
return;
}
if (mForceSeamlesslyRotate || requested) {
if (mControllableInsetProvider != null) {
mControllableInsetProvider.startSeamlessRotation();
}
mPendingSeamlessRotate = new SeamlessRotator(oldRotation, rotation, getDisplayInfo(),
false /* applyFixedTransformationHint */);
// The surface position is going to be unrotated according to the last position.
// Make sure the source position is up-to-date.
mLastSurfacePosition.set(mSurfacePosition.x, mSurfacePosition.y);
mPendingSeamlessRotate.unrotate(transaction, this);
getDisplayContent().getDisplayRotation().markForSeamlessRotation(this,
true /* seamlesslyRotated */);
applyWithNextDraw(mSeamlessRotationFinishedConsumer);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: seamlesslyRotateIfAllowed
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
seamlesslyRotateIfAllowed
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addStatusBarWindow() {
makeStatusBarView();
mStatusBarWindowManager = Dependency.get(StatusBarWindowManager.class);
mRemoteInputController = new RemoteInputController(mHeadsUpManager);
mStatusBarWindowManager.add(mStatusBarWindow, getStatusBarHeight());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addStatusBarWindow
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
addStatusBarWindow
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setRoleGenerator(String rgName) {
logger
.warn("Option 'roleGenerator' is deprecated and should not be used. This configuration is now set in picketlink.xml.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRoleGenerator
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
setRoleGenerator
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAttachmentList(List<XWikiAttachment> list)
{
// For backwards compatibility reasons (and in general), we need to allow callers to do something like
// setAttachmentList(getAttachmentList())
if (this.attachmentList != list) {
this.attachmentList.clear();
this.attachmentList.addAll(list);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttachmentList
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
|
setAttachmentList
|
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
|
@SuppressWarnings("unchecked")
@Override // since 2.9 (to support deep merge)
public Object deserialize(JsonParser p, DeserializationContext ctxt, Object intoValue)
throws IOException
{
if (_nonMerging) {
return deserialize(p, ctxt);
}
switch (p.currentTokenId()) {
case JsonTokenId.ID_END_OBJECT:
case JsonTokenId.ID_END_ARRAY:
return intoValue;
case JsonTokenId.ID_START_OBJECT:
{
JsonToken t = p.nextToken(); // to get to FIELD_NAME or END_OBJECT
if (t == JsonToken.END_OBJECT) {
return intoValue;
}
}
case JsonTokenId.ID_FIELD_NAME:
if (intoValue instanceof Map<?,?>) {
Map<Object,Object> m = (Map<Object,Object>) intoValue;
// NOTE: we are guaranteed to point to FIELD_NAME
String key = p.currentName();
do {
p.nextToken();
// and possibly recursive merge here
Object old = m.get(key);
Object newV;
if (old != null) {
newV = deserialize(p, ctxt, old);
} else {
newV = deserialize(p, ctxt);
}
if (newV != old) {
m.put(key, newV);
}
} while ((key = p.nextFieldName()) != null);
return intoValue;
}
break;
case JsonTokenId.ID_START_ARRAY:
{
JsonToken t = p.nextToken(); // to get to FIELD_NAME or END_OBJECT
if (t == JsonToken.END_ARRAY) {
return intoValue;
}
}
if (intoValue instanceof Collection<?>) {
Collection<Object> c = (Collection<Object>) intoValue;
// NOTE: merge for arrays/Collections means append, can't merge contents
do {
c.add(deserialize(p, ctxt));
} while (p.nextToken() != JsonToken.END_ARRAY);
return intoValue;
}
// 21-Apr-2017, tatu: Should we try to support merging of Object[] values too?
// ... maybe future improvement
break;
}
// Easiest handling for the rest, delegate. Only (?) question: how about nulls?
return deserialize(p, ctxt);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserialize
File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2020-36518
|
MEDIUM
| 5
|
FasterXML/jackson-databind
|
deserialize
|
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
|
8238ab41d0350fb915797c89d46777b4496b74fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addStringCreator(AnnotatedWithParams creator, boolean explicit) {
verifyNonDup(creator, C_STRING, explicit);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addStringCreator
File: src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
addStringCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public static String getConfigPath() throws NamingException
{
return XWikiCfgConfigurationSource.getConfigPath();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigPath
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
|
getConfigPath
|
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 String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
getName
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
private int checkDeviceOwnerProvisioningPreConditionLocked(@Nullable ComponentName owner,
@UserIdInt int deviceOwnerUserId, @UserIdInt int callingUserId, boolean isAdb,
boolean hasIncompatibleAccountsOrNonAdb) {
if (mOwners.hasDeviceOwner()) {
return STATUS_HAS_DEVICE_OWNER;
}
if (mOwners.hasProfileOwner(deviceOwnerUserId)) {
return STATUS_USER_HAS_PROFILE_OWNER;
}
boolean isHeadlessSystemUserMode = mInjector.userManagerIsHeadlessSystemUserMode();
// System user is always running in headless system user mode.
if (!isHeadlessSystemUserMode
&& !mUserManager.isUserRunning(new UserHandle(deviceOwnerUserId))) {
return STATUS_USER_NOT_RUNNING;
}
if (mIsWatch && hasPaired(UserHandle.USER_SYSTEM)) {
return STATUS_HAS_PAIRED;
}
if (isHeadlessSystemUserMode) {
if (deviceOwnerUserId != UserHandle.USER_SYSTEM) {
Slogf.e(LOG_TAG, "In headless system user mode, "
+ "device owner can only be set on headless system user.");
return STATUS_NOT_SYSTEM_USER;
}
}
if (isAdb) {
// If shell command runs after user setup completed check device status. Otherwise, OK.
if (mIsWatch || hasUserSetupCompleted(UserHandle.USER_SYSTEM)) {
// In non-headless system user mode, DO can be setup only if
// there's no non-system user.
// In headless system user mode, DO can be setup only if there are
// two users: the headless system user and the foreground user.
// If there could be multiple foreground users, this constraint should be modified.
int maxNumberOfExistingUsers = isHeadlessSystemUserMode ? 2 : 1;
if (mUserManager.getUserCount() > maxNumberOfExistingUsers) {
return STATUS_NONSYSTEM_USER_EXISTS;
}
int currentForegroundUser = getCurrentForegroundUserId();
if (callingUserId != currentForegroundUser
&& mInjector.userManagerIsHeadlessSystemUserMode()
&& currentForegroundUser == UserHandle.USER_SYSTEM) {
Slogf.wtf(LOG_TAG, "In headless system user mode, "
+ "current user cannot be system user when setting device owner");
return STATUS_SYSTEM_USER;
}
if (hasIncompatibleAccountsOrNonAdb) {
return STATUS_ACCOUNTS_NOT_EMPTY;
}
}
return STATUS_OK;
} else {
// DO has to be user 0
if (deviceOwnerUserId != UserHandle.USER_SYSTEM) {
return STATUS_NOT_SYSTEM_USER;
}
// Only provision DO before setup wizard completes
if (hasUserSetupCompleted(UserHandle.USER_SYSTEM)) {
return STATUS_USER_SETUP_COMPLETED;
}
return STATUS_OK;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkDeviceOwnerProvisioningPreConditionLocked
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
|
checkDeviceOwnerProvisioningPreConditionLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logVerboseQueryInfo(String[] projection, final String selection,
final String[] selectionArgs, final String sort, SQLiteDatabase db) {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("starting query, database is ");
if (db != null) {
sb.append("not ");
}
sb.append("null; ");
if (projection == null) {
sb.append("projection is null; ");
} else if (projection.length == 0) {
sb.append("projection is empty; ");
} else {
for (int i = 0; i < projection.length; ++i) {
sb.append("projection[");
sb.append(i);
sb.append("] is ");
sb.append(projection[i]);
sb.append("; ");
}
}
sb.append("selection is ");
sb.append(selection);
sb.append("; ");
if (selectionArgs == null) {
sb.append("selectionArgs is null; ");
} else if (selectionArgs.length == 0) {
sb.append("selectionArgs is empty; ");
} else {
for (int i = 0; i < selectionArgs.length; ++i) {
sb.append("selectionArgs[");
sb.append(i);
sb.append("] is ");
sb.append(selectionArgs[i]);
sb.append("; ");
}
}
sb.append("sort is ");
sb.append(sort);
sb.append(".");
Log.v(Constants.TAG, sb.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logVerboseQueryInfo
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
|
logVerboseQueryInfo
|
src/com/android/providers/downloads/DownloadProvider.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Intent build() {
return mIntent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
build
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected BlockAsyncRendererConfiguration createBlockAsyncRendererConfiguration(List<?> idElements, Block content,
String source, MacroTransformationContext context)
{
BlockAsyncRendererConfiguration configuration = new BlockAsyncRendererConfiguration(idElements, content);
// Set author
if (source != null) {
DocumentReference sourceReference = this.resolver.resolve(source);
configuration.setSecureReference(sourceReference, this.documentAccessBridge.getCurrentAuthorReference());
// Invalidate the cache when the document containing the macro call is modified
configuration.useEntity(sourceReference);
}
// Indicate if the result should be inline or not
configuration.setInline(context.isInline());
// Indicate the syntax of the content
configuration.setDefaultSyntax(this.parser.getCurrentSyntax(context));
// Indicate the target syntax
configuration.setTargetSyntax(this.renderingContext.getTargetSyntax());
// Set the transformation id
configuration.setTransformationId(context.getTransformationContext().getId());
return configuration;
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2023-26471
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20234: It's possible to execute anything with superadmin right through comments and async macro
Function: createBlockAsyncRendererConfiguration
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java
Repository: xwiki/xwiki-platform
Fixed Code:
protected BlockAsyncRendererConfiguration createBlockAsyncRendererConfiguration(List<?> idElements, Block content,
String source, MacroTransformationContext context)
{
BlockAsyncRendererConfiguration configuration = new BlockAsyncRendererConfiguration(idElements, content);
// Set author
if (source != null) {
DocumentReference sourceReference = this.resolver.resolve(source);
configuration.setSecureReference(sourceReference, this.documentAccessBridge.getCurrentAuthorReference());
// Invalidate the cache when the document containing the macro call is modified
configuration.useEntity(sourceReference);
}
// Indicate if the result should be inline or not
configuration.setInline(context.isInline());
// Indicate the syntax of the content
configuration.setDefaultSyntax(this.parser.getCurrentSyntax(context));
// Indicate the target syntax
configuration.setTargetSyntax(this.renderingContext.getTargetSyntax());
// Set the transformation id
configuration.setTransformationId(context.getTransformationContext().getId());
// Indicate if we are in a restricted mode
configuration.setResricted(context.getTransformationContext().isRestricted());
return configuration;
}
|
[
"CWE-284"
] |
CVE-2023-26471
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createBlockAsyncRendererConfiguration
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java
|
00532d9f1404287cf3ec3a05056640d809516006
| 1
|
Analyze the following code function for security vulnerabilities
|
private void writeActivitiesToProtoLocked(ProtoOutputStream proto) {
// The output proto of "activity --proto activities" is ActivityManagerServiceDumpActivitiesProto
mStackSupervisor.writeToProto(proto, ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeActivitiesToProtoLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
writeActivitiesToProtoLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createExecutorService() {
if (asyncExecutorService == null) {
ExecutorFactory executorFactory = configuration.asyncExecutorFactory().factory();
if (executorFactory == null) {
executorFactory = Util.getInstance(configuration.asyncExecutorFactory().factoryClass());
}
asyncExecutorService = executorFactory.getExecutor(configuration.asyncExecutorFactory().properties());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createExecutorService
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
|
createExecutorService
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalUpdatePartitionedTopic(int numPartitions,
boolean updateLocalTopicOnly, boolean authoritative) {
validateTopicOwnership(topicName, authoritative);
validateTopicPolicyOperation(topicName, PolicyName.PARTITION, PolicyOperation.WRITE);
// Only do the validation if it's the first hop.
if (!updateLocalTopicOnly) {
validatePartitionTopicUpdate(topicName.getLocalName(), numPartitions);
}
final int maxPartitions = pulsar().getConfig().getMaxNumPartitionsPerPartitionedTopic();
if (maxPartitions > 0 && numPartitions > maxPartitions) {
throw new RestException(Status.NOT_ACCEPTABLE,
"Number of partitions should be less than or equal to " + maxPartitions);
}
if (topicName.isGlobal() && isNamespaceReplicated(topicName.getNamespaceObject())) {
Set<String> clusters = getNamespaceReplicatedClusters(topicName.getNamespaceObject());
if (!clusters.contains(pulsar().getConfig().getClusterName())) {
log.error("[{}] local cluster is not part of replicated cluster for namespace {}", clientAppId(),
topicName);
throw new RestException(Status.FORBIDDEN, "Local cluster is not part of replicate cluster list");
}
try {
tryCreatePartitionsAsync(numPartitions).get(DEFAULT_OPERATION_TIMEOUT_SEC, TimeUnit.SECONDS);
createSubscriptions(topicName, numPartitions).get(DEFAULT_OPERATION_TIMEOUT_SEC, TimeUnit.SECONDS);
} catch (Exception e) {
if (e.getCause() instanceof RestException) {
throw (RestException) e.getCause();
}
log.error("[{}] Failed to update partitioned topic {}", clientAppId(), topicName, e);
throw new RestException(e);
}
// if this cluster is the first hop which needs to coordinate with other clusters then update partitions in
// other clusters and then update number of partitions.
if (!updateLocalTopicOnly) {
CompletableFuture<Void> updatePartition = new CompletableFuture<>();
final String path = ZkAdminPaths.partitionedTopicPath(topicName);
updatePartitionInOtherCluster(numPartitions, clusters).thenRun(() -> {
try {
namespaceResources().getPartitionedTopicResources().setAsync(path, (p) -> {
return new PartitionedTopicMetadata(numPartitions);
}).thenAccept(r -> updatePartition.complete(null)).exceptionally(ex -> {
updatePartition.completeExceptionally(ex.getCause());
return null;
});
} catch (Exception e) {
updatePartition.completeExceptionally(e);
}
}).exceptionally(ex -> {
updatePartition.completeExceptionally(ex);
return null;
});
try {
updatePartition.get(DEFAULT_OPERATION_TIMEOUT_SEC, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("{} Failed to update number of partitions in zk for topic {} and partitions {}",
clientAppId(), topicName, numPartitions, e);
if (e.getCause() instanceof RestException) {
throw (RestException) e.getCause();
}
throw new RestException(e);
}
}
return;
}
if (numPartitions <= 0) {
throw new RestException(Status.NOT_ACCEPTABLE, "Number of partitions should be more than 0");
}
try {
tryCreatePartitionsAsync(numPartitions).get(DEFAULT_OPERATION_TIMEOUT_SEC, TimeUnit.SECONDS);
updatePartitionedTopic(topicName, numPartitions).get(DEFAULT_OPERATION_TIMEOUT_SEC, TimeUnit.SECONDS);
} catch (Exception e) {
if (e.getCause() instanceof RestException) {
throw (RestException) e.getCause();
}
log.error("[{}] Failed to update partitioned topic {}", clientAppId(), topicName, e);
throw new RestException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalUpdatePartitionedTopic
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalUpdatePartitionedTopic
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public static GateKeeperResponse createOkResponse(byte[] payload, boolean shouldReEnroll) {
GateKeeperResponse response = new GateKeeperResponse(RESPONSE_OK);
response.mPayload = payload;
response.mShouldReEnroll = shouldReEnroll;
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createOkResponse
File: core/java/android/service/gatekeeper/GateKeeperResponse.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-0806
|
HIGH
| 9.3
|
android
|
createOkResponse
|
core/java/android/service/gatekeeper/GateKeeperResponse.java
|
b87c968e5a41a1a09166199bf54eee12608f3900
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Set<String> getAcceptedCaCertificates(final UserHandle userHandle) {
if (!mHasFeature) {
return Collections.<String> emptySet();
}
synchronized (getLockObject()) {
final DevicePolicyData policy = getUserData(userHandle.getIdentifier());
return policy.mAcceptedCaCertificates;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAcceptedCaCertificates
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
|
getAcceptedCaCertificates
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog addTitleLabel(final AjaxRequestTarget target)
{
target.add(titleLabel);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTitleLabel
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
addTitleLabel
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isConnectSupported() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isConnectSupported
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
isConnectSupported
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testSerializationWithTypeInfo02() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 183917322);
ObjectMapper m = newMapper()
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true)
.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
m.addMixIn(Temporal.class, MockObjectConfiguration.class);
String value = m.writeValueAsString(date);
assertEquals("The value is not correct.", "[\"" + Instant.class.getName() + "\",123456789183]", value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSerializationWithTypeInfo02
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testSerializationWithTypeInfo02
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getCountOfApplications(String tenantDomain, String username, String filter) throws
IdentityApplicationManagementException {
try {
startTenantFlow(tenantDomain, username);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
if (appDAO instanceof PaginatableFilterableApplicationDAO) {
return ((PaginatableFilterableApplicationDAO) appDAO).getCountOfApplications(filter);
} else {
throw new UnsupportedOperationException("Application count is not supported. " + "Tenant domain: " +
tenantDomain);
}
} finally {
endTenantFlow();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCountOfApplications
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getCountOfApplications
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onIconResponse(long bssid, String fileName, byte[] data) {
// Empty
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onIconResponse
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
onIconResponse
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void bindNull(int index) {
mPreparedStatement.bindNull(index);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindNull
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
bindNull
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<Region> parseRegionMetadata(InputStream input)
throws IOException {
return internalParse(input, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRegionMetadata
File: aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java
Repository: aws-amplify/aws-sdk-android
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-4725
|
CRITICAL
| 9.8
|
aws-amplify/aws-sdk-android
|
parseRegionMetadata
|
aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java
|
c3e6d69422e1f0c80fe53f2d757b8df97619af2b
| 0
|
Analyze the following code function for security vulnerabilities
|
static void setInstance(ScooldUtils instance) {
ScooldUtils.instance = instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInstance
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
setInstance
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getMimeType(ParsedUri pParsedUri) {
if (pParsedUri.getParameter(ConfigKey.CALLBACK.getKeyValue()) != null) {
return "text/javascript";
} else {
String mimeType = pParsedUri.getParameter(ConfigKey.MIME_TYPE.getKeyValue());
if (mimeType != null) {
return mimeType;
}
mimeType = configuration.get(ConfigKey.MIME_TYPE);
return mimeType != null ? mimeType : ConfigKey.MIME_TYPE.getDefaultValue();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMimeType
File: agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
getMimeType
|
agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SURL create(String url) {
if (url == null)
return null;
if (url.startsWith("http://") || url.startsWith("https://"))
try {
return create(new URL(url));
} catch (MalformedURLException e) {
Logme.error(e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
create
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable List<String> getPermittedAccessibilityServices(@NonNull ComponentName admin) {
throwIfParentInstance("getPermittedAccessibilityServices");
if (mService != null) {
try {
return mService.getPermittedAccessibilityServices(admin);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermittedAccessibilityServices
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getPermittedAccessibilityServices
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public AdapterInputConnection getAdapterInputConnectionForTest() {
return mInputConnection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdapterInputConnectionForTest
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
|
getAdapterInputConnectionForTest
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void noteUidProcessState(final int uid, final int state) {
mBatteryStatsService.noteUidProcessState(uid, state);
mAppOpsService.updateUidProcState(uid, state);
if (mTrackingAssociations) {
for (int i1=0, N1=mAssociations.size(); i1<N1; i1++) {
ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> targetComponents
= mAssociations.valueAt(i1);
for (int i2=0, N2=targetComponents.size(); i2<N2; i2++) {
SparseArray<ArrayMap<String, Association>> sourceUids
= targetComponents.valueAt(i2);
ArrayMap<String, Association> sourceProcesses = sourceUids.get(uid);
if (sourceProcesses != null) {
for (int i4=0, N4=sourceProcesses.size(); i4<N4; i4++) {
Association ass = sourceProcesses.valueAt(i4);
if (ass.mNesting >= 1) {
// currently associated
long uptime = SystemClock.uptimeMillis();
ass.mStateTimes[ass.mLastState-ActivityManager.MIN_PROCESS_STATE]
+= uptime - ass.mLastStateUptime;
ass.mLastState = state;
ass.mLastStateUptime = uptime;
}
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteUidProcessState
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
noteUidProcessState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRenameUpload() {
mUploadsStorageManager.updateDatabaseUploadStart(mCurrentUpload);
sendBroadcastUploadStarted(mCurrentUpload);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRenameUpload
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
onRenameUpload
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Configuration getProperties()
{
if (this.properties == null) {
URL url = getResourceURL(getPropertiesPath());
if (url != null) {
try {
this.properties = new Configurations().properties(url);
} catch (ConfigurationException e) {
LOGGER.error("Failed to load skin [{}] properties file ([])", this.id, url,
getRootCauseMessage(e));
this.properties = new BaseConfiguration();
}
} else {
LOGGER.debug("No properties found for skin [{}]", this.id);
this.properties = new BaseConfiguration();
}
}
return this.properties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProperties
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-29253
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getProperties
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
|
4917c8f355717bb636d763844528b1fe0f95e8e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private native long nativeGetNativeImeAdapter(long nativeContentViewCoreImpl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetNativeImeAdapter
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
|
nativeGetNativeImeAdapter
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPageRotation(int index) {
return getPageRotation(pageRefs.getPageNRelease(index));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageRotation
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
|
getPageRotation
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processPluginInitSqlFile(File localFilePath, PackageType xmlPackage) {
File pluginInitSqlFile = new File(localFilePath + File.separator + pluginProperties.getInitDbSql());
if (pluginInitSqlFile.exists()) {
String keyName = xmlPackage.getName() + "/" + xmlPackage.getVersion() + "/"
+ pluginProperties.getInitDbSql();
log.info("Uploading init sql {} to MinIO {}", pluginInitSqlFile.getAbsolutePath(), keyName);
String initSqlUrl = s3Client.uploadFile(pluginProperties.getPluginPackageBucketName(), keyName,
pluginInitSqlFile);
log.info("Init sql {} has been uploaded to MinIO {}", pluginProperties.getInitDbSql(), initSqlUrl);
} else {
log.info("Init sql {} is not included in package.", pluginProperties.getInitDbSql());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processPluginInitSqlFile
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
|
processPluginInitSqlFile
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
public final List<AbstractProject> getBuildTriggerUpstreamProjects() {
ArrayList<AbstractProject> result = new ArrayList<AbstractProject>();
for (AbstractProject<?,?> ap : getUpstreamProjects()) {
BuildTrigger buildTrigger = ap.getPublishersList().get(BuildTrigger.class);
if (buildTrigger != null)
if (buildTrigger.getChildProjects(ap).contains(this))
result.add(ap);
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuildTriggerUpstreamProjects
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getBuildTriggerUpstreamProjects
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
void startLockTaskModeLocked(TaskRecord task) {
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "startLockTaskModeLocked: " + task);
if (task.mLockTaskAuth == LOCK_TASK_AUTH_DONT_LOCK) {
return;
}
// isSystemInitiated is used to distinguish between locked and pinned mode, as pinned mode
// is initiated by system after the pinning request was shown and locked mode is initiated
// by an authorized app directly
final int callingUid = Binder.getCallingUid();
boolean isSystemInitiated = callingUid == Process.SYSTEM_UID;
long ident = Binder.clearCallingIdentity();
try {
if (!isSystemInitiated) {
task.mLockTaskUid = callingUid;
if (task.mLockTaskAuth == LOCK_TASK_AUTH_PINNABLE) {
// startLockTask() called by app and task mode is lockTaskModeDefault.
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "Mode default, asking user");
StatusBarManagerInternal statusBarManager =
LocalServices.getService(StatusBarManagerInternal.class);
if (statusBarManager != null) {
statusBarManager.showScreenPinningRequest(task.taskId);
}
return;
}
final ActivityStack stack = mStackSupervisor.getFocusedStack();
if (stack == null || task != stack.topTask()) {
throw new IllegalArgumentException("Invalid task, not in foreground");
}
}
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, isSystemInitiated ? "Locking pinned" :
"Locking fully");
mStackSupervisor.setLockTaskModeLocked(task, isSystemInitiated ?
ActivityManager.LOCK_TASK_MODE_PINNED :
ActivityManager.LOCK_TASK_MODE_LOCKED,
"startLockTask", true);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskModeLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
startLockTaskModeLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAnimationUpdate(ValueAnimator animation) {
final float alpha = (float) animation.getAnimatedValue();
mBackgroundDrawable.setAlpha((int) (MENU_BACKGROUND_ALPHA * alpha * 255));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAnimationUpdate
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
onAnimationUpdate
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init() {
cs = 0;
// line 214 "ext/puma_http11/org/jruby/puma/Http11Parser.java"
{
cs = puma_parser_start;
}
// line 88 "ext/puma_http11/http11_parser.java.rl"
body_start = 0;
content_len = 0;
mark = 0;
nread = 0;
field_len = 0;
field_start = 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
init
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Document createDocument() {
try {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
Document doc = docBuilder.newDocument();
return doc;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-3869
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Attempt to prevent external document attacks by wrapping DocumentBuilderFactory with a bunch of attribute changes
Function: createDocument
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
Fixed Code:
public static Document createDocument() {
try {
DocumentBuilderFactory dbFactory = safeDocumentBuilderFactory();
DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
Document doc = docBuilder.newDocument();
return doc;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
createDocument
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 1
|
Analyze the following code function for security vulnerabilities
|
protected static boolean builtinXmlRef(String name) {
return name.equals("amp") || name.equals("lt") || name.equals("gt") ||
name.equals("quot") || name.equals("apos");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: builtinXmlRef
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
builtinXmlRef
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStyleName() {
return cellState.styleName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStyleName
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
|
getStyleName
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasAbortPermission() {
return hasPermission(AbstractProject.ABORT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAbortPermission
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
hasAbortPermission
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void addAddressToList(final String address, final RecipientEditTextView list) {
if (address == null || list == null)
return;
final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(address);
for (final Rfc822Token token : tokens) {
list.append(token + END_TOKEN);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAddressToList
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
addAddressToList
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyLocalFileHeader(LocalFileHeader localFileHeader) throws IOException {
if (!isEntryDirectory(localFileHeader.getFileName())
&& localFileHeader.getCompressionMethod() == CompressionMethod.STORE
&& localFileHeader.getUncompressedSize() < 0) {
throw new IOException("Invalid local file header for: " + localFileHeader.getFileName()
+ ". Uncompressed size has to be set for entry of compression type store which is not a directory");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyLocalFileHeader
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
|
verifyLocalFileHeader
|
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Node findDescendant(Node node, String tagName) {
if (node == null)
return null;
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); ++i) {
Node child = children.item(i);
if (tagName.equals(node.getNodeName()))
return node;
Node matchingDescendant = findDescendant(child, tagName);
if (matchingDescendant != null) {
return matchingDescendant;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findDescendant
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
findDescendant
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
if (KEY_AUTH_TYPE.equals(key)) {
try {
final int index = Integer.parseInt((String) newValue);
mAuthType.setValueIndex(index);
final String[] values = getResources().getStringArray(R.array.apn_auth_entries);
mAuthType.setSummary(values[index]);
} catch (NumberFormatException e) {
return false;
}
} else if (KEY_APN_TYPE.equals(key)) {
String data = (TextUtils.isEmpty((String) newValue)
&& !ArrayUtils.isEmpty(mDefaultApnTypes))
? getEditableApnType(mDefaultApnTypes) : (String) newValue;
if (!TextUtils.isEmpty(data)) {
mApnType.setSummary(data);
}
} else if (KEY_PROTOCOL.equals(key)) {
final String protocol = protocolDescription((String) newValue, mProtocol);
if (protocol == null) {
return false;
}
mProtocol.setSummary(protocol);
mProtocol.setValue((String) newValue);
} else if (KEY_ROAMING_PROTOCOL.equals(key)) {
final String protocol = protocolDescription((String) newValue, mRoamingProtocol);
if (protocol == null) {
return false;
}
mRoamingProtocol.setSummary(protocol);
mRoamingProtocol.setValue((String) newValue);
} else if (KEY_BEARER_MULTI.equals(key)) {
final String bearer = bearerMultiDescription((Set<String>) newValue);
if (bearer == null) {
return false;
}
mBearerMulti.setValues((Set<String>) newValue);
mBearerMulti.setSummary(bearer);
} else if (KEY_MVNO_TYPE.equals(key)) {
final String mvno = mvnoDescription((String) newValue);
if (mvno == null) {
return false;
}
mMvnoType.setValue((String) newValue);
mMvnoType.setSummary(mvno);
mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText()));
} else if (KEY_PASSWORD.equals(key)) {
mPassword.setSummary(starify(newValue != null ? String.valueOf(newValue) : ""));
} else if (KEY_CARRIER_ENABLED.equals(key)) {
// do nothing
} else {
preference.setSummary(checkNull(newValue != null ? String.valueOf(newValue) : null));
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPreferenceChange
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
onPreferenceChange
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeListTransNull(TestContext context) throws Exception {
setRootLevel(Level.FATAL);
postgresClient().execute(null, "SELECT 1", list1JsonArray(), context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeListTransNull
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
executeListTransNull
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object createFont(int face, int style, int size) {
Typeface typeface = null;
switch (face) {
case Font.FACE_MONOSPACE:
typeface = Typeface.MONOSPACE;
break;
default:
typeface = Typeface.DEFAULT;
break;
}
int fontstyle = Typeface.NORMAL;
if ((style & Font.STYLE_BOLD) != 0) {
fontstyle |= Typeface.BOLD;
}
if ((style & Font.STYLE_ITALIC) != 0) {
fontstyle |= Typeface.ITALIC;
}
int height = this.defaultFontHeight;
int diff = height / 3;
switch (size) {
case Font.SIZE_SMALL:
height -= diff;
break;
case Font.SIZE_LARGE:
height += diff;
break;
}
Paint font = new CodenameOneTextPaint(Typeface.create(typeface, fontstyle));
font.setAntiAlias(true);
font.setUnderlineText((style & Font.STYLE_UNDERLINED) != 0);
font.setTextSize(height);
return new NativeFont(face, style, size, font);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFont
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
|
createFont
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeDatatransferProgressListener(OnDatatransferProgressListener listener, OCFile file) {
if (file == null || listener == null) {
return;
}
Long fileId = file.getFileId();
if (mBoundListeners.get(fileId) == listener) {
mBoundListeners.remove(fileId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDatatransferProgressListener
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
removeDatatransferProgressListener
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getTempWorkDir() {
return tempWorkDir;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTempWorkDir
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
getTempWorkDir
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getNavbarMenuLink2Text() {
return CONF.navbarCustomMenuLink2Text();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNavbarMenuLink2Text
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getNavbarMenuLink2Text
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getIpAddress(HttpServletRequest request) {
if (null != request) {
String ip = request.getHeader("X-Real-IP");
if (CommonUtils.notEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) {
return ip;
}
ip = request.getHeader("X-Forwarded-For");
if (CommonUtils.notEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) {
int index = ip.indexOf(Constants.COMMA);
if (index != -1) {
return ip.substring(0, index);
}
return ip;
}
return request.getRemoteAddr();
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-21333
- Severity: LOW
- CVSS Score: 3.5
Description: https://github.com/sanluan/PublicCMS/issues/26
https://github.com/sanluan/PublicCMS/issues/27
Function: getIpAddress
File: publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/RequestUtils.java
Repository: sanluan/PublicCMS
Fixed Code:
public static String getIpAddress(HttpServletRequest request) {
if (null != request) {
String localIp = request.getRemoteAddr();
String ip = request.getHeader("X-Real-IP");
if (CommonUtils.notEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) {
if (ip.length() > 64) {
ip = ip.substring(0, 64);
}
return ip.equals(localIp) ? ip : ip + "," + localIp;
}
ip = request.getHeader("X-Forwarded-For");
if (CommonUtils.notEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) {
int index = ip.indexOf(Constants.COMMA);
if (index != -1) {
return ip.substring(0, index);
}
if (ip.length() > 64) {
ip = ip.substring(0, 64);
}
return ip.equals(localIp) ? ip : ip + "," + localIp;
}
return localIp;
}
return null;
}
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getIpAddress
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/RequestUtils.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 1
|
Analyze the following code function for security vulnerabilities
|
protected boolean isHardwareAcceleratedTest() {
return !testMethodHasAnnotation(DisableHardwareAccelerationForTest.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHardwareAcceleratedTest
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
isHardwareAcceleratedTest
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRequestedOrientation(IBinder token, int requestedOrientation) {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return;
}
if (r.task != null && r.task.mResizeable) {
// Fixed screen orientation isn't supported with resizeable activities.
return;
}
final long origId = Binder.clearCallingIdentity();
mWindowManager.setAppOrientation(r.appToken, requestedOrientation);
Configuration config = mWindowManager.updateOrientationFromAppTokens(
mConfiguration, r.mayFreezeScreenLocked(r.app) ? r.appToken : null);
if (config != null) {
r.frozenBeforeDestroy = true;
if (!updateConfigurationLocked(config, r, false, false)) {
mStackSupervisor.resumeTopActivitiesLocked();
}
}
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestedOrientation
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
setRequestedOrientation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<E> pageNum(int pageNum) {
//分页合理化,针对不合理的页码自动处理
this.pageNum = ((reasonable != null && reasonable) && pageNum <= 0) ? 1 : pageNum;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageNum
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
pageNum
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getCrossProfileWidgetProviders(ComponentName admin) {
Objects.requireNonNull(admin, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(admin);
Preconditions.checkCallAuthorization(isProfileOwner(caller));
synchronized (getLockObject()) {
ActiveAdmin activeAdmin = getProfileOwnerLocked(caller);
if (activeAdmin.crossProfileWidgetProviders == null
|| activeAdmin.crossProfileWidgetProviders.isEmpty()) {
return null;
}
if (mInjector.binderIsCallingUidMyUid()) {
return new ArrayList<>(activeAdmin.crossProfileWidgetProviders);
} else {
return activeAdmin.crossProfileWidgetProviders;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileWidgetProviders
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
|
getCrossProfileWidgetProviders
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getNextSubIdForState(State state) {
List<SubscriptionInfo> list = getSubscriptionInfo(false /* forceReload */);
int resultId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
int bestSlotId = Integer.MAX_VALUE; // Favor lowest slot first
for (int i = 0; i < list.size(); i++) {
final SubscriptionInfo info = list.get(i);
final int id = info.getSubscriptionId();
int slotId = SubscriptionManager.getSlotId(id);
if (state == getSimState(id) && bestSlotId > slotId ) {
resultId = id;
bestSlotId = slotId;
}
}
return resultId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextSubIdForState
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
|
getNextSubIdForState
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initPolicy() {
UiThread.getHandler().runWithScissors(new Runnable() {
@Override
public void run() {
WindowManagerPolicyThread.set(Thread.currentThread(), Looper.myLooper());
mPolicy.init(mContext, WindowManagerService.this, WindowManagerService.this);
}
}, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initPolicy
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
|
initPolicy
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public HashMap getInfo() {
HashMap map = new HashMap();
PdfDictionary info = trailer.getAsDict(PdfName.INFO);
if (info == null)
return map;
for (Iterator it = info.getKeys().iterator(); it.hasNext();) {
PdfName key = (PdfName)it.next();
PdfObject obj = getPdfObject(info.get(key));
if (obj == null)
continue;
String value = obj.toString();
switch (obj.type()) {
case PdfObject.STRING: {
value = ((PdfString)obj).toUnicodeString();
break;
}
case PdfObject.NAME: {
value = PdfName.decodeName(value);
break;
}
}
map.put(PdfName.decodeName(key.toString()), value);
}
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInfo
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
|
getInfo
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public PageInfo<E> toPageInfo() {
return new PageInfo<E>(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toPageInfo
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
toPageInfo
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
static int getIntColumn(Cursor c, String name) {
return c.getInt(c.getColumnIndex(name));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntColumn
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
getIntColumn
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback,
ExceptionCallback exceptionCallback) throws NotConnectedException, InterruptedException {
sendIqWithResponseCallback(iqRequest, callback, exceptionCallback, getPacketReplyTimeout());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendIqWithResponseCallback
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
sendIqWithResponseCallback
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Pair<String, byte[]>> sign(
List<SignerConfig> signerConfigs,
DigestAlgorithm jarEntryDigestAlgorithm,
Map<String, byte[]> jarEntryDigests,
List<Integer> apkSigningSchemeIds,
byte[] sourceManifestBytes,
String createdBy)
throws NoSuchAlgorithmException, ApkFormatException, InvalidKeyException,
CertificateException, SignatureException {
if (signerConfigs.isEmpty()) {
throw new IllegalArgumentException("At least one signer config must be provided");
}
OutputManifestFile manifest =
generateManifestFile(
jarEntryDigestAlgorithm, jarEntryDigests, sourceManifestBytes);
return signManifest(
signerConfigs, jarEntryDigestAlgorithm, apkSigningSchemeIds, createdBy, manifest);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-21253
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Limit the number of supported v1 and v2 signers
The v1 and v2 APK Signature Schemes support multiple signers; this
was intended to allow multiple entities to sign an APK. Previously,
there were no limits placed on the number of signers that could
sign an APK, but this commit sets a hard limit of 10 supported
signers for these signature schemes to ensure a large number of
signers does not place undue burden on the platform.
Bug: 266580022
Test: gradlew test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6be64b9339c1dad28abf75b53d3866fd42f320d6)
Merged-In: I4fd8f603385dd7e59c81695a75fe6df9a116185d
Change-Id: I4fd8f603385dd7e59c81695a75fe6df9a116185d
Function: sign
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
Repository: android
Fixed Code:
public static List<Pair<String, byte[]>> sign(
List<SignerConfig> signerConfigs,
DigestAlgorithm jarEntryDigestAlgorithm,
Map<String, byte[]> jarEntryDigests,
List<Integer> apkSigningSchemeIds,
byte[] sourceManifestBytes,
String createdBy)
throws NoSuchAlgorithmException, ApkFormatException, InvalidKeyException,
CertificateException, SignatureException {
if (signerConfigs.isEmpty()) {
throw new IllegalArgumentException("At least one signer config must be provided");
}
if (signerConfigs.size() > MAX_APK_SIGNERS) {
throw new IllegalArgumentException(
"APK Signature Scheme v1 only supports a maximum of " + MAX_APK_SIGNERS + ", "
+ signerConfigs.size() + " provided");
}
OutputManifestFile manifest =
generateManifestFile(
jarEntryDigestAlgorithm, jarEntryDigests, sourceManifestBytes);
return signManifest(
signerConfigs, jarEntryDigestAlgorithm, apkSigningSchemeIds, createdBy, manifest);
}
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
sign
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 1
|
Analyze the following code function for security vulnerabilities
|
public void denyTypesByWildcard(String[] patterns) {
denyPermission(new WildcardTypePermission(patterns));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: denyTypesByWildcard
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
denyTypesByWildcard
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public void endTx(AsyncResult<SQLConnection> conn, Handler<AsyncResult<Void>> done) {
SQLConnection sqlConnection = conn.result();
sqlConnection.commit(res -> {
sqlConnection.close();
if (res.failed()) {
log.error(res.cause().getMessage(), res.cause());
done.handle(Future.failedFuture(res.cause()));
} else {
done.handle(Future.succeededFuture());
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endTx
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
endTx
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public static String extractTopLevelDir(String[] relativePathSegments) {
return extractTopLevelDir(relativePathSegments, PROP_CROSS_USER_ROOT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractTopLevelDir
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
extractTopLevelDir
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void println(Map<String, Object> optionsIn, Object object) {
Map<String, Object> options = new HashMap<>(optionsIn);
for (Map.Entry<String, Object> entry : defaultPrntOptions(options.containsKey(Printer.SKIP_DEFAULT_OPTIONS))
.entrySet()) {
options.putIfAbsent(entry.getKey(), entry.getValue());
}
manageBooleanOptions(options);
internalPrintln(options, object);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: println
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
|
println
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag)
throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteWakeupAlarm
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
noteWakeupAlarm
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetAppErrors() {
enforceCallingPermission(Manifest.permission.RESET_APP_ERRORS, "resetAppErrors");
mAppErrors.resetState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetAppErrors
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
|
resetAppErrors
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
Component getDetails(RowReference rowReference);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDetails
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
|
getDetails
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getCurrentContentSyntaxIdInternal(XWikiContext context)
{
Syntax syntax = getCurrentContentSyntaxInternal(context);
return syntax != null ? syntax.toIdString() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentContentSyntaxIdInternal
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
|
getCurrentContentSyntaxIdInternal
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.