instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public String escapeString(String str) {
try {
return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return str;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeString
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
escapeString
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T add(K name, V value) {
validateName(nameValidator, true, name);
validateValue(valueValidator, name, value);
checkNotNull(value, "value");
int h = hashingStrategy.hashCode(name);
int i = index(h);
add0(h, i, name, value);
return thisT();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: add
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
|
add
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRelativeRequestURL() throws XWikiException
{
XWikiURLFactory urlFactory = getXWikiContext().getURLFactory();
return urlFactory.getURL(urlFactory.getRequestURL(getXWikiContext()), getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelativeRequestURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getRelativeRequestURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
static String generateSaveFile(Context context, String url, String hint,
String contentDisposition, String contentLocation, String mimeType, int destination)
throws IOException {
final File parent;
final File[] parentTest;
String name = null;
if (destination == Downloads.Impl.DESTINATION_FILE_URI) {
final File file = new File(Uri.parse(hint).getPath());
parent = file.getParentFile().getAbsoluteFile();
parentTest = new File[] { parent };
name = file.getName();
} else {
parent = getRunningDestinationDirectory(context, destination);
parentTest = new File[] {
parent,
getSuccessDestinationDirectory(context, destination)
};
name = chooseFilename(url, hint, contentDisposition, contentLocation);
}
// Ensure target directories are ready
for (File test : parentTest) {
if (!(test.isDirectory() || test.mkdirs())) {
throw new IOException("Failed to create parent for " + test);
}
}
if (DownloadDrmHelper.isDrmConvertNeeded(mimeType)) {
name = DownloadDrmHelper.modifyDrmFwLockFileExtension(name);
}
final String prefix;
final String suffix;
final int dotIndex = name.lastIndexOf('.');
final boolean missingExtension = dotIndex < 0;
if (destination == Downloads.Impl.DESTINATION_FILE_URI) {
// Destination is explicitly set - do not change the extension
if (missingExtension) {
prefix = name;
suffix = "";
} else {
prefix = name.substring(0, dotIndex);
suffix = name.substring(dotIndex);
}
} else {
// Split filename between base and extension
// Add an extension if filename does not have one
if (missingExtension) {
prefix = name;
suffix = chooseExtensionFromMimeType(mimeType, true);
} else {
prefix = name.substring(0, dotIndex);
suffix = chooseExtensionFromFilename(mimeType, destination, name, dotIndex);
}
}
synchronized (sUniqueLock) {
name = generateAvailableFilenameLocked(parentTest, prefix, suffix);
// Claim this filename inside lock to prevent other threads from
// clobbering us. We're not paranoid enough to use O_EXCL.
final File file = new File(parent, name);
file.createNewFile();
return file.getAbsolutePath();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateSaveFile
File: src/com/android/providers/downloads/Helpers.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
generateSaveFile
|
src/com/android/providers/downloads/Helpers.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCountSearchResultsUpTo(Integer theCountSearchResultsUpTo) {
myCountSearchResultsUpTo = theCountSearchResultsUpTo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCountSearchResultsUpTo
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setCountSearchResultsUpTo
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthAuthorizationCodeFlow(String code) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).useAuthorizationCodeFlow(code);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthAuthorizationCodeFlow
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthAuthorizationCodeFlow
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean primaryIsTrailingPrevious(int offset) {
int line = getLineForOffset(offset);
int lineStart = getLineStart(line);
int lineEnd = getLineEnd(line);
int[] runs = getLineDirections(line).mDirections;
int levelAt = -1;
for (int i = 0; i < runs.length; i += 2) {
int start = lineStart + runs[i];
int limit = start + (runs[i+1] & RUN_LENGTH_MASK);
if (limit > lineEnd) {
limit = lineEnd;
}
if (offset >= start && offset < limit) {
if (offset > start) {
// Previous character is at same level, so don't use trailing.
return false;
}
levelAt = (runs[i+1] >>> RUN_LEVEL_SHIFT) & RUN_LEVEL_MASK;
break;
}
}
if (levelAt == -1) {
// Offset was limit of line.
levelAt = getParagraphDirection(line) == 1 ? 0 : 1;
}
// At level boundary, check previous level.
int levelBefore = -1;
if (offset == lineStart) {
levelBefore = getParagraphDirection(line) == 1 ? 0 : 1;
} else {
offset -= 1;
for (int i = 0; i < runs.length; i += 2) {
int start = lineStart + runs[i];
int limit = start + (runs[i+1] & RUN_LENGTH_MASK);
if (limit > lineEnd) {
limit = lineEnd;
}
if (offset >= start && offset < limit) {
levelBefore = (runs[i+1] >>> RUN_LEVEL_SHIFT) & RUN_LEVEL_MASK;
break;
}
}
}
return levelBefore < levelAt;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: primaryIsTrailingPrevious
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
primaryIsTrailingPrevious
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceUserUnlocked(@UserIdInt int userId, boolean parent) {
if (parent) {
enforceUserUnlocked(getProfileParentId(userId));
} else {
enforceUserUnlocked(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceUserUnlocked
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
|
enforceUserUnlocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isContinueResponseSupported() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isContinueResponseSupported
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
|
isContinueResponseSupported
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static Element getTopLevelElement(InputSource source) throws PolicyException {
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
/**
* Disable external entities, etc.
*/
dbf.setFeature(EXTERNAL_GENERAL_ENTITIES, false);
dbf.setFeature(EXTERNAL_PARAM_ENTITIES, false);
dbf.setFeature(DISALLOW_DOCTYPE_DECL, true);
dbf.setFeature(LOAD_EXTERNAL_DTD, false);
DocumentBuilder db = dbf.newDocumentBuilder();
Document dom = db.parse(source);
return dom.getDocumentElement();
} catch (SAXException e) {
throw new PolicyException(e);
} catch (ParserConfigurationException e) {
throw new PolicyException(e);
} catch (IOException e) {
throw new PolicyException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTopLevelElement
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
getTopLevelElement
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isScreenOn() {
return mDeviceInteractive;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isScreenOn
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
isScreenOn
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPackageUid(String packageName, int userId) {
return getPackageUidEtc(packageName, 0, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageUid
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
|
getPackageUid
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String verifyRedirectUri(KeycloakSession session, String redirectUri, ClientModel client, boolean requireRedirectUri) {
if (client != null)
return verifyRedirectUri(session, client.getRootUrl(), redirectUri, client.getRedirectUris(), requireRedirectUri);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyRedirectUri
File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4361
|
MEDIUM
| 6.1
|
keycloak
|
verifyRedirectUri
|
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
|
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private static Long toLong(@Nullable String v) {
try {
return v != null ? Long.parseLong(v) : null;
} catch (NumberFormatException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toLong
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toLong
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getMaximumTimeToLock(ComponentName who, int userHandle, boolean parent) {
if (!mHasFeature) {
return 0;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
// System caller can query policy for a particular admin.
Preconditions.checkCallAuthorization(
who == null || isCallingFromPackage(who.getPackageName(), caller.getUid())
|| canQueryAdminPolicy(caller));
synchronized (getLockObject()) {
if (who != null) {
final ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent);
return admin != null ? admin.maximumTimeToUnlock : 0;
}
// Return the strictest policy across all participating admins.
final List<ActiveAdmin> admins = getActiveAdminsForLockscreenPoliciesLocked(
getProfileParentUserIfRequested(userHandle, parent));
final long timeMs = getMaximumTimeToLockPolicyFromAdmins(admins);
return timeMs == Long.MAX_VALUE ? 0 : timeMs;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaximumTimeToLock
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
|
getMaximumTimeToLock
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected DataSource createDataSource(Map<String, ?> params, SQLDialect dialect)
throws IOException {
String jndiName = (String) JNDI_REFNAME.lookUp(params);
if (jndiName == null) throw new IOException("Missing " + JNDI_REFNAME.description);
Context ctx = null;
DataSource ds = null;
try {
ctx = GeoTools.getInitialContext();
} catch (NamingException e) {
throw new RuntimeException(e);
}
try {
ds = (DataSource) ctx.lookup(jndiName);
} catch (NamingException e1) {
// check if the user did not specify "java:comp/env"
// and this code is running in a J2EE environment
try {
if (jndiName.startsWith(J2EERootContext) == false) {
ds = (DataSource) ctx.lookup(J2EERootContext + jndiName);
// success --> issue a waring
Logger.getLogger(this.getClass().getName())
.log(
Level.WARNING,
"Using "
+ J2EERootContext
+ jndiName
+ " instead of "
+ jndiName
+ " would avoid an unnecessary JNDI lookup");
}
} catch (NamingException e2) {
// do nothing, was only a try
}
}
if (ds == null) throw new IOException("Cannot find JNDI data source: " + jndiName);
else return ds;
}
|
Vulnerability Classification:
- CWE: CWE-917
- CVE: CVE-2022-24818
- Severity: HIGH
- CVSS Score: 7.5
Description: [GEOT-7115] Streamline JNDI lookups
Function: createDataSource
File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
Repository: geotools
Fixed Code:
@Override
protected DataSource createDataSource(Map<String, ?> params, SQLDialect dialect)
throws IOException {
String jndiName = (String) JNDI_REFNAME.lookUp(params);
if (jndiName == null) throw new IOException("Missing " + JNDI_REFNAME.description);
DataSource ds = null;
try {
ds = (DataSource) GeoTools.jndiLookup(jndiName);
} catch (NamingException e1) {
// check if the user did not specify "java:comp/env"
// and this code is running in a J2EE environment
try {
if (jndiName.startsWith(J2EERootContext) == false) {
ds = (DataSource) GeoTools.jndiLookup(J2EERootContext + jndiName);
// success --> issue a waring
Logger.getLogger(this.getClass().getName())
.log(
Level.WARNING,
"Using "
+ J2EERootContext
+ jndiName
+ " instead of "
+ jndiName
+ " would avoid an unnecessary JNDI lookup");
}
} catch (NamingException e2) {
// do nothing, was only a try
}
}
if (ds == null) throw new IOException("Cannot find JNDI data source: " + jndiName);
else return ds;
}
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
createDataSource
|
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 1
|
Analyze the following code function for security vulnerabilities
|
public static byte[] serialize(Object obj)
throws IOException
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(obj);
oos.flush();
return out.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
serialize
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void validateExpiryExists(final Optional<User> user) {
if (!user.map(User::principal).map(p -> p.containsKey("exp")).orElse(false)) {
throw new IllegalStateException("Invalid JWT doesn't have expiry");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateExpiryExists
File: ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java
Repository: hyperledger/besu
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-21369
|
MEDIUM
| 4
|
hyperledger/besu
|
validateExpiryExists
|
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java
|
06e35a58c07a30c0fbdc0aae45a3e8b06b53c022
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void grantDefaultPermissionsToDefaultSmsApp(String packageName, int userId) {
synchronized (mPackages) {
mDefaultPermissionPolicy.grantDefaultPermissionsToDefaultSmsAppLPr(
packageName, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantDefaultPermissionsToDefaultSmsApp
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
|
grantDefaultPermissionsToDefaultSmsApp
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IoWriteFuture writePacket(Buffer buffer) throws IOException {
return kexHandler.writePacket(buffer, 0, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writePacket
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
writePacket
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setProcessImportant(IBinder token, int pid, boolean isForeground, String reason) {
enforceCallingPermission(android.Manifest.permission.SET_PROCESS_LIMIT,
"setProcessImportant()");
synchronized(this) {
boolean changed = false;
ProcessRecord pr = null;
synchronized (mPidsSelfLocked) {
pr = mPidsSelfLocked.get(pid);
if (pr == null && isForeground) {
Slog.w(TAG, "setProcessForeground called on unknown pid: " + pid);
return;
}
ImportanceToken oldToken = mImportantProcesses.get(pid);
if (oldToken != null) {
oldToken.token.unlinkToDeath(oldToken, 0);
mImportantProcesses.remove(pid);
if (pr != null) {
pr.mState.setForcingToImportant(null);
}
changed = true;
}
if (isForeground && token != null) {
ImportanceToken newToken = new ImportanceToken(pid, token, reason) {
@Override
public void binderDied() {
importanceTokenDied(this);
}
};
try {
token.linkToDeath(newToken, 0);
mImportantProcesses.put(pid, newToken);
pr.mState.setForcingToImportant(newToken);
changed = true;
} catch (RemoteException e) {
// If the process died while doing this, we will later
// do the cleanup with the process death link.
}
}
}
if (changed) {
updateOomAdjLocked(pr, OomAdjuster.OOM_ADJ_REASON_UI_VISIBILITY);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProcessImportant
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
|
setProcessImportant
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean allowMoveToFront() {
return mPendingOptions == null || !mPendingOptions.getAvoidMoveToFront();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowMoveToFront
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
allowMoveToFront
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private XWikiDocument getCallerDocument(XWikiContext xcontext)
{
XWikiDocument sdoc = (XWikiDocument) xcontext.get("sdoc");
if (sdoc == null) {
sdoc = xcontext.getDoc();
}
return sdoc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallerDocument
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
|
getCallerDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleInflationException(StatusBarNotification notification, Exception e) {
handleNotificationError(notification, e.getMessage());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleInflationException
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
|
handleInflationException
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] generatorCode(GeneratorOptionDTO generatorOptionDTO) throws IOException {
// 获取生成后的文件项 map
Map<String, FileEntry> map = getStringFileEntryMap(generatorOptionDTO);
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ZipOutputStream zip = new ZipOutputStream(outputStream)) {
// 循环写入数据
for (Map.Entry<String, FileEntry> entry : map.entrySet()) {
FileEntry fileEntry = entry.getValue();
// 只处理文件
if (TemplateEntryTypeEnum.FILE.getType().equals(fileEntry.getType())) {
// 添加到zip
String filePath = entry.getKey();
zip.putNextEntry(new ZipEntry(filePath));
IoUtil.write(zip, StandardCharsets.UTF_8, false, fileEntry.getContent());
zip.closeEntry();
}
}
// 手动结束 zip,防止文件末端未被写入
zip.finish();
return outputStream.toByteArray();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generatorCode
File: ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java
Repository: ballcat-projects/ballcat-codegen
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2022-24881
|
HIGH
| 7.5
|
ballcat-projects/ballcat-codegen
|
generatorCode
|
ballcat-codegen-backend/src/main/java/com/hccake/ballcat/codegen/service/impl/GeneratorServiceImpl.java
|
84a7cb38daf0295b93aba21d562ec627e4eb463b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAudioCaptcha(String audioCaptcha) {
this.audioCaptcha = audioCaptcha;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAudioCaptcha
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
|
setAudioCaptcha
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean equals(final String value, final String text, final Boolean ignoreCase) {
if (value != null && text != null) {
String val = value.trim();
String txt = text.trim();
if (ignoreCase != null && ignoreCase) {
val = val.toLowerCase();
txt = text.toLowerCase();
}
if (val.equals(txt)) {
return true;
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000651
- Severity: HIGH
- CVSS Score: 7.5
Description: gh-813 Turn on secure processing feature for XML parsers etc
Function: equals
File: stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java
Repository: gchq/stroom
Fixed Code:
private boolean equals(final String value, final String text, final Boolean ignoreCase) {
if (value != null && text != null) {
String val = value.trim();
String txt = text.trim();
if (ignoreCase != null && ignoreCase) {
val = val.toLowerCase();
txt = text.toLowerCase();
}
return val.equals(txt);
}
return false;
}
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
equals
|
stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getCategory() {
return UserviewBuilderPalette.CATEGORY_GENERAL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCategory
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4859
|
MEDIUM
| 4
|
jogetworkflow/jw-community
|
getCategory
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
|
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onInputEvent(InputEvent event) {
boolean handled = false;
try {
if (event instanceof MotionEvent
&& (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
final MotionEvent motionEvent = (MotionEvent)event;
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
// When the user taps down, we re-show the nav bar.
boolean changed = false;
synchronized (mWindowManagerFuncs.getWindowManagerLock()) {
// Any user activity always causes us to show the
// navigation controls, if they had been hidden.
// We also clear the low profile and only content
// flags so that tapping on the screen will atomically
// restore all currently hidden screen decorations.
int newVal = mResettingSystemUiFlags |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LOW_PROFILE |
View.SYSTEM_UI_FLAG_FULLSCREEN;
if (mResettingSystemUiFlags != newVal) {
mResettingSystemUiFlags = newVal;
changed = true;
}
// We don't allow the system's nav bar to be hidden
// again for 1 second, to prevent applications from
// spamming us and keeping it from being shown.
newVal = mForceClearedSystemUiFlags |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
if (mForceClearedSystemUiFlags != newVal) {
mForceClearedSystemUiFlags = newVal;
changed = true;
mHandler.postDelayed(mClearHideNavigationFlag, 1000);
}
}
if (changed) {
mWindowManagerFuncs.reevaluateStatusBarVisibility();
}
}
}
} finally {
finishInputEvent(event, handled);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInputEvent
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
onInputEvent
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOptionEnabled(int option) {
mOptions |= option;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOptionEnabled
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
|
setOptionEnabled
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUseResourceRoleMappings(Boolean useResourceRoleMappings) {
this.useResourceRoleMappings = useResourceRoleMappings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseResourceRoleMappings
File: services/src/main/java/org/keycloak/services/managers/ClientManager.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2019-14837
|
MEDIUM
| 6.4
|
keycloak
|
setUseResourceRoleMappings
|
services/src/main/java/org/keycloak/services/managers/ClientManager.java
|
9a7c1a91a59ab85e7f8889a505be04a71580777f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getBasicDefinitions(String crfVersionOID, BasicDefinitionsBean basicDef) {
ArrayList<MeasurementUnitBean> units = basicDef.getMeasurementUnits();
String uprev = "";
this.setStudyMeasurementUnitsTypesExpected();
ArrayList rows = this.select(this.getStudyMeasurementUnitsSql(crfVersionOID));
Iterator it = rows.iterator();
while (it.hasNext()) {
HashMap row = (HashMap) it.next();
String oid = (String) row.get("mu_oid");
String name = (String) row.get("name");
MeasurementUnitBean u = new MeasurementUnitBean();
SymbolBean symbol = new SymbolBean();
ArrayList<TranslatedTextBean> texts = new ArrayList<TranslatedTextBean>();
if (uprev.equals(oid)) {
u = units.get(units.size() - 1);
symbol = u.getSymbol();
texts = symbol.getTranslatedText();
} else {
u.setOid(oid);
u.setName(name);
units.add(u);
}
TranslatedTextBean t = new TranslatedTextBean();
t.setText(name);
texts.add(t);
symbol.setTranslatedText(texts);
u.setSymbol(symbol);
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-24831
- Severity: HIGH
- CVSS Score: 7.5
Description: OC-17141: fix reported SQL injection issues
Function: getBasicDefinitions
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
Fixed Code:
public void getBasicDefinitions(String crfVersionOID, BasicDefinitionsBean basicDef) {
ArrayList<MeasurementUnitBean> units = basicDef.getMeasurementUnits();
String uprev = "";
this.setStudyMeasurementUnitsTypesExpected();
//OC-17141
HashMap<Integer, Object> param = new HashMap<Integer, Object>();
param.put(new Integer(1), crfVersionOID);
ArrayList rows = this.select(getStudyMeasurementUnitsSqlbyCrfVersionOid(),param);
Iterator it = rows.iterator();
while (it.hasNext()) {
HashMap row = (HashMap) it.next();
String oid = (String) row.get("mu_oid");
String name = (String) row.get("name");
MeasurementUnitBean u = new MeasurementUnitBean();
SymbolBean symbol = new SymbolBean();
ArrayList<TranslatedTextBean> texts = new ArrayList<TranslatedTextBean>();
if (uprev.equals(oid)) {
u = units.get(units.size() - 1);
symbol = u.getSymbol();
texts = symbol.getTranslatedText();
} else {
u.setOid(oid);
u.setName(name);
units.add(u);
}
TranslatedTextBean t = new TranslatedTextBean();
t.setText(name);
texts.add(t);
symbol.setTranslatedText(texts);
u.setSymbol(symbol);
}
}
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getBasicDefinitions
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setByteStream(InputStream byteStream) {
fByteStream = byteStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setByteStream
File: ext/java/nokogiri/XmlSchema.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
setByteStream
|
ext/java/nokogiri/XmlSchema.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTranslatedContent(XWikiContext context) throws XWikiException
{
String language = context.getWiki().getLanguagePreference(context);
return getTranslatedContent(language, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTranslatedContent
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
|
getTranslatedContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void forceStartService(String service, Context ctx) {
if(!AndroidImplementation.hasAndroidMarket(ctx)) {
SharedPreferences sh = ctx.getSharedPreferences("C2DMNeeded", Context.MODE_PRIVATE);
Editor editor = sh.edit();
editor.putBoolean("C2DMNeeded", true);
editor.commit();
Intent i = new Intent();
i.setAction(service);
ctx.startService(i);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceStartService
File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
forceStartService
|
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private static PostgresClient getInstanceInternal(Vertx vertx, String tenantId) {
// assumes a single thread vertx model so no sync needed
PostgresClient postgresClient = connectionPool.get(vertx, tenantId);
try {
if (postgresClient == null) {
postgresClient = new PostgresClient(vertx, tenantId);
connectionPool.put(vertx, tenantId, postgresClient);
}
if (postgresClient.client == null) {
// in connectionPool, but closeClient() has been invoked
postgresClient.init();
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return postgresClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstanceInternal
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
|
getInstanceInternal
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public SetupTarget getSetupMode()
{
return setupMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSetupMode
File: src/main/java/org/projectforge/web/admin/SetupForm.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
getSetupMode
|
src/main/java/org/projectforge/web/admin/SetupForm.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String formatSenders(final String string) {
if (!TextUtils.isEmpty(string) && string.charAt(string.length() - 1) == ',') {
return string.substring(0, string.length() - 1);
}
return string;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatSenders
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
|
formatSenders
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private JavaType _mapAbstractType2(DeserializationConfig config, JavaType type)
throws JsonMappingException
{
Class<?> currClass = type.getRawClass();
if (_factoryConfig.hasAbstractTypeResolvers()) {
for (AbstractTypeResolver resolver : _factoryConfig.abstractTypeResolvers()) {
JavaType concrete = resolver.findTypeMapping(config, type);
if ((concrete != null) && !concrete.hasRawClass(currClass)) {
return concrete;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _mapAbstractType2
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_mapAbstractType2
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int sendIntentSender(IIntentSender target, int code, Intent intent, String resolvedType,
IIntentReceiver finishedReceiver, String requiredPermission, Bundle options) {
if (target instanceof PendingIntentRecord) {
return ((PendingIntentRecord)target).sendWithResult(code, intent, resolvedType,
finishedReceiver, requiredPermission, options);
} else {
if (intent == null) {
// Weird case: someone has given us their own custom IIntentSender, and now
// they have someone else trying to send to it but of course this isn't
// really a PendingIntent, so there is no base Intent, and the caller isn't
// supplying an Intent... but we never want to dispatch a null Intent to
// a receiver, so um... let's make something up.
Slog.wtf(TAG, "Can't use null intent with direct IIntentSender call");
intent = new Intent(Intent.ACTION_MAIN);
}
try {
target.send(code, intent, resolvedType, null, requiredPermission, options);
} catch (RemoteException e) {
}
// Platform code can rely on getting a result back when the send is done, but if
// this intent sender is from outside of the system we can't rely on it doing that.
// So instead we don't give it the result receiver, and instead just directly
// report the finish immediately.
if (finishedReceiver != null) {
try {
finishedReceiver.performReceive(intent, 0,
null, null, false, false, UserHandle.getCallingUserId());
} catch (RemoteException e) {
}
}
return 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendIntentSender
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
|
sendIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getParaEndpoint() {
return CONF.redirectUri();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParaEndpoint
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
|
getParaEndpoint
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getUidlRequestTimeout(VaadinSession session) {
return getDeploymentConfiguration().isCloseIdleSessions()
? session.getSession().getMaxInactiveInterval()
: -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUidlRequestTimeout
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
getUidlRequestTimeout
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object fromXML(InputStream input, Object root) {
return unmarshal(hierarchicalStreamDriver.createReader(input), root);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromXML
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
|
fromXML
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Region getMagnificationRegion() {
final IAccessibilityServiceConnection connection =
AccessibilityInteractionClient.getInstance().getConnection(
mService.mConnectionId);
if (connection != null) {
try {
return connection.getMagnificationRegion();
} catch (RemoteException re) {
Log.w(LOG_TAG, "Failed to obtain magnified region", re);
re.rethrowFromSystemServer();
}
}
return Region.obtain();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMagnificationRegion
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
getMagnificationRegion
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
@FlakyTest
public void testUnmuteDuringEmergencyCall() throws Exception {
// Make an outgoing call and turn ON mute.
IdPair outgoingCall = startAndMakeActiveOutgoingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
assertEquals(Call.STATE_ACTIVE, mInCallServiceFixtureX.getCall(outgoingCall.mCallId)
.getState());
mInCallServiceFixtureX.mInCallAdapter.mute(true);
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
assertTrue(mTelecomSystem.getCallsManager().getAudioState().isMuted());
// Make an emergency call.
IdPair emergencyCall = startAndMakeDialingEmergencyCall("650-555-1213",
mPhoneAccountE0.getAccountHandle(), mConnectionServiceFixtureA);
assertEquals(Call.STATE_DIALING, mInCallServiceFixtureX.getCall(emergencyCall.mCallId)
.getState());
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
// Should be unmute automatically.
assertFalse(mTelecomSystem.getCallsManager().getAudioState().isMuted());
// Toggle mute during an emergency call.
mTelecomSystem.getCallsManager().getCallAudioManager().toggleMute();
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
// Should keep unmute.
assertFalse(mTelecomSystem.getCallsManager().getAudioState().isMuted());
ArgumentCaptor<Boolean> muteValueCaptor = ArgumentCaptor.forClass(Boolean.class);
verify(mAudioService, times(2)).setMicrophoneMute(muteValueCaptor.capture(),
any(String.class), any(Integer.class), nullable(String.class));
List<Boolean> muteValues = muteValueCaptor.getAllValues();
// Check mute status was changed twice with true and false.
assertTrue(muteValues.get(0));
assertFalse(muteValues.get(1));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testUnmuteDuringEmergencyCall
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testUnmuteDuringEmergencyCall
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Object> addObjectsFromRequest(String className, String prefix) throws XWikiException
{
List<BaseObject> objs = getDoc().addObjectsFromRequest(className, prefix, getXWikiContext());
List<Object> wrapped = new ArrayList<Object>();
for (BaseObject object : objs) {
wrapped.add(new com.xpn.xwiki.api.Object(object, getXWikiContext()));
}
updateAuthor();
return wrapped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObjectsFromRequest
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
|
addObjectsFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTrustAgentConfiguration(
ComponentName admin, String callerPackageName, ComponentName agent,
PersistableBundle args, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return;
}
if (!isPermissionCheckFlagEnabled()) {
Objects.requireNonNull(admin, "admin is null");
}
Objects.requireNonNull(agent, "agent is null");
enforceMaxPackageNameLength(agent.getPackageName());
final String agentAsString = agent.flattenToString();
enforceMaxStringLength(agentAsString, "agent name");
if (args != null) {
enforceMaxStringLength(args, "args");
}
int userHandle = mInjector.userHandleGetCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap;
if (isPermissionCheckFlagEnabled()) {
CallerIdentity caller = getCallerIdentity(admin, callerPackageName);
int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
ap = enforcePermissionAndGetEnforcingAdmin(
admin,
/*permission=*/MANAGE_DEVICE_POLICY_KEYGUARD,
/*adminPolicy=*/DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES,
caller.getPackageName(), affectedUserId).getActiveAdmin();
} else {
ap = getActiveAdminForCallerLocked(admin,
DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES, parent);
}
checkCanExecuteOrThrowUnsafe(
DevicePolicyManager.OPERATION_SET_TRUST_AGENT_CONFIGURATION);
ap.trustAgentInfos.put(agentAsString, new TrustAgentInfo(args));
saveSettingsLocked(userHandle);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTrustAgentConfiguration
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setTrustAgentConfiguration
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeCometListener(CometListener listener) {
_cometListeners.remove(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeCometListener
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
removeCometListener
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean canCustomizeAppTransition() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canCustomizeAppTransition
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
canCustomizeAppTransition
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void hotRestartXmlGenerator(XmlGenerator gen, Config config) {
HotRestartPersistenceConfig hrCfg = config.getHotRestartPersistenceConfig();
if (hrCfg == null) {
gen.node("hot-restart-persistence", "enabled", "false");
return;
}
gen.open("hot-restart-persistence", "enabled", hrCfg.isEnabled())
.node("base-dir", hrCfg.getBaseDir().getAbsolutePath());
if (hrCfg.getBackupDir() != null) {
gen.node("backup-dir", hrCfg.getBackupDir().getAbsolutePath());
}
gen.node("parallelism", hrCfg.getParallelism())
.node("validation-timeout-seconds", hrCfg.getValidationTimeoutSeconds())
.node("data-load-timeout-seconds", hrCfg.getDataLoadTimeoutSeconds())
.node("cluster-data-recovery-policy", hrCfg.getClusterDataRecoveryPolicy())
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hotRestartXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
hotRestartXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException {
checkNotNull(file);
checkNotNull(charset);
return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newWriter
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
newWriter
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Group findByLegacyId(Context context, int id) throws SQLException {
return groupDAO.findByLegacyId(context, id, Group.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByLegacyId
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
findByLegacyId
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isBackground() {
return background;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBackground
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
isBackground
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CertDataInfo fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element infoElement = document.getDocumentElement();
return fromDOM(infoElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
Fixed Code:
public static CertDataInfo fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element infoElement = document.getDocumentElement();
return fromDOM(infoElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onNetworkPermanentlyDisabled(WifiConfiguration config, int disableReason) {
// For DISABLED_NO_INTERNET_PERMANENT we do not need to remove the network
// because supplicant won't be trying to reconnect. If this is due to a
// preventAutomaticReconnect request from ConnectivityService, that service
// will disconnect as appropriate.
if (disableReason == DISABLED_NO_INTERNET_PERMANENT) return;
if (config.networkId == mTargetNetworkId || config.networkId == mLastNetworkId) {
// Disconnect and let autojoin reselect a new network
sendMessage(CMD_DISCONNECT, StaEvent.DISCONNECT_NETWORK_PERMANENT_DISABLED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNetworkPermanentlyDisabled
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
|
onNetworkPermanentlyDisabled
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMaxSmResumptionTime() {
int clientResumptionTime = smClientMaxResumptionTime > 0 ? smClientMaxResumptionTime : Integer.MAX_VALUE;
int serverResumptionTime = smServerMaxResumptimTime > 0 ? smServerMaxResumptimTime : Integer.MAX_VALUE;
return Math.min(clientResumptionTime, serverResumptionTime);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxSmResumptionTime
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
getMaxSmResumptionTime
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setRemoveQueryParamsOnRedirect(boolean removeQueryParamOnRedirect) {
this.removeQueryParamOnRedirect = removeQueryParamOnRedirect;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRemoveQueryParamsOnRedirect
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setRemoveQueryParamsOnRedirect
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<LBMember> listMembersByPool(String poolId) {
Collection<LBMember> result = new HashSet<LBMember>();
if(pools.containsKey(poolId)) {
ArrayList<String> memberIds = pools.get(poolId).members;
for (int i = 0; i<memberIds.size(); i++)
result.add(members.get(memberIds.get(i)));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listMembersByPool
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
listMembersByPool
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract String getPrefix();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPrefix
File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-378",
"CWE-379"
] |
CVE-2021-21290
|
LOW
| 1.9
|
netty
|
getPrefix
|
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
|
c735357bf29d07856ad171c6611a2e1a0e0000ec
| 0
|
Analyze the following code function for security vulnerabilities
|
@Produces(MediaType.APPLICATION_JSON)
@RequestMapping(value = "/auth/api/v1/forms/migrate/run", method = RequestMethod.POST)
public ResponseEntity<ReportLog> runAuthMigration(@RequestBody TransferObject transferObject, HttpServletRequest request) throws Exception {
ResponseEntity<HelperObject> res = runPreviewTest(transferObject, request);
HelperObject helperObject = res.getBody();
helperObject.setRequest(request);
fillHelperObject(helperObject);
ReportLog reportLog = helperObject.getReportLog();
String str = "";
if (reportLog.getSubjectCount() != 0 && reportLog.getEventCrfCount() != 0 && reportLog.getErrors().size() == 0) {
BatchCRFMigrationController bcmController = new BatchCRFMigrationController(helperObject);
Thread thread = new Thread(bcmController);
thread.start();
str = resterms.getString("Batch_CRF_version_migration_is_running_You_will_receive_an_email_once_the_process_is_complete");
reportLog.setReportPreview(str);
return new ResponseEntity<ReportLog>(reportLog, org.springframework.http.HttpStatus.OK);
} else if (reportLog.getErrors().size() > 0) {
return new ResponseEntity<ReportLog>(reportLog, org.springframework.http.HttpStatus.NOT_ACCEPTABLE);
} else {
str = resterms.getString("Migration_did_not_run_due_to_no_affected_subject");
reportLog.setReportPreview(str);
return new ResponseEntity<ReportLog>(reportLog, org.springframework.http.HttpStatus.OK);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runAuthMigration
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
runAuthMigration
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean checkPassword(User user, String password) {
BaseUserMapper userMapper = this.getBaseMapper();
return userMapper.checkPassword(user.getUsername(), MD5Util.md5(password));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPassword
File: framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
Repository: CloudExplorer-Dev/CloudExplorer-Lite
The code follows secure coding practices.
|
[
"CWE-521"
] |
CVE-2023-3423
|
HIGH
| 8.8
|
CloudExplorer-Dev/CloudExplorer-Lite
|
checkPassword
|
framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
|
7d4dab60352079953b7be120afe9bd14983ae3bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NearbyStreamingPolicy int getNearbyAppStreamingPolicy(int userId) {
throwIfParentInstance("getNearbyAppStreamingPolicy");
if (mService == null) {
return NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY;
}
try {
return mService.getNearbyAppStreamingPolicy(userId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNearbyAppStreamingPolicy
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
|
getNearbyAppStreamingPolicy
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract T getValue();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: varexport/src/main/java/com/indeed/util/varexport/Variable.java
Repository: indeedeng/util
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
getValue
|
varexport/src/main/java/com/indeed/util/varexport/Variable.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 0
|
Analyze the following code function for security vulnerabilities
|
private CommandLine git_C() {
return git().withArgs("-C", workingDir.getAbsolutePath());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: git_C
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
git_C
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEncoded(String encoded) {
this.encoded = encoded;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEncoded
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setEncoded
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDeviceOwner(@Nullable ComponentName who, int userId) {
synchronized (getLockObject()) {
return mOwners.hasDeviceOwner() && mOwners.getDeviceOwnerUserId() == userId
&& mOwners.getDeviceOwnerComponent().equals(who);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceOwner
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isDeviceOwner
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initLang() {
chineseLangButton.setSelected(true);
LANG = CHINESE;
englishLangButton.setSelected(false);
langButton.addActionListener(e -> {
if (chineseLangButton.isSelected()) {
LANG = CHINESE;
} else if (englishLangButton.isSelected()) {
LANG = ENGLISH;
}
refreshLang();
if (LANG == CHINESE) {
pocNumLabel.setText(String.format("当前共有: %s 个PoC", Poc.getPocList().size()));
} else {
pocNumLabel.setText(String.format("PoC Num: %s", Poc.getPocList().size()));
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initLang
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initLang
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
@Override
public long getLong(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getLong columnIndex: {0}", columnIndex);
byte[] value = getRawValue(columnIndex);
if (value == null) {
return 0; // SQL NULL
}
if (isBinary(columnIndex)) {
int col = columnIndex - 1;
int oid = fields[col].getOID();
if (oid == Oid.INT8) {
return ByteConverter.int8(value, 0);
}
return readLongValue(value, oid, Long.MIN_VALUE, Long.MAX_VALUE, "long");
}
Encoding encoding = connection.getEncoding();
if (encoding.hasAsciiNumbers()) {
try {
return getFastLong(value);
} catch (NumberFormatException ignored) {
}
}
return toLong(getFixedString(columnIndex));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLong
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getLong
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsString03() throws Exception
{
Instant date = Instant.now();
Instant value = MAPPER.readValue('"' + FORMATTER.format(date) + '"', Instant.class);
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsString03
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
|
testDeserializationAsString03
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SyncStorageEngine getSingleton() {
if (sSyncStorageEngine == null) {
throw new IllegalStateException("not initialized");
}
return sSyncStorageEngine;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSingleton
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
|
getSingleton
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void bypassElementBlock(XMLEventReader xmlEventReader, String tag) throws ParsingException {
while (xmlEventReader.hasNext()) {
EndElement endElement = getNextEndElement(xmlEventReader);
if (endElement == null)
return;
if (StaxParserUtil.matches(endElement, tag))
return;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bypassElementBlock
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
bypassElementBlock
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Collection> findGroup2CommunityMapped(Context context) throws SQLException {
List<Community> communities = communityService
.findAuthorizedGroupMapped(context, Arrays.asList(Constants.ADD, Constants.ADMIN));
List<Collection> collections = new ArrayList<>();
for (Community community : communities) {
collections.addAll(community.getCollections());
}
return collections;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findGroup2CommunityMapped
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
findGroup2CommunityMapped
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public IIntentSender getIntentSender(int type,
String packageName, IBinder token, String resultWho,
int requestCode, Intent[] intents, String[] resolvedTypes, int flags,
Bundle options, int userId) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(type);
data.writeString(packageName);
data.writeStrongBinder(token);
data.writeString(resultWho);
data.writeInt(requestCode);
if (intents != null) {
data.writeInt(1);
data.writeTypedArray(intents, 0);
data.writeStringArray(resolvedTypes);
} else {
data.writeInt(0);
}
data.writeInt(flags);
if (options != null) {
data.writeInt(1);
options.writeToParcel(data, 0);
} else {
data.writeInt(0);
}
data.writeInt(userId);
mRemote.transact(GET_INTENT_SENDER_TRANSACTION, data, reply, 0);
reply.readException();
IIntentSender res = IIntentSender.Stub.asInterface(
reply.readStrongBinder());
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentSender
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getIntentSender
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Group create(Context context) throws SQLException, AuthorizeException {
// FIXME - authorization?
if (!authorizeService.isAdmin(context)) {
throw new AuthorizeException(
"You must be an admin to create an EPerson Group");
}
// Create a table row
Group g = groupDAO.create(context, new Group());
log.info(LogHelper.getHeader(context, "create_group", "group_id="
+ g.getID()));
context.addEvent(new Event(Event.CREATE, Constants.GROUP, g.getID(), null, getIdentifiers(context, g)));
update(context, g);
return g;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
create
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toString() {
return "Form.Dynamic(" + data.toString() + ")";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
toString
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public User getUser(String accountName) {
SearchResult ldapUser;
User user = new User();
try {
ldapUser = lookupUser(accountName);
if (ldapUser != null) {
Attribute attribute = ldapUser.getAttributes().get(idAttribute);
if (attribute != null) {
user.setLogin((String) attribute.get());
} else {
user.setLogin(accountName);
}
attribute = ldapUser.getAttributes().get(nameAttribute);
if (attribute != null) {
user.setName((String) attribute.get());
} else {
user.setName(accountName);
}
attribute = ldapUser.getAttributes().get(mailAttribute);
if (attribute != null) {
user.setEmail((String) attribute.get());
} else {
user.setEmail(accountName);
}
}
user.setAdministrator(isAdmin(accountName));
} catch (NamingException e) {
user.setLogin(accountName);
user.setName(accountName);
user.setEmail(accountName);
LOGGER.warn("User lookup error", e);
}
return user;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: src/main/java/org/traccar/database/LdapProvider.java
Repository: traccar
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5246
|
MEDIUM
| 4
|
traccar
|
getUser
|
src/main/java/org/traccar/database/LdapProvider.java
|
e4f6e74e57ab743b65d49ae00f6624a20ca0291e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean validateProperty(Property property) {
logger.debug(EELFLoggerDelegator.debugLogger, " validateProperty() : Begin");
Gson gson = new Gson();
boolean isValid = false;
DataMap dMap = new DataMap();
dMap = property.getData_map();
boolean map_inputsFlag = false;
boolean map_outputsFlag = false;
JsonParser parser = new JsonParser();
try {
// if link if b/w 2 models
if (null == property || (null != property && null == property.getData_map())) {
map_inputsFlag = true;
map_outputsFlag = true;
} else {
// validate JSON structure if link is b/w model & Data mapper
parser.parse(gson.toJson(property));
// validate map_inputs
if (dMap.getMap_outputs().length == 0) {
MapInputs[] map_inputs = dMap.getMap_inputs();
if (map_inputs != null && map_inputs.length != 0) {
for (int i = 0; i < map_inputs.length; i++) {
if (map_inputs[i].getMessage_name() != null && map_inputs[i].getInput_fields() != null
&& map_inputs[i].getInput_fields().length != 0) {
map_inputsFlag = true;
map_outputsFlag = true;
}
}
}
}
// validate map_outputs
if (dMap.getMap_inputs().length == 0) {
MapOutput[] map_outputs = dMap.getMap_outputs();
if (map_outputs != null && map_outputs.length != 0) {
for (int i = 0; i < map_outputs.length; i++) {
if (map_outputs[i].getMessage_name() != null && map_outputs[i].getOutput_fields() != null
&& map_outputs[i].getOutput_fields().length != 0) {
map_outputsFlag = true;
map_inputsFlag = true;
}
}
}
}
}
if (map_outputsFlag == true && map_inputsFlag == true) {
isValid = true;
}
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in validateProperty() ", e);
isValid = false;
}
logger.debug(EELFLoggerDelegator.debugLogger, " validateProperty() : End");
return isValid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateProperty
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
validateProperty
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 0
|
Analyze the following code function for security vulnerabilities
|
final void setFocusedActivityLocked(ActivityRecord r, String reason) {
if (r != null && mFocusedActivity != r) {
if (DEBUG_FOCUS) Slog.d(TAG_FOCUS, "setFocusedActivityLocked: r=" + r);
ActivityRecord last = mFocusedActivity;
mFocusedActivity = r;
if (r.task.taskType != ActivityRecord.HOME_ACTIVITY_TYPE
&& r.task.taskType != ActivityRecord.RECENTS_ACTIVITY_TYPE) {
if (mCurAppTimeTracker != r.appTimeTracker) {
// We are switching app tracking. Complete the current one.
if (mCurAppTimeTracker != null) {
mCurAppTimeTracker.stop();
mHandler.obtainMessage(REPORT_TIME_TRACKER_MSG,
mCurAppTimeTracker).sendToTarget();
mStackSupervisor.clearOtherAppTimeTrackers(r.appTimeTracker);
mCurAppTimeTracker = null;
}
if (r.appTimeTracker != null) {
mCurAppTimeTracker = r.appTimeTracker;
startTimeTrackingFocusedActivityLocked();
}
} else {
startTimeTrackingFocusedActivityLocked();
}
} else {
r.appTimeTracker = null;
}
if (r.task != null && r.task.voiceInteractor != null) {
startRunningVoiceLocked(r.task.voiceSession, r.info.applicationInfo.uid);
} else {
finishRunningVoiceLocked();
if (last != null && last.task.voiceSession != null) {
// We had been in a voice interaction session, but now focused has
// move to something different. Just finish the session, we can't
// return to it and retain the proper state and synchronization with
// the voice interaction service.
finishVoiceTask(last.task.voiceSession);
}
}
if (mStackSupervisor.setFocusedStack(r, reason + " setFocusedActivity")) {
mWindowManager.setFocusedApp(r.appToken, true);
}
applyUpdateLockStateLocked(r);
if (mFocusedActivity.userId != mLastFocusedUserId) {
mHandler.removeMessages(FOREGROUND_PROFILE_CHANGED_MSG);
mHandler.sendMessage(mHandler.obtainMessage(FOREGROUND_PROFILE_CHANGED_MSG,
mFocusedActivity.userId, 0));
mLastFocusedUserId = mFocusedActivity.userId;
}
}
EventLog.writeEvent(EventLogTags.AM_FOCUSED_ACTIVITY,
mFocusedActivity == null ? -1 : mFocusedActivity.userId,
mFocusedActivity == null ? "NULL" : mFocusedActivity.shortComponentName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFocusedActivityLocked
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
|
setFocusedActivityLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeHeaders(final String iContentType, final boolean iKeepAlive) throws IOException {
if (headers != null) {
writeLine(headers);
}
writeLine("Date: " + new Date());
writeLine("Content-Type: " + iContentType + "; charset=" + characterSet);
writeLine("Server: " + serverInfo);
writeLine("Connection: " + (iKeepAlive ? "Keep-Alive" : "close"));
// SET CONTENT ENCDOING
if (contentEncoding != null && contentEncoding.length() > 0) {
writeLine("Content-Encoding: " + contentEncoding);
}
// INCLUDE COMMON CUSTOM HEADERS
if (additionalHeaders != null) {
for (String h : additionalHeaders) {
writeLine(h);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeHeaders
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
writeHeaders
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isPrimitive(Class<?> clazz) {
return isPrimitive2(clazz);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPrimitive
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
isPrimitive
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClassLoader getClassLoader() {
return classLoader;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassLoader
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
getClassLoader
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isAtmosphereAvailable() {
if (atmosphereAvailable == null) {
atmosphereAvailable = checkAtmosphereSupport();
}
return atmosphereAvailable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAtmosphereAvailable
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
isAtmosphereAvailable
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void sendSmsByPstn(SmsTracker tracker);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSmsByPstn
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
sendSmsByPstn
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder credentials(ClickHouseCredentials credentials) {
this.credentials = credentials;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: credentials
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
credentials
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void delete(AsyncResult<SQLConnection> connection, String table, Object entity,
Handler<AsyncResult<UpdateResult>> replyHandler) {
try {
long start = System.nanoTime();
if (connection.failed()) {
replyHandler.handle(Future.failedFuture(connection.cause()));
return;
}
String json = pojo2json(entity);
String sql = DELETE + FROM + schemaName + DOT + table + WHERE + DEFAULT_JSONB_FIELD_NAME + "@>?";
log.debug("delete by entity, query = " + sql + "; ?=" + json);
connection.result().updateWithParams(sql, new JsonArray().add(json), delete -> {
statsTracker(DELETE_STAT_METHOD, table, start);
if (delete.failed()) {
log.error(delete.cause().getMessage(), delete.cause());
replyHandler.handle(Future.failedFuture(delete.cause()));
return;
}
replyHandler.handle(Future.succeededFuture(delete.result()));
});
} catch (Exception e) {
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
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
|
delete
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private File getLogoFile() {
return new File(Bootstrap.getSiteDir(), "logo.png");
}
|
Vulnerability Classification:
- CWE: CWE-552
- CVE: CVE-2022-39208
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix security vulnerability issue regarding site/* access
Function: getLogoFile
File: server-core/src/main/java/io/onedev/server/web/page/admin/brandingsetting/BrandingSettingPage.java
Repository: theonedev/onedev
Fixed Code:
private File getLogoFile() {
return new File(Bootstrap.getSiteDir(), "assets/logo.png");
}
|
[
"CWE-552"
] |
CVE-2022-39208
|
HIGH
| 7.5
|
theonedev/onedev
|
getLogoFile
|
server-core/src/main/java/io/onedev/server/web/page/admin/brandingsetting/BrandingSettingPage.java
|
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
| 1
|
Analyze the following code function for security vulnerabilities
|
public void close() {
try {
connectionManager.destroy();
clientTransport.shutdownNow();
final ExecutorService service = clientConfig.executorService();
// service may be null due to a custom configuration that
// leverages Grizzly's SameThreadIOStrategy.
if (service != null) {
service.shutdown();
}
if (timeoutExecutor != null) {
timeoutExecutor.stop();
final ExecutorService threadPool = timeoutExecutor.getThreadPool();
if (threadPool != null) {
threadPool.shutdownNow();
}
}
} catch (IOException ignored) {
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
close
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void join(JoinBy from, JoinBy to, String operation, String joinType,
Class<T> returnedClazz, String where,
Handler<AsyncResult<Results<T>>> replyHandler){
String filter = "";
if(where != null){
filter = where;
}
join(from, to, operation, joinType, filter, returnedClazz, true, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
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
|
join
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean disable() {
enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission");
debugLog("disable() called...");
Message m = mAdapterStateMachine.obtainMessage(AdapterState.BLE_TURN_OFF);
mAdapterStateMachine.sendMessage(m);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disable
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
disable
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setNetworkRecoveryInterval(long networkRecoveryInterval) {
this.networkRecoveryInterval = networkRecoveryInterval;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNetworkRecoveryInterval
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setNetworkRecoveryInterval
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void bootAnimationComplete() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(BOOT_ANIMATION_COMPLETE_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bootAnimationComplete
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
bootAnimationComplete
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getAllowedGroups()
{
List<String> groups = getProperty(PROP_GROUPS_ALLOWED, List.class);
return groups != null && !groups.isEmpty() ? groups : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllowedGroups
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
getAllowedGroups
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onSelectionChanged(final Boolean newSelection)
{
parentPage.refresh();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSelectionChanged
File: src/main/java/org/projectforge/web/task/TaskTreeForm.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
onSelectionChanged
|
src/main/java/org/projectforge/web/task/TaskTreeForm.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressLint("ClickableViewAccessibility")
private void initViews() {
Log.d(TAG, "initViews");
binding.callInfosLinearLayout.setVisibility(View.VISIBLE);
binding.selfVideoViewWrapper.setVisibility(View.VISIBLE);
if (!isPipModePossible()) {
binding.pictureInPictureButton.setVisibility(View.GONE);
}
if (isVoiceOnlyCall) {
binding.switchSelfVideoButton.setVisibility(View.GONE);
binding.cameraButton.setVisibility(View.GONE);
binding.selfVideoRenderer.setVisibility(View.GONE);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.BELOW, R.id.callInfosLinearLayout);
int callControlsHeight = Math.round(getApplicationContext().getResources().getDimension(R.dimen.call_controls_height));
params.setMargins(0, 0, 0, callControlsHeight);
binding.gridview.setLayoutParams(params);
} else {
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(0, 0, 0, 0);
binding.gridview.setLayoutParams(params);
if (cameraEnumerator.getDeviceNames().length < 2) {
binding.switchSelfVideoButton.setVisibility(View.GONE);
}
initSelfVideoView();
}
binding.gridview.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent me) {
int action = me.getActionMasked();
if (action == MotionEvent.ACTION_DOWN) {
animateCallControls(true, 0);
}
return false;
}
});
binding.conversationRelativeLayout.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent me) {
int action = me.getActionMasked();
if (action == MotionEvent.ACTION_DOWN) {
animateCallControls(true, 0);
}
return false;
}
});
animateCallControls(true, 0);
initGridAdapter();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initViews
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
initViews
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static JenkinsLocationConfiguration get() {
return GlobalConfiguration.all().get(JenkinsLocationConfiguration.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2014-9634
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
get
|
core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
|
582128b9ac179a788d43c1478be8a5224dc19710
| 0
|
Analyze the following code function for security vulnerabilities
|
public void overrideResourceableId(Long newId) {
typeId = newId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: overrideResourceableId
File: src/main/java/org/olat/fileresource/types/FileResource.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
overrideResourceableId
|
src/main/java/org/olat/fileresource/types/FileResource.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void attach() {
super.attach();
attachDataProviderListener();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attach
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
attach
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
Call createCallForExistingConnection(String callId, ParcelableConnection connection) {
Call call = new Call(
mContext,
mConnectionServiceRepository,
connection.getHandle() /* handle */,
null /* gatewayInfo */,
null /* connectionManagerPhoneAccount */,
connection.getPhoneAccount(), /* targetPhoneAccountHandle */
false /* isIncoming */,
false /* isConference */);
setCallState(call, Call.getStateFromConnectionState(connection.getState()));
call.setConnectionCapabilities(connection.getConnectionCapabilities());
call.setCallerDisplayName(connection.getCallerDisplayName(),
connection.getCallerDisplayNamePresentation());
call.addListener(this);
addCall(call);
return call;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCallForExistingConnection
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
createCallForExistingConnection
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSlug() {
return slug;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSlug
File: src/main/java/cn/luischen/model/ContentDomain.java
Repository: WinterChenS/my-site
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29638
|
MEDIUM
| 5.4
|
WinterChenS/my-site
|
getSlug
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getToolkit(Document document) {
NodeList xmpmeta = document.getElementsByTagNameNS(XMP.NS_X, "xmpmeta");
if (xmpmeta == null || xmpmeta.getLength() <= 0) {
return null;
}
Node toolkit = xmpmeta.item(0).getAttributes().getNamedItemNS(XMP.NS_X, "xmptk");
return toolkit != null ? toolkit.getNodeValue() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getToolkit
File: imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
Repository: haraldk/TwelveMonkeys
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-23792
|
HIGH
| 7.5
|
haraldk/TwelveMonkeys
|
getToolkit
|
imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
|
da4efe98bf09e1cce91b7633cb251958a200fc80
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.