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
|
@Programming
public String getURLContent(String surl) throws IOException
{
if (!hasProgrammingRights()) {
return "";
}
try {
return this.xwiki.getURLContent(surl, this.context);
} catch (Exception e) {
LOGGER.warn("Failed to retrieve content from [" + surl + "]", e);
return "";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLContent
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
|
getURLContent
|
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
|
@Override
public Type getType() {
return type;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getType
File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getType
|
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
public Token getNextToken()
{
Token matchedToken;
int curPos = 0;
EOFLoop :
for (;;)
{
try
{
curChar = input_stream.BeginToken();
}
catch(java.io.IOException e)
{
jjmatchedKind = 0;
matchedToken = jjFillToken();
return matchedToken;
}
image = jjimage;
image.setLength(0);
jjimageLen = 0;
switch(curLexState)
{
case 0:
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0();
break;
case 1:
try { input_stream.backup(0);
while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
curChar = input_stream.BeginToken();
}
catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
if (jjmatchedPos == 0 && jjmatchedKind > 62)
{
jjmatchedKind = 62;
}
break;
case 2:
try { input_stream.backup(0);
while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
curChar = input_stream.BeginToken();
}
catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_2();
if (jjmatchedPos == 0 && jjmatchedKind > 62)
{
jjmatchedKind = 62;
}
break;
}
if (jjmatchedKind != 0x7fffffff)
{
if (jjmatchedPos + 1 < curPos)
input_stream.backup(curPos - jjmatchedPos - 1);
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{
matchedToken = jjFillToken();
TokenLexicalActions(matchedToken);
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
return matchedToken;
}
else
{
if (jjnewLexState[jjmatchedKind] != -1)
curLexState = jjnewLexState[jjmatchedKind];
continue EOFLoop;
}
}
int error_line = input_stream.getEndLine();
int error_column = input_stream.getEndColumn();
String error_after = null;
boolean EOFSeen = false;
try { input_stream.readChar(); input_stream.backup(1); }
catch (java.io.IOException e1) {
EOFSeen = true;
error_after = curPos <= 1 ? "" : input_stream.GetImage();
if (curChar == '\n' || curChar == '\r') {
error_line++;
error_column = 0;
}
else
error_column++;
}
if (!EOFSeen) {
input_stream.backup(1);
error_after = curPos <= 1 ? "" : input_stream.GetImage();
}
throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextToken
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
getNextToken
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
ContentVideoViewClient getContentVideoViewClient() {
return getContentViewClient().getContentVideoViewClient();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentVideoViewClient
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
getContentVideoViewClient
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasBindAppWidgetPermission(String packageName, int grantId) {
if (DEBUG) {
Slog.i(TAG, "hasBindAppWidgetPermission() " + UserHandle.getCallingUserId());
}
// A special permission is required for managing white listing.
mSecurityPolicy.enforceModifyAppWidgetBindPermissions(packageName);
synchronized (mLock) {
// The grants are stored in user state wich gets the grant.
ensureGroupStateLoadedLocked(grantId);
final int packageUid = getUidForPackage(packageName, grantId);
if (packageUid < 0) {
return false;
}
Pair<Integer, String> packageId = Pair.create(grantId, packageName);
return mPackagesWithBindWidgetPermission.contains(packageId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasBindAppWidgetPermission
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
hasBindAppWidgetPermission
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforcePermission(String permission, String callerPackageName, int targetUserId)
throws SecurityException {
enforcePermission(permission, callerPackageName);
if (targetUserId != getCallerIdentity(callerPackageName).getUserId()) {
enforcePermission(CROSS_USER_PERMISSIONS.get(permission), callerPackageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePermission
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
|
enforcePermission
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void createRestrictedFile(File file, boolean isDir, boolean writableByOwner) throws IOException {
File tempFile = new File(file.getCanonicalPath() + ".temp");
if (isDir) {
if (!tempFile.mkdir()) {
throw new IOException("Cant create directory {} " + tempFile);
}
} else {
if (!tempFile.createNewFile()) {
throw new IOException("Cant create file {} " + tempFile);
}
}
if (OsUtil.isWindows()) {
// prepare ACL flags
Set<AclEntryFlag> flags = new LinkedHashSet<>();
if (tempFile.isDirectory()) {
flags.add(AclEntryFlag.DIRECTORY_INHERIT);
flags.add(AclEntryFlag.FILE_INHERIT);
}
// prepare ACL permissions
Set<AclEntryPermission> permissions = new LinkedHashSet<>();
permissions.addAll(Arrays.asList(
AclEntryPermission.READ_DATA,
AclEntryPermission.READ_NAMED_ATTRS,
AclEntryPermission.EXECUTE,
AclEntryPermission.READ_ATTRIBUTES,
AclEntryPermission.READ_ACL,
AclEntryPermission.SYNCHRONIZE));
if (writableByOwner) {
permissions.addAll(Arrays.asList(
AclEntryPermission.WRITE_DATA,
AclEntryPermission.APPEND_DATA,
AclEntryPermission.WRITE_NAMED_ATTRS,
AclEntryPermission.DELETE_CHILD,
AclEntryPermission.WRITE_ATTRIBUTES,
AclEntryPermission.DELETE,
AclEntryPermission.WRITE_ACL,
AclEntryPermission.WRITE_OWNER));
}
// filter ACL's leaving only root and owner
AclFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), AclFileAttributeView.class);
List<AclEntry> list = new ArrayList<>();
String owner = view.getOwner().getName();
for (AclEntry ae : view.getAcl()) {
String principalName = ae.principal().getName();
if (WIN_ROOT_PRINCIPALS.contains(principalName) || owner.equals(principalName)) {
list.add(AclEntry.newBuilder()
.setType(AclEntryType.ALLOW)
.setPrincipal(ae.principal())
.setPermissions(permissions)
.setFlags(flags)
.build());
}
}
// apply ACL
view.setAcl(list);
} else {
// remove all permissions
if (!tempFile.setExecutable(false, false)) {
throw new IOException("Removing execute permissions on file " + tempFile + " failed ");
}
if (!tempFile.setReadable(false, false)) {
throw new IOException("Removing read permission on file " + tempFile + " failed ");
}
if (!tempFile.setWritable(false, false)) {
throw new IOException("Removing write permissions on file " + tempFile + " failed ");
}
// allow owner to read
if (!tempFile.setReadable(true, true)) {
throw new IOException("Acquiring read permissions on file " + tempFile + " failed");
}
// allow owner to write
if (writableByOwner && !tempFile.setWritable(true, true)) {
throw new IOException("Acquiring write permissions on file " + tempFile + " failed");
}
// allow owner to enter directories
if (isDir && !tempFile.setExecutable(true, true)) {
throw new IOException("Acquiring execute permissions on file " + tempFile + " failed");
}
}
// rename this file. Unless the file is moved/renamed, any program that
// opened the file right after it was created might still be able to
// read the data.
if (!tempFile.renameTo(file)) {
throw new IOException("Cant rename " + tempFile + " to " + file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createRestrictedFile
File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
createRestrictedFile
|
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteViews createHeadsUpContentView(boolean increasedHeight) {
if (useExistingRemoteView(mN.headsUpContentView)) {
return fullyCustomViewRequiresDecoration(false /* fromStyle */)
? minimallyDecoratedHeadsUpContentView(mN.headsUpContentView)
: mN.headsUpContentView;
} else if (mStyle != null) {
final RemoteViews styleView = mStyle.makeHeadsUpContentView(increasedHeight);
if (styleView != null) {
return fullyCustomViewRequiresDecoration(true /* fromStyle */)
? minimallyDecoratedHeadsUpContentView(styleView) : styleView;
}
} else if (mActions.size() == 0) {
return null;
}
// We only want at most a single remote input history to be shown here, otherwise
// the content would become squished.
StandardTemplateParams p = mParams.reset()
.viewType(StandardTemplateParams.VIEW_TYPE_HEADS_UP)
.fillTextsFrom(this)
.setMaxRemoteInputHistory(1);
return applyStandardTemplateWithActions(getHeadsUpBaseLayoutResource(), p,
null /* result */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createHeadsUpContentView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
createHeadsUpContentView
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClientConfig getDefaultClientConfig() {
ClientConfig clientConfig = new ClientConfig();
clientConfig.register(MultiPartFeature.class);
clientConfig.register(json);
clientConfig.register(JacksonFeature.class);
clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
// turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL);
} else {
// suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE);
}
return clientConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultClientConfig
File: samples/client/petstore/java/jersey2-java8/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
|
getDefaultClientConfig
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
final ProcessRecord addAppLocked(ApplicationInfo info, boolean isolated,
String abiOverride) {
ProcessRecord app;
if (!isolated) {
app = getProcessRecordLocked(info.processName, info.uid, true);
} else {
app = null;
}
if (app == null) {
app = newProcessRecordLocked(info, null, isolated, 0);
mProcessNames.put(info.processName, app.uid, app);
if (isolated) {
mIsolatedProcesses.put(app.uid, app);
}
updateLruProcessLocked(app, false, null);
updateOomAdjLocked();
}
// This package really, really can not be stopped.
try {
AppGlobals.getPackageManager().setPackageStoppedState(
info.packageName, false, UserHandle.getUserId(app.uid));
} catch (RemoteException e) {
} catch (IllegalArgumentException e) {
Slog.w(TAG, "Failed trying to unstop package "
+ info.packageName + ": " + e);
}
if ((info.flags&(ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PERSISTENT))
== (ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PERSISTENT)) {
app.persistent = true;
app.maxAdj = ProcessList.PERSISTENT_PROC_ADJ;
}
if (app.thread == null && mPersistentStartingProcesses.indexOf(app) < 0) {
mPersistentStartingProcesses.add(app);
startProcessLocked(app, "added application", app.processName, abiOverride,
null /* entryPoint */, null /* entryPointArgs */);
}
return app;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAppLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
addAppLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract boolean handleFailedAttempt();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleFailedAttempt
File: services/core/java/com/android/server/fingerprint/AuthenticationClient.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleFailedAttempt
|
services/core/java/com/android/server/fingerprint/AuthenticationClient.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
if (ACTION_STRONG_AUTH_TIMEOUT.equals(intent.getAction())) {
int userId = intent.getIntExtra(USER_ID, -1);
mStrongAuthNotTimedOut.remove(userId);
notifyStrongAuthStateChanged(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onReceive
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void postToTarget(HttpServletResponse response, PrintWriter out,
List assertion, String targeturl, Map attrMap) throws IOException {
out.println("<HTML>");
out.println("<HEAD>\n");
out.println("<TITLE>Access rights validated</TITLE>\n");
out.println("</HEAD>\n");
out.println("<BODY Onload=\"document.forms[0].submit()\">");
Iterator it = null;
if (SAMLUtils.debug.messageEnabled()) {
out.println("<H1>Access rights validated</H1>\n");
out.println("<meta http-equiv=\"refresh\" content=\"20\">\n");
out.println("<P>We have verified your access rights <STRONG>" +
"</STRONG> according to the assertion shown "
+"below. \n");
out.println("You are being redirected to the resource.\n");
out.println("Please wait ......\n");
out.println("</P>\n");
out.println("<HR><P>\n");
if (assertion != null) {
it = assertion.iterator();
while (it.hasNext()) {
out.println(SAMLUtils.displayXML((String)it.next()));
}
}
out.println("</P>\n");
}
out.println("<FORM METHOD=\"POST\" ACTION=\"" + targeturl + "\">");
if (assertion != null) {
it = assertion.iterator();
while (it.hasNext()) {
out.println("<INPUT TYPE=\"HIDDEN\" NAME=\""+
SAMLConstants.POST_ASSERTION_NAME + "\"");
out.println("VALUE=\"" +
URLEncDec.encode((String)it.next()) + "\">");
}
}
if (attrMap != null && !attrMap.isEmpty()) {
StringBuffer attrNamesSB = new StringBuffer();
Set entrySet = attrMap.entrySet();
for(Iterator iter = entrySet.iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry)iter.next();
String attrName = HTMLEncode((String)entry.getKey(), '\"');
String attrValue = HTMLEncode((String)entry.getValue(), '\"');
out.println("<INPUT TYPE=\"HIDDEN\" NAME=\""+ attrName +
"\" VALUE=\"" + attrValue + "\">");
if (attrNamesSB.length() > 0) {
attrNamesSB.append(":");
}
attrNamesSB.append(attrName);
}
out.println("<INPUT TYPE=\"HIDDEN\" NAME=\""+
SAMLConstants.POST_ATTR_NAMES + "\" VALUE=\"" +
attrNamesSB + "\">");
}
out.println("</FORM>");
out.println("</BODY></HTML>");
out.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postToTarget
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
postToTarget
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
public static IntentFilter getPackageFilter(String pkg, String... actions) {
IntentFilter packageFilter = new IntentFilter();
for (String action : actions) {
packageFilter.addAction(action);
}
packageFilter.addDataScheme("package");
packageFilter.addDataSchemeSpecificPart(pkg, PatternMatcher.PATTERN_LITERAL);
return packageFilter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageFilter
File: src/com/android/launcher3/util/PackageManagerHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-40097
|
HIGH
| 7.8
|
android
|
getPackageFilter
|
src/com/android/launcher3/util/PackageManagerHelper.java
|
6c9a41117d5a9365cf34e770bbb00138f6bf997e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getOrderClause(Set<String> joinAliases, String alias, Order order) {
String property = order.getProperty();
boolean qualifyReference = !property.contains("("); // ( indicates a function
for (String joinAlias : joinAliases) {
if (property.startsWith(joinAlias.concat("."))) {
qualifyReference = false;
break;
}
}
String reference = qualifyReference && StringUtils.hasText(alias) ? String.format("%s.%s", alias, property)
: property;
String wrapped = order.isIgnoreCase() ? String.format("lower(%s)", reference) : reference;
return String.format("%s %s", wrapped, toJpaDirection(order));
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-6652
- Severity: MEDIUM
- CVSS Score: 6.8
Description: DATAJPA-965 - Fix potential blind SQL injection in Sort when used in combination with @Query.
We now decline sort expressions that contain functions such as ORDER BY LENGTH(name) when used with repository having a String query defined via the @Query annotation.
Think of a query method as follows:
@Query("select p from Person p where LOWER(p.lastname) = LOWER(:lastname)")
List<Person> findByLastname(@Param("lastname") String lastname, Sort sort);
Calls to findByLastname("lannister", new Sort("LENGTH(firstname)")) from now on throw an Exception indicating function calls are not allowed within the _ORDER BY_ clause. However you still can use JpaSort.unsafe("LENGTH(firstname)") to restore the behavior.
Kudos to Niklas Särökaari, Joona Immonen, Arto Santala, Antti Virtanen, Michael Holopainen and Antti Ahola who brought this to our attention.
Function: getOrderClause
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
Fixed Code:
private static String getOrderClause(Set<String> joinAliases, Set<String> functionAlias, String alias, Order order) {
String property = order.getProperty();
checkSortExpression(order);
if (functionAlias.contains(property)) {
return String.format("%s %s", property, toJpaDirection(order));
}
boolean qualifyReference = !property.contains("("); // ( indicates a function
for (String joinAlias : joinAliases) {
if (property.startsWith(joinAlias.concat("."))) {
qualifyReference = false;
break;
}
}
String reference = qualifyReference && StringUtils.hasText(alias) ? String.format("%s.%s", alias, property)
: property;
String wrapped = order.isIgnoreCase() ? String.format("lower(%s)", reference) : reference;
return String.format("%s %s", wrapped, toJpaDirection(order));
}
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
getOrderClause
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 1
|
Analyze the following code function for security vulnerabilities
|
private void parseAttachments(final Element root) throws GameParseException {
for (final Element current : getChildren("attachment", root)) {
final String className = current.getAttribute("javaClass");
final Attachable attachable = findAttachment(current, current.getAttribute("type"));
final String name = current.getAttribute("name");
final List<Element> options = getChildren("option", current);
final IAttachment attachment = xmlGameElementMapper.newAttachment(className, name, attachable, data)
.orElseThrow(() -> newGameParseException("Attachment of type " + className + " could not be instantiated"));
attachable.addAttachment(name, attachment);
final List<Tuple<String, String>> attachmentOptionValues = setValues(attachment, options);
// keep a list of attachment references in the order they were added
data.addToAttachmentOrderAndValues(Tuple.of(attachment, attachmentOptionValues));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseAttachments
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseAttachments
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void notifyLaunchTaskBehindComplete(IBinder token) {
mStackSupervisor.scheduleLaunchTaskBehindComplete(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyLaunchTaskBehindComplete
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
notifyLaunchTaskBehindComplete
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private InputStream readFile(String source) {
//Let's wrap the code to a callable inner class to avoid NoClassDef when loading this class.
try {
return new Callable<InputStream>() {
@Override
public InputStream call() {
try {
PipedOutputStream out = new PipedOutputStream();
PipedInputStream in = new PipedInputStream(out, 1024);
ExecWatch watch = writingOutput(out).usingListener(new ExecListener() {
@Override
public void onOpen(Response response) {
}
@Override
public void onFailure(Throwable t, Response response) {
}
@Override
public void onClose(int code, String reason) {
try {
out.flush();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}).exec("sh", "-c", "cat " + source + "|" + "base64");
return new org.apache.commons.codec.binary.Base64InputStream(in);
} catch (Exception e) {
throw KubernetesClientException.launderThrowable(e);
}
}
}.call();
} catch (NoClassDefFoundError e) {
throw new KubernetesClientException("Base64InputStream class is provided by commons-codec, an optional dependency. To use the read/copy functionality you must explicitly add this dependency to the classpath.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFile
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
readFile
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated
public DynamicForm bind(Lang lang, TypedMap attrs, JsonNode data, String... allowedFields) {
logger.warn(
"Binding json field from form with a hardcoded max size of {} bytes. This is deprecated. Use bind(Lang, TypedMap, JsonNode, Long, String...) instead.",
maxJsonChars());
return bind(lang, attrs, data, maxJsonChars(), allowedFields);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bind
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
|
bind
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testSerializationAsTimestamp01Nanoseconds() throws Exception
{
Instant date = Instant.ofEpochSecond(0L);
String value = MAPPER.writer()
.with(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.with(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS)
.writeValueAsString(date);
assertNotNull("The value should not be null.", value);
assertEquals("The value is not correct.", NO_NANOSECS_SER, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSerializationAsTimestamp01Nanoseconds
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
|
testSerializationAsTimestamp01Nanoseconds
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
void setLoadFields(ObjectStreamField[] f) {
loadFields = f;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLoadFields
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
setLoadFields
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setManagerPassword(String managerPassword) {
this.managerPassword = managerPassword;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setManagerPassword
File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-90"
] |
CVE-2021-32651
|
MEDIUM
| 4.3
|
theonedev/onedev
|
setManagerPassword
|
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
|
4440f0c57e440488d7e653417b2547eaae8ad19c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setOverrideKeepProfilesRunning(boolean enabled) {
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
setKeepProfileRunningEnabledUnchecked(enabled);
Slog.i(LOG_TAG, "Keep profiles running overridden to: " + enabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOverrideKeepProfilesRunning
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
|
setOverrideKeepProfilesRunning
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int count() {
return count(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: count
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
count
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, Object> createMessage(InstanceEvent event, Instance instance) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("chat_id", this.chatId);
parameters.put("parse_mode", this.parseMode);
parameters.put("disable_notification", this.disableNotify);
parameters.put("text", getText(event, instance));
return parameters;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
createMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setMaxSkipDepth(int depth) {
maxSkipDepth = depth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaxSkipDepth
File: thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-755"
] |
CVE-2019-3559
|
MEDIUM
| 5
|
facebook/fbthrift
|
setMaxSkipDepth
|
thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
|
a56346ceacad28bf470017a6bda1d5518d0bd943
| 0
|
Analyze the following code function for security vulnerabilities
|
public Style getStyle() {
return mStyle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStyle
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getStyle
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateNotification(Entry entry, PackageManager pmUser,
StatusBarNotification sbn, ExpandableNotificationRow row) {
row.setNeedsRedaction(needsRedaction(entry));
boolean isLowPriority = mNotificationData.isAmbient(sbn.getKey());
boolean isUpdate = mNotificationData.get(entry.key) != null;
boolean wasLowPriority = row.isLowPriority();
row.setIsLowPriority(isLowPriority);
row.setLowPriorityStateUpdated(isUpdate && (wasLowPriority != isLowPriority));
// bind the click event to the content area
mNotificationClicker.register(row, sbn);
// Extract target SDK version.
try {
ApplicationInfo info = pmUser.getApplicationInfo(sbn.getPackageName(), 0);
entry.targetSdk = info.targetSdkVersion;
} catch (NameNotFoundException ex) {
Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex);
}
row.setLegacy(entry.targetSdk >= Build.VERSION_CODES.GINGERBREAD
&& entry.targetSdk < Build.VERSION_CODES.LOLLIPOP);
entry.setIconTag(R.id.icon_is_pre_L, entry.targetSdk < Build.VERSION_CODES.LOLLIPOP);
entry.autoRedacted = entry.notification.getNotification().publicVersion == null;
entry.row = row;
entry.row.setOnActivatedListener(this);
boolean useIncreasedCollapsedHeight = mMessagingUtil.isImportantMessaging(sbn,
mNotificationData.getImportance(sbn.getKey()));
boolean useIncreasedHeadsUp = useIncreasedCollapsedHeight && mPanelExpanded;
row.setUseIncreasedCollapsedHeight(useIncreasedCollapsedHeight);
row.setUseIncreasedHeadsUpHeight(useIncreasedHeadsUp);
row.updateNotification(entry);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateNotification
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
|
updateNotification
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initGlobalSettingsDefaultValForWearLocked(String key, String val) {
final SettingsState globalSettings = getGlobalSettingsLocked();
Setting currentSetting = globalSettings.getSettingLocked(key);
if (currentSetting.isNull()) {
globalSettings.insertSettingOverrideableByRestoreLocked(
key,
val,
null /* tag */,
true /* makeDefault */,
SettingsState.SYSTEM_PACKAGE_NAME);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initGlobalSettingsDefaultValForWearLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
initGlobalSettingsDefaultValForWearLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fullBackup(ParcelFileDescriptor fd, boolean includeApks,
boolean includeObbs, boolean includeShared, boolean doWidgets,
boolean doAllApps, boolean includeSystem, boolean compress, String[] pkgList) {
mContext.enforceCallingPermission(android.Manifest.permission.BACKUP, "fullBackup");
final int callingUserHandle = UserHandle.getCallingUserId();
if (callingUserHandle != UserHandle.USER_OWNER) {
throw new IllegalStateException("Backup supported only for the device owner");
}
// Validate
if (!doAllApps) {
if (!includeShared) {
// If we're backing up shared data (sdcard or equivalent), then we can run
// without any supplied app names. Otherwise, we'd be doing no work, so
// report the error.
if (pkgList == null || pkgList.length == 0) {
throw new IllegalArgumentException(
"Backup requested but neither shared nor any apps named");
}
}
}
long oldId = Binder.clearCallingIdentity();
try {
// Doesn't make sense to do a full backup prior to setup
if (!deviceIsProvisioned()) {
Slog.i(TAG, "Full backup not supported before setup");
return;
}
if (DEBUG) Slog.v(TAG, "Requesting full backup: apks=" + includeApks
+ " obb=" + includeObbs + " shared=" + includeShared + " all=" + doAllApps
+ " system=" + includeSystem + " pkgs=" + pkgList);
Slog.i(TAG, "Beginning full backup...");
FullBackupParams params = new FullBackupParams(fd, includeApks, includeObbs,
includeShared, doWidgets, doAllApps, includeSystem, compress, pkgList);
final int token = generateToken();
synchronized (mFullConfirmations) {
mFullConfirmations.put(token, params);
}
// start up the confirmation UI
if (DEBUG) Slog.d(TAG, "Starting backup confirmation UI, token=" + token);
if (!startConfirmationUi(token, FullBackup.FULL_BACKUP_INTENT_ACTION)) {
Slog.e(TAG, "Unable to launch full backup confirmation");
mFullConfirmations.delete(token);
return;
}
// make sure the screen is lit for the user interaction
mPowerManager.userActivity(SystemClock.uptimeMillis(),
PowerManager.USER_ACTIVITY_EVENT_OTHER,
0);
// start the confirmation countdown
startConfirmationTimeout(token, params);
// wait for the backup to be performed
if (DEBUG) Slog.d(TAG, "Waiting for full backup completion...");
waitForCompletion(params);
} finally {
try {
fd.close();
} catch (IOException e) {
// just eat it
}
Binder.restoreCallingIdentity(oldId);
Slog.d(TAG, "Full backup processing complete.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fullBackup
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
fullBackup
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setJMSTimestamp(long timestamp) throws JMSException {
this.setLongProperty(JMS_MESSAGE_TIMESTAMP, timestamp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setJMSTimestamp
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
setJMSTimestamp
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void postUrlSync(final AwContents awContents,
CallbackHelper onPageFinishedHelper, final String url,
byte[] postData) throws Exception {
int currentCallCount = onPageFinishedHelper.getCallCount();
postUrlAsync(awContents, url, postData);
onPageFinishedHelper.waitForCallback(currentCallCount, 1, WAIT_TIMEOUT_MS,
TimeUnit.MILLISECONDS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postUrlSync
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
postUrlSync
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeLocationUpdates(Context context, PendingIntent pendingIntent) {
PlayServices.getInstance().removeLocationUpdates(getmGoogleApiClient(), context, pendingIntent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeLocationUpdates
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
removeLocationUpdates
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onActivityResult(int requestCode, int resultCode,
Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case CONFIRM_EXISTING_REQUEST:
if (resultCode != Activity.RESULT_OK) {
getActivity().setResult(RESULT_FINISHED);
getActivity().finish();
} else {
mCurrentCredential = data.getParcelableExtra(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
}
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onActivityResult
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
onActivityResult
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDeleteRecordKeepTrace(Boolean deleteRecordKeepTrace) {
this.deleteRecordKeepTrace = deleteRecordKeepTrace;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeleteRecordKeepTrace
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setDeleteRecordKeepTrace
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public Response authenticate(InputStream inputStream) {
return authenticate(Soap.extractSoapMessage(inputStream));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: authenticate
File: services/src/main/java/org/keycloak/protocol/saml/profile/ecp/SamlEcpProfileService.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2021-3827
|
MEDIUM
| 6.8
|
keycloak
|
authenticate
|
services/src/main/java/org/keycloak/protocol/saml/profile/ecp/SamlEcpProfileService.java
|
44000caaf5051d7f218d1ad79573bd3d175cad0d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public InputStream getResourceAsStream(String path) {
return classLoader.getResourceAsStream(resourceRoot + path);
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-3856
- Severity: MEDIUM
- CVSS Score: 4.3
Description: [KEYCLOAK-19422] ClassLoaderTheme and ClasspathThemeResourceProviderFactory allows reading any file available as a resource to the classloader
Function: getResourceAsStream
File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
Repository: keycloak
Fixed Code:
@Override
public InputStream getResourceAsStream(String path) throws IOException {
final URL rootResourceURL = classLoader.getResource(resourceRoot);
if (rootResourceURL == null) {
return null;
}
final String rootPath = rootResourceURL.getPath();
final URL resourceURL = classLoader.getResource(resourceRoot + path);
if(resourceURL == null || !resourceURL.getPath().startsWith(rootPath)) {
return null;
}
else {
return resourceURL.openConnection().getInputStream();
}
}
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getResourceAsStream
|
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public KeySet getKeySetByAlias(String packageName, String alias) {
if (packageName == null || alias == null) {
return null;
}
synchronized(mPackages) {
final PackageParser.Package pkg = mPackages.get(packageName);
if (pkg == null) {
Slog.w(TAG, "KeySet requested for unknown package:" + packageName);
throw new IllegalArgumentException("Unknown package: " + packageName);
}
KeySetManagerService ksms = mSettings.mKeySetManagerService;
return new KeySet(ksms.getKeySetByAliasAndPackageNameLPr(packageName, alias));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeySetByAlias
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
|
getKeySetByAlias
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<GridSortOrder<T>> getSortOrder() {
return Collections.unmodifiableList(sortOrder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSortOrder
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getSortOrder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getTextFilePath(String pi, String fileName, String format) throws PresentationException, IndexUnreachableException {
if (StringUtils.isEmpty(fileName)) {
throw new IllegalArgumentException("fileName may not be null or empty");
}
if (StringUtils.isEmpty(format)) {
throw new IllegalArgumentException("format may not be null or empty");
}
String dataFolderName = null;
switch (format) {
case SolrConstants.FILENAME_ALTO:
dataFolderName = DataManager.getInstance().getConfiguration().getAltoFolder();
break;
case SolrConstants.FILENAME_FULLTEXT:
dataFolderName = DataManager.getInstance().getConfiguration().getFulltextFolder();
break;
case SolrConstants.FILENAME_TEI:
dataFolderName = DataManager.getInstance().getConfiguration().getTeiFolder();
break;
}
return getDataFilePath(pi, dataFolderName, null, fileName).toAbsolutePath().toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTextFilePath
File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-15124
|
MEDIUM
| 4
|
intranda/goobi-viewer-core
|
getTextFilePath
|
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
|
44ceb8e2e7e888391e8a941127171d6366770df3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCustomParam(String name) {
return customParams.get(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCustomParam
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getCustomParam
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private AssessmentPackage processUnpackedZip(final File importSandboxDirectory)
throws AssessmentPackageDataImportException {
/* Expand content package */
final QtiContentPackageExtractor contentPackageExtractor = new QtiContentPackageExtractor(importSandboxDirectory);
QtiContentPackageSummary contentPackageSummary;
try {
contentPackageSummary = contentPackageExtractor.parse();
}
catch (final XmlResourceNotFoundException e) {
throw new AssessmentPackageDataImportException(ImportFailureReason.NOT_CONTENT_PACKAGE, e);
}
catch (final ImsManifestException e) {
throw new AssessmentPackageDataImportException(ImportFailureReason.BAD_IMS_MANIFEST, e);
}
logger.trace("Submitted content package was successfully parsed as {}", contentPackageSummary);
/* Build appropriate result based on number of item & test resources found */
final int testCount = contentPackageSummary.getTestResources().size();
final int itemCount = contentPackageSummary.getItemResources().size();
final AssessmentPackage assessmentPackage = new AssessmentPackage();
assessmentPackage.setImportType(AssessmentPackageImportType.CONTENT_PACKAGE);
assessmentPackage.setSandboxPath(importSandboxDirectory.getAbsolutePath());
if (testCount==1) {
/* Treat as a test */
logger.debug("Package contains 1 test resource, so treating this as an AssessmentTest");
assessmentPackage.setAssessmentType(AssessmentObjectType.ASSESSMENT_TEST);
assessmentPackage.setAssessmentHref(checkPackageFile(importSandboxDirectory,
contentPackageSummary.getTestResources().get(0).getHref()));
}
else if (testCount==0 && itemCount==1) {
/* Treat as an item */
logger.debug("Package contains 1 item resource and no test resources, so treating this as an AssessmentItem");
assessmentPackage.setAssessmentType(AssessmentObjectType.ASSESSMENT_ITEM);
assessmentPackage.setAssessmentHref(checkPackageFile(importSandboxDirectory,
contentPackageSummary.getItemResources().get(0).getHref()));
}
else {
/* Barf */
logger.debug("Package contains {} items and {} tests. Don't know how to deal with this", itemCount, testCount);
throw new AssessmentPackageDataImportException(ImportFailureReason.UNSUPPORTED_PACKAGE_CONTENTS, itemCount, testCount);
}
/* Build up Set of all files in the package. We need to be a bit careful to flag up the
* ones that correspond to QTI files. We'll assume that QTI files are the *first* ones
* listed in each item/test resource in the CP, though this is not clear from the CP spec
*/
final Set<String> packageQtiFileBuilder = new HashSet<String>();
final Set<String> packageSafeFileBuilder = new HashSet<String>();
buildPackageFileMap(importSandboxDirectory, packageQtiFileBuilder, packageSafeFileBuilder, contentPackageSummary.getItemResources());
buildPackageFileMap(importSandboxDirectory, packageQtiFileBuilder, packageSafeFileBuilder, contentPackageSummary.getTestResources());
assessmentPackage.setQtiFileHrefs(packageQtiFileBuilder);
assessmentPackage.setSafeFileHrefs(packageSafeFileBuilder);
return assessmentPackage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processUnpackedZip
File: qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentPackageFileImporter.java
Repository: davemckain/qtiworks
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39367
|
MEDIUM
| 6.5
|
davemckain/qtiworks
|
processUnpackedZip
|
qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentPackageFileImporter.java
|
1a46d6d842877ba2b824d5c269845827e2e0ccac
| 0
|
Analyze the following code function for security vulnerabilities
|
@BeforeClass
public static void doesNotCompleteOnWindows() {
final String os = System.getProperty("os.name").toLowerCase();
org.junit.Assume.assumeFalse(os.contains("win")); // RMB-261
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doesNotCompleteOnWindows
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
doesNotCompleteOnWindows
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
List<String> knownOortIds() {
return _membership.knownOortIds();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: knownOortIds
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
|
knownOortIds
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getIncludedPages()
{
return this.doc.getIncludedPages(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIncludedPages
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
|
getIncludedPages
|
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
|
int getPaddingBytes() {
if(paddingRandom == null) {
return 0;
}
return paddingRandom.nextInt(maxPadding);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPaddingBytes
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getPaddingBytes
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onInitialize()
{
super.onInitialize();
final Form<FormBean> hiddenForm = new Form<FormBean>("hiddenForm", new CompoundPropertyModel<FormBean>(new FormBean()));
hiddenForm.add(AttributeModifier.replace("data-mimetype", mimeType));
main.add(hiddenForm);
hiddenForm.add(new TextArea<String>("importString"));
hiddenForm.add(new TextArea<String>("importFileName"));
hiddenForm.add(new AjaxSubmitLink("submitButton") {
private static final long serialVersionUID = 6140567784494429257L;
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form< ? > form)
{
final FormBean modelObject = hiddenForm.getModel().getObject();
onStringImport(target, modelObject.importFileName, modelObject.importString);
}
@Override
protected void onError(final AjaxRequestTarget target, final Form< ? > form)
{
// nothing to do here
}
});
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2013-7251
- Severity: MEDIUM
- CVSS Score: 6.8
Description: CSRF protection.
Function: onInitialize
File: src/main/java/org/projectforge/web/wicket/components/DropFileContainer.java
Repository: micromata/projectforge-webapp
Fixed Code:
@Override
protected void onInitialize()
{
super.onInitialize();
final Form<FormBean> hiddenForm = new Form<FormBean>("hiddenForm", new CompoundPropertyModel<FormBean>(new FormBean()));
hiddenForm.add(AttributeModifier.replace("data-mimetype", mimeType));
main.add(hiddenForm);
hiddenForm.add(new TextArea<String>("importString"));
hiddenForm.add(new TextArea<String>("importFileName"));
hiddenForm.add(new AjaxSubmitLink("submitButton") {
private static final long serialVersionUID = 6140567784494429257L;
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form< ? > form)
{
csrfTokenHandler.onSubmit();
final FormBean modelObject = hiddenForm.getModel().getObject();
onStringImport(target, modelObject.importFileName, modelObject.importString);
}
@Override
protected void onError(final AjaxRequestTarget target, final Form< ? > form)
{
// nothing to do here
}
});
csrfTokenHandler = new CsrfTokenHandler(hiddenForm);
}
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
onInitialize
|
src/main/java/org/projectforge/web/wicket/components/DropFileContainer.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case COLLECT_PSS_BG_MSG: {
long start = SystemClock.uptimeMillis();
MemInfoReader memInfo = null;
synchronized (ActivityManagerService.this) {
if (mFullPssPending) {
mFullPssPending = false;
memInfo = new MemInfoReader();
}
}
if (memInfo != null) {
updateCpuStatsNow();
long nativeTotalPss = 0;
synchronized (mProcessCpuTracker) {
final int N = mProcessCpuTracker.countStats();
for (int j=0; j<N; j++) {
ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(j);
if (st.vsize <= 0 || st.uid >= Process.FIRST_APPLICATION_UID) {
// This is definitely an application process; skip it.
continue;
}
synchronized (mPidsSelfLocked) {
if (mPidsSelfLocked.indexOfKey(st.pid) >= 0) {
// This is one of our own processes; skip it.
continue;
}
}
nativeTotalPss += Debug.getPss(st.pid, null, null);
}
}
memInfo.readMemInfo();
synchronized (ActivityManagerService.this) {
if (DEBUG_PSS) Slog.d(TAG_PSS, "Collected native and kernel memory in "
+ (SystemClock.uptimeMillis()-start) + "ms");
final long cachedKb = memInfo.getCachedSizeKb();
final long freeKb = memInfo.getFreeSizeKb();
final long zramKb = memInfo.getZramTotalSizeKb();
final long kernelKb = memInfo.getKernelUsedSizeKb();
EventLogTags.writeAmMeminfo(cachedKb*1024, freeKb*1024, zramKb*1024,
kernelKb*1024, nativeTotalPss*1024);
mProcessStats.addSysMemUsageLocked(cachedKb, freeKb, zramKb, kernelKb,
nativeTotalPss);
}
}
int num = 0;
long[] tmp = new long[2];
do {
ProcessRecord proc;
int procState;
int pid;
long lastPssTime;
synchronized (ActivityManagerService.this) {
if (mPendingPssProcesses.size() <= 0) {
if (mTestPssMode || DEBUG_PSS) Slog.d(TAG_PSS,
"Collected PSS of " + num + " processes in "
+ (SystemClock.uptimeMillis() - start) + "ms");
mPendingPssProcesses.clear();
return;
}
proc = mPendingPssProcesses.remove(0);
procState = proc.pssProcState;
lastPssTime = proc.lastPssTime;
if (proc.thread != null && procState == proc.setProcState
&& (lastPssTime+ProcessList.PSS_SAFE_TIME_FROM_STATE_CHANGE)
< SystemClock.uptimeMillis()) {
pid = proc.pid;
} else {
proc = null;
pid = 0;
}
}
if (proc != null) {
long pss = Debug.getPss(pid, tmp, null);
synchronized (ActivityManagerService.this) {
if (pss != 0 && proc.thread != null && proc.setProcState == procState
&& proc.pid == pid && proc.lastPssTime == lastPssTime) {
num++;
recordPssSampleLocked(proc, procState, pss, tmp[0], tmp[1],
SystemClock.uptimeMillis());
}
}
}
} while (true);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleMessage
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
|
handleMessage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private Document getXmlDoc() {
if (this.xmlDoc != null) {
return this.xmlDoc;
}
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setExpandEntityReferences(false);
this.xmlDoc = factory.newDocumentBuilder()
.parse(new ByteArrayInputStream(this.xmlString.getBytes(StandardCharsets.UTF_8)));
return xmlDoc;
} catch (Exception e) {
throw new RuntimeException("非法的xml文本内容:\n" + this.xmlString, e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2019-5312
- Severity: HIGH
- CVSS Score: 7.5
Description: #903 disable DOCTYPE to fix XXE Vulnerability
Function: getXmlDoc
File: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java
Repository: Wechat-Group/WxJava
Fixed Code:
private Document getXmlDoc() {
if (this.xmlDoc != null) {
return this.xmlDoc;
}
try {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setExpandEntityReferences(false);
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
this.xmlDoc = factory.newDocumentBuilder()
.parse(new ByteArrayInputStream(this.xmlString.getBytes(StandardCharsets.UTF_8)));
return xmlDoc;
} catch (Exception e) {
throw new RuntimeException("非法的xml文本内容:\n" + this.xmlString, e);
}
}
|
[
"CWE-611"
] |
CVE-2019-5312
|
HIGH
| 7.5
|
Wechat-Group/WxJava
|
getXmlDoc
|
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java
|
8ec61d1328f50e23cd14285a950ca57a088b32b2
| 1
|
Analyze the following code function for security vulnerabilities
|
protected EmptyBlockChainingListener getEmptyBlockState()
{
return (EmptyBlockChainingListener) getListenerChain().getListener(EmptyBlockChainingListener.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEmptyBlockState
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
getEmptyBlockState
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void downloadBundle(String filename, OutputStream outputStream) throws IOException {
ensureFileWithinBundleDir(filename);
try {
final Path filePath = bundleDir.resolve(filename);
Files.copy(filePath, outputStream);
} catch (NoSuchFileException e) {
throw new NotFoundException(e);
} catch (Exception e) {
outputStream.close();
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2023-41044
- Severity: LOW
- CVSS Score: 3.8
Description: Merge pull request from GHSA-2q4p-f6gf-mqr5
* Fix filename validation in Support Bundle handling
The previous implementation of "SupportBundle#ensureFileWithinBundleDir"
was affected by a partial path traversal vulnerability and allowed
authenticated users with the Admin role to download or delete files in
sibling directories of the support bundle data directory.
See: https://github.com/Graylog2/graylog2-server/security/advisories/GHSA-2q4p-f6gf-mqr5
* Add changelog snippet
* Fix bundle download with relative data_dir config
* Fix test for the assertj version we are using in 5.1
* Fix another test case
Function: downloadBundle
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
Fixed Code:
public void downloadBundle(String filename, OutputStream outputStream) throws IOException {
ensureFileWithinBundleDir(bundleDir, filename);
try {
final Path filePath = bundleDir.resolve(filename);
Files.copy(filePath, outputStream);
} catch (NoSuchFileException e) {
throw new NotFoundException(e);
} catch (Exception e) {
outputStream.close();
}
}
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
downloadBundle
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 1
|
Analyze the following code function for security vulnerabilities
|
private org.w3c.dom.Document addSmilTrack(org.w3c.dom.Document smilDocument, Track track, long startTime)
throws IngestException {
if (MediaPackageElements.PRESENTER_SOURCE.getType().equals(track.getFlavor().getType())) {
return SmilUtil.addTrack(smilDocument, SmilUtil.TrackType.PRESENTER, track.hasVideo(), startTime,
track.getDuration(), track.getURI(), track.getIdentifier());
} else if (MediaPackageElements.PRESENTATION_SOURCE.getType().equals(track.getFlavor().getType())) {
return SmilUtil.addTrack(smilDocument, SmilUtil.TrackType.PRESENTATION, track.hasVideo(), startTime,
track.getDuration(), track.getURI(), track.getIdentifier());
} else {
logger.warn("Invalid partial flavor type {} of track {}", track.getFlavor(), track);
throw new IngestException(
"Invalid partial flavor type " + track.getFlavor().getType() + " of track " + track.getURI().toString());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSmilTrack
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
addSmilTrack
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private Map<String, Object> objectToMap(Map<String, Object> options, Object obj) {
if (obj != null) {
Map<Class<?>, Object> toMap =
(Map<Class<?>, Object>) options.getOrDefault(Printer.OBJECT_TO_MAP, Collections.emptyMap());
if (toMap.containsKey(obj.getClass())) {
return (Map<String, Object>) engine.execute(toMap.get(obj.getClass()), obj);
} else if (objectToMap.containsKey(obj.getClass())) {
return objectToMap.get(obj.getClass()).apply(obj);
}
}
return engine.toMap(obj);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: objectToMap
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
objectToMap
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int stopService(IApplicationThread caller, Intent service,
String resolvedType, int userId) {
enforceNotIsolatedCaller("stopService");
// Refuse possible leaked file descriptors
if (service != null && service.hasFileDescriptors() == true) {
throw new IllegalArgumentException("File descriptors passed in Intent");
}
synchronized(this) {
return mServices.stopServiceLocked(caller, service, resolvedType, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopService
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
stopService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void restoreFromRecycleBin(long index, String comment, XWikiContext context) throws XWikiException
{
XWikiDocument newdoc = getRecycleBinStore().restoreFromRecycleBin(index, context, true);
ObservationManager observation = getObservationManager();
if (observation != null) {
observation.notify(new DocumentRestoringEvent(newdoc.getDocumentReferenceWithLocale(), index), newdoc,
context);
}
saveDocument(newdoc, comment, context);
getRecycleBinStore().deleteFromRecycleBin(index, context, true);
if (observation != null) {
observation.notify(new DocumentRestoredEvent(newdoc.getDocumentReferenceWithLocale(), index), newdoc,
context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreFromRecycleBin
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-36092
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
restoreFromRecycleBin
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onAllReferencesReleased() {
dispose(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAllReferencesReleased
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
onAllReferencesReleased
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
// Note: this is only used by the script-injecting accessibility code.
mAccessibilityInjector.onInitializeAccessibilityNodeInfo(info);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInitializeAccessibilityNodeInfo
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onInitializeAccessibilityNodeInfo
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
ApplicationInfo getAppInfoForUser(ApplicationInfo info, int userId) {
if (info == null) return null;
ApplicationInfo newInfo = new ApplicationInfo(info);
newInfo.uid = applyUserId(info.uid, userId);
newInfo.dataDir = USER_DATA_DIR + userId + "/"
+ info.packageName;
return newInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppInfoForUser
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getAppInfoForUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean setConfigSettingsLocked(int key, String prefix,
Map<String, String> keyValues, String packageName) {
SettingsState settingsState = peekSettingsStateLocked(key);
if (settingsState != null) {
if (settingsState.isNewConfigBannedLocked(prefix, keyValues)) {
return false;
}
settingsState.unbanAllConfigIfBannedConfigUpdatedLocked(prefix);
List<String> changedSettings =
settingsState.setSettingsLocked(prefix, keyValues, packageName);
if (!changedSettings.isEmpty()) {
reportDeviceConfigUpdate(prefix);
notifyForConfigSettingsChangeLocked(key, prefix, changedSettings);
}
}
// keyValues aren't banned and can be set
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConfigSettingsLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
setConfigSettingsLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
void startLaunchTickingLocked() {
if (Build.IS_USER) {
return;
}
if (launchTickTime == 0) {
launchTickTime = SystemClock.uptimeMillis();
continueLaunchTicking();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLaunchTickingLocked
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
|
startLaunchTickingLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPasspointNetworkNominateHelper(
@Nullable PasspointNetworkNominateHelper nominateHelper) {
mPasspointNetworkNominateHelper = nominateHelper;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasspointNetworkNominateHelper
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setPasspointNetworkNominateHelper
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Before
public void before() throws Exception {
tsdb = NettyMocks.getMockedHTTPTSDB();
empty_query = mock(Query.class);
query_result = mock(Query.class);
rpc = new QueryRpc();
expressions = null;
when(tsdb.newQuery()).thenReturn(query_result);
when(empty_query.run()).thenReturn(new DataPoints[0]);
when(query_result.configureFromQuery((TSQuery)any(), anyInt()))
.thenReturn(Deferred.fromResult(null));
when(query_result.runAsync())
.thenReturn(Deferred.fromResult(new DataPoints[0]));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: before
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
before
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private AsymmetricCipherKeyPair genKeyPair()
{
if (!initialized)
{
initializeDefault();
}
// initialize authenticationPaths and treehash instances
byte[][][] currentAuthPaths = new byte[numLayer][][];
byte[][][] nextAuthPaths = new byte[numLayer - 1][][];
Treehash[][] currentTreehash = new Treehash[numLayer][];
Treehash[][] nextTreehash = new Treehash[numLayer - 1][];
Vector[] currentStack = new Vector[numLayer];
Vector[] nextStack = new Vector[numLayer - 1];
Vector[][] currentRetain = new Vector[numLayer][];
Vector[][] nextRetain = new Vector[numLayer - 1][];
for (int i = 0; i < numLayer; i++)
{
currentAuthPaths[i] = new byte[heightOfTrees[i]][mdLength];
currentTreehash[i] = new Treehash[heightOfTrees[i] - K[i]];
if (i > 0)
{
nextAuthPaths[i - 1] = new byte[heightOfTrees[i]][mdLength];
nextTreehash[i - 1] = new Treehash[heightOfTrees[i] - K[i]];
}
currentStack[i] = new Vector();
if (i > 0)
{
nextStack[i - 1] = new Vector();
}
}
// initialize roots
byte[][] currentRoots = new byte[numLayer][mdLength];
byte[][] nextRoots = new byte[numLayer - 1][mdLength];
// initialize seeds
byte[][] seeds = new byte[numLayer][mdLength];
// initialize seeds[] by copying starting-seeds of first trees of each
// layer
for (int i = 0; i < numLayer; i++)
{
System.arraycopy(currentSeeds[i], 0, seeds[i], 0, mdLength);
}
// initialize rootSigs
currentRootSigs = new byte[numLayer - 1][mdLength];
// -------------------------
// -------------------------
// --- calculation of current authpaths and current rootsigs (AUTHPATHS,
// SIG)------
// from bottom up to the root
for (int h = numLayer - 1; h >= 0; h--)
{
GMSSRootCalc tree = new GMSSRootCalc(this.heightOfTrees[h], this.K[h], digestProvider);
try
{
// on lowest layer no lower root is available, so just call
// the method with null as first parameter
if (h == numLayer - 1)
{
tree = this.generateCurrentAuthpathAndRoot(null, currentStack[h], seeds[h], h);
}
else
// otherwise call the method with the former computed root
// value
{
tree = this.generateCurrentAuthpathAndRoot(currentRoots[h + 1], currentStack[h], seeds[h], h);
}
}
catch (Exception e1)
{
e1.printStackTrace();
}
// set initial values needed for the private key construction
for (int i = 0; i < heightOfTrees[h]; i++)
{
System.arraycopy(tree.getAuthPath()[i], 0, currentAuthPaths[h][i], 0, mdLength);
}
currentRetain[h] = tree.getRetain();
currentTreehash[h] = tree.getTreehash();
System.arraycopy(tree.getRoot(), 0, currentRoots[h], 0, mdLength);
}
// --- calculation of next authpaths and next roots (AUTHPATHS+, ROOTS+)
// ------
for (int h = numLayer - 2; h >= 0; h--)
{
GMSSRootCalc tree = this.generateNextAuthpathAndRoot(nextStack[h], seeds[h + 1], h + 1);
// set initial values needed for the private key construction
for (int i = 0; i < heightOfTrees[h + 1]; i++)
{
System.arraycopy(tree.getAuthPath()[i], 0, nextAuthPaths[h][i], 0, mdLength);
}
nextRetain[h] = tree.getRetain();
nextTreehash[h] = tree.getTreehash();
System.arraycopy(tree.getRoot(), 0, nextRoots[h], 0, mdLength);
// create seed for the Merkle tree after next (nextNextSeeds)
// SEEDs++
System.arraycopy(seeds[h + 1], 0, this.nextNextSeeds[h], 0, mdLength);
}
// ------------
// generate JDKGMSSPublicKey
GMSSPublicKeyParameters publicKey = new GMSSPublicKeyParameters(currentRoots[0], gmssPS);
// generate the JDKGMSSPrivateKey
GMSSPrivateKeyParameters privateKey = new GMSSPrivateKeyParameters(currentSeeds, nextNextSeeds, currentAuthPaths,
nextAuthPaths, currentTreehash, nextTreehash, currentStack, nextStack, currentRetain, nextRetain, nextRoots, currentRootSigs, gmssPS, digestProvider);
// return the KeyPair
return (new AsymmetricCipherKeyPair(publicKey, privateKey));
}
|
Vulnerability Classification:
- CWE: CWE-470
- CVE: CVE-2018-1000613
- Severity: HIGH
- CVSS Score: 7.5
Description: added additional checking to XMSS BDS tree parsing. Failures now mostly cause IOException
Function: genKeyPair
File: core/src/main/java/org/bouncycastle/pqc/crypto/gmss/GMSSKeyPairGenerator.java
Repository: bcgit/bc-java
Fixed Code:
private AsymmetricCipherKeyPair genKeyPair()
{
if (!initialized)
{
initializeDefault();
}
// initialize authenticationPaths and treehash instances
byte[][][] currentAuthPaths = new byte[numLayer][][];
byte[][][] nextAuthPaths = new byte[numLayer - 1][][];
Treehash[][] currentTreehash = new Treehash[numLayer][];
Treehash[][] nextTreehash = new Treehash[numLayer - 1][];
Vector[] currentStack = new Vector[numLayer];
Vector[] nextStack = new Vector[numLayer - 1];
Vector[][] currentRetain = new Vector[numLayer][];
Vector[][] nextRetain = new Vector[numLayer - 1][];
for (int i = 0; i < numLayer; i++)
{
currentAuthPaths[i] = new byte[heightOfTrees[i]][mdLength];
currentTreehash[i] = new Treehash[heightOfTrees[i] - K[i]];
if (i > 0)
{
nextAuthPaths[i - 1] = new byte[heightOfTrees[i]][mdLength];
nextTreehash[i - 1] = new Treehash[heightOfTrees[i] - K[i]];
}
currentStack[i] = new Vector();
if (i > 0)
{
nextStack[i - 1] = new Vector();
}
}
// initialize roots
byte[][] currentRoots = new byte[numLayer][mdLength];
byte[][] nextRoots = new byte[numLayer - 1][mdLength];
// initialize seeds
byte[][] seeds = new byte[numLayer][mdLength];
// initialize seeds[] by copying starting-seeds of first trees of each
// layer
for (int i = 0; i < numLayer; i++)
{
System.arraycopy(currentSeeds[i], 0, seeds[i], 0, mdLength);
}
// initialize rootSigs
currentRootSigs = new byte[numLayer - 1][mdLength];
// -------------------------
// -------------------------
// --- calculation of current authpaths and current rootsigs (AUTHPATHS,
// SIG)------
// from bottom up to the root
for (int h = numLayer - 1; h >= 0; h--)
{
GMSSRootCalc tree;
// on lowest layer no lower root is available, so just call
// the method with null as first parameter
if (h == numLayer - 1)
{
tree = this.generateCurrentAuthpathAndRoot(null, currentStack[h], seeds[h], h);
}
else
// otherwise call the method with the former computed root
// value
{
tree = this.generateCurrentAuthpathAndRoot(currentRoots[h + 1], currentStack[h], seeds[h], h);
}
// set initial values needed for the private key construction
for (int i = 0; i < heightOfTrees[h]; i++)
{
System.arraycopy(tree.getAuthPath()[i], 0, currentAuthPaths[h][i], 0, mdLength);
}
currentRetain[h] = tree.getRetain();
currentTreehash[h] = tree.getTreehash();
System.arraycopy(tree.getRoot(), 0, currentRoots[h], 0, mdLength);
}
// --- calculation of next authpaths and next roots (AUTHPATHS+, ROOTS+)
// ------
for (int h = numLayer - 2; h >= 0; h--)
{
GMSSRootCalc tree = this.generateNextAuthpathAndRoot(nextStack[h], seeds[h + 1], h + 1);
// set initial values needed for the private key construction
for (int i = 0; i < heightOfTrees[h + 1]; i++)
{
System.arraycopy(tree.getAuthPath()[i], 0, nextAuthPaths[h][i], 0, mdLength);
}
nextRetain[h] = tree.getRetain();
nextTreehash[h] = tree.getTreehash();
System.arraycopy(tree.getRoot(), 0, nextRoots[h], 0, mdLength);
// create seed for the Merkle tree after next (nextNextSeeds)
// SEEDs++
System.arraycopy(seeds[h + 1], 0, this.nextNextSeeds[h], 0, mdLength);
}
// ------------
// generate JDKGMSSPublicKey
GMSSPublicKeyParameters publicKey = new GMSSPublicKeyParameters(currentRoots[0], gmssPS);
// generate the JDKGMSSPrivateKey
GMSSPrivateKeyParameters privateKey = new GMSSPrivateKeyParameters(currentSeeds, nextNextSeeds, currentAuthPaths,
nextAuthPaths, currentTreehash, nextTreehash, currentStack, nextStack, currentRetain, nextRetain, nextRoots, currentRootSigs, gmssPS, digestProvider);
// return the KeyPair
return (new AsymmetricCipherKeyPair(publicKey, privateKey));
}
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
genKeyPair
|
core/src/main/java/org/bouncycastle/pqc/crypto/gmss/GMSSKeyPairGenerator.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void tileImage(Object graphics, Object img, int x, int y, int w, int h) {
((AndroidGraphics) graphics).tileImage(img, x, y, w, h);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tileImage
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
tileImage
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFolderMethodsAllowed(
) {
return FOLDER_METHODS_ALLOWED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFolderMethodsAllowed
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
getFolderMethodsAllowed
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String sanitize(String jsonish, int maximumNestingDepth) {
JsonSanitizer s = new JsonSanitizer(jsonish, maximumNestingDepth);
s.sanitize();
return s.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sanitize
File: src/main/java/com/google/json/JsonSanitizer.java
Repository: OWASP/json-sanitizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-13973
|
MEDIUM
| 4.3
|
OWASP/json-sanitizer
|
sanitize
|
src/main/java/com/google/json/JsonSanitizer.java
|
53ceaac3e0a10e86d512ce96a0056578f2d1978f
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean checkAppInLaunchingProvidersLocked(ProcessRecord app, boolean alwaysBad) {
// Look through the content providers we are waiting to have launched,
// and if any run in this process then either schedule a restart of
// the process or kill the client waiting for it if this process has
// gone bad.
int NL = mLaunchingProviders.size();
boolean restart = false;
for (int i=0; i<NL; i++) {
ContentProviderRecord cpr = mLaunchingProviders.get(i);
if (cpr.launchingApp == app) {
if (!alwaysBad && !app.bad) {
restart = true;
} else {
removeDyingProviderLocked(app, cpr, true);
// cpr should have been removed from mLaunchingProviders
NL = mLaunchingProviders.size();
i--;
}
}
}
return restart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAppInLaunchingProvidersLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
checkAppInLaunchingProvidersLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void readLegacyPermissionStateTEMP() {
mPermissionManagerServiceImpl.readLegacyPermissionStateTEMP();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLegacyPermissionStateTEMP
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
readLegacyPermissionStateTEMP
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private PostgresClient createTableWithPoLines(TestContext context, String tableName, String tableDefiniton) throws IOException {
String schema = PostgresClient.convertToPsqlStandard(TENANT);
String polines = getMockData("mockdata/poLines.json");
postgresClient = createTable(context, TENANT, tableName, tableDefiniton);
// get count_estimate_smart2 definition
Async async = context.async();
try {
String sql = IOUtils.toString(
getClass().getClassLoader().getResourceAsStream("templates/db_scripts/funcs.sql"), "UTF-8");
sql = sql.replaceAll("tenants_raml_module_builder.", "");
postgresClient.getClient().update(sql, reply -> {
assertSuccess(context, reply);
async.complete();
});
} catch (IOException ex) {
log.error("createTable: " + ex.getMessage());
async.complete();
}
async.awaitSuccess(1000);
for (String jsonbValue : polines.split("\n")) {
String additionalField = new JsonObject(jsonbValue).getString("publication_date");
execute(context, "INSERT INTO " + schema + "." + tableName + " (id, jsonb, distinct_test_field) VALUES "
+ "('" + randomUuid() + "', '" + jsonbValue + "' ," + additionalField + " ) ON CONFLICT DO NOTHING;");
}
return postgresClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTableWithPoLines
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
createTableWithPoLines
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryToMakeAdmin(User u) {
AuthorizationStrategy as = Jenkins.getInstance().getAuthorizationStrategy();
if (as instanceof GlobalMatrixAuthorizationStrategy) {
GlobalMatrixAuthorizationStrategy ma = (GlobalMatrixAuthorizationStrategy) as;
ma.add(Jenkins.ADMINISTER,u.getId());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToMakeAdmin
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
tryToMakeAdmin
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean updateGlobalSetting(String name, String value, String tag,
boolean makeDefault, int requestingUserId, boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "updateGlobalSetting(" + name + ", " + value + ", "
+ ", " + tag + ", " + makeDefault + ", " + requestingUserId
+ ", " + forceNotify + ")");
}
return mutateGlobalSetting(name, value, tag, makeDefault, requestingUserId,
MUTATION_OPERATION_UPDATE, forceNotify, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateGlobalSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
updateGlobalSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private void showDialog() {
if (!DeviceFormFactor.isTablet(mContext)) {
// On smaller screens, make the dialog fill the width of the screen.
ScrollView scrollView = new ScrollView(mContext);
scrollView.addView(mContainer);
mDialog.addContentView(scrollView, new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT));
// This must be called after addContentView, or it won't fully fill to the edge.
Window window = mDialog.getWindow();
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
} else {
// On larger screens, make the dialog centered in the screen and have a maximum width.
ScrollView scrollView = new ScrollView(mContext) {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final int maxDialogWidthInPx = (int) (MAX_TABLET_DIALOG_WIDTH_DP
* mContext.getResources().getDisplayMetrics().density);
if (MeasureSpec.getSize(widthMeasureSpec) > maxDialogWidthInPx) {
widthMeasureSpec = MeasureSpec.makeMeasureSpec(maxDialogWidthInPx,
MeasureSpec.EXACTLY);
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
};
scrollView.addView(mContainer);
mDialog.addContentView(scrollView, new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT));
}
mDialog.show();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showDialog
File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2015-1261
|
MEDIUM
| 5
|
chromium
|
showDialog
|
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
|
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int dehexchar(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
if (c >= 'A' && c <= 'F') {
return c - ('A' - 10);
}
if (c >= 'a' && c <= 'f') {
return c - ('a' - 10);
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dehexchar
File: src/main/java/org/codehaus/jettison/json/JSONTokener.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
dehexchar
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void checkSavingDocument(DocumentReference userReference, XWikiDocument document, String comment,
XWikiContext context) throws XWikiException
{
checkSavingDocument(userReference, document, comment, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkSavingDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
checkSavingDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
TaskFragment getOrganizedTaskFragment() {
final TaskFragment parent = getTaskFragment();
return parent != null ? parent.getOrganizedTaskFragment() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizedTaskFragment
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
|
getOrganizedTaskFragment
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public AsyncHttpClientConfigBean setRequestCompressionLevel(int requestCompressionLevel) {
this.requestCompressionLevel = requestCompressionLevel;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestCompressionLevel
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setRequestCompressionLevel
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
DefaultServerConfig buildServerConfig(ServerConfig existingConfig) {
return buildServerConfig(existingConfig.ports());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildServerConfig
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
buildServerConfig
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void update(Context context, Group group) throws SQLException, AuthorizeException {
super.update(context, group);
// FIXME: Check authorisation
groupDAO.save(context, group);
if (group.isMetadataModified()) {
context.addEvent(new Event(Event.MODIFY_METADATA, Constants.GROUP, group.getID(), group.getDetails(),
getIdentifiers(context, group)));
group.clearDetails();
}
if (group.isGroupsChanged()) {
rethinkGroupCache(context, true);
group.clearGroupsChanged();
}
log.info(LogHelper.getHeader(context, "update_group", "group_id="
+ group.getID()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
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
|
update
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void addPathToZip(final String path, final Path directory, final ZipOutputStream exportStream) {
try {
Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if(!attrs.isDirectory()) {
Path relativeFile = directory.relativize(file);
String name = relativeFile.toString();
if(StringHelper.containsNonWhitespace(path)) {
name = path + "/" + name;
}
exportStream.putNextEntry(new ZipEntry(name));
try(InputStream in=Files.newInputStream(file)) {
FileUtils.cpio(in, exportStream, "");
} catch (Exception e) {
handleIOException("", e);
}
exportStream.closeEntry();
}
return FileVisitResult.CONTINUE;
}
});
} catch (IOException e) {
handleIOException("", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPathToZip
File: src/main/java/org/olat/core/util/ZipUtil.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
addPathToZip
|
src/main/java/org/olat/core/util/ZipUtil.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addGlobalFunctionTemplates(List<GlobalFunctionEntity> globalFunctionTemplates,
StringTemplateLoader loader) {
if (globalFunctionTemplates != null) {
for (GlobalFunctionEntity template : globalFunctionTemplates) {
loader.putTemplate(template.getName(), template.getContent());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addGlobalFunctionTemplates
File: AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
Repository: liimaorg/liima
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2023-26092
|
CRITICAL
| 9.8
|
liimaorg/liima
|
addGlobalFunctionTemplates
|
AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
|
78ba2e198c615dc8858e56eee3290989f0362686
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object parseGroovyFromString(String script, String jarWikiPage, XWikiContext xcontext) throws XWikiException
{
XWikiPageClassLoader pcl = new XWikiPageClassLoader(jarWikiPage, xcontext);
Object prevParentClassLoader = xcontext.get("parentclassloader");
try {
xcontext.put("parentclassloader", pcl);
return parseGroovyFromString(script, xcontext);
} finally {
if (prevParentClassLoader == null) {
xcontext.remove("parentclassloader");
} else {
xcontext.put("parentclassloader", prevParentClassLoader);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseGroovyFromString
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
parseGroovyFromString
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean changeState(String recordingId, String state) {
boolean succeeded = false;
if (state.equals(Recording.STATE_PUBLISHED)) {
// It can only be published if it is unpublished
succeeded |= changeState(unpublishedDir, recordingId, state);
} else if (state.equals(Recording.STATE_UNPUBLISHED)) {
// It can only be unpublished if it is published
succeeded |= changeState(publishedDir, recordingId, state);
} else if (state.equals(Recording.STATE_DELETED)) {
// It can be deleted from any state
succeeded |= changeState(publishedDir, recordingId, state);
succeeded |= changeState(unpublishedDir, recordingId, state);
}
return succeeded;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: changeState
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
changeState
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
public Location getLastHandledLocation() {
return lastHandledNavigation;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastHandledLocation
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getLastHandledLocation
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
void turnOnProximitySensor() {
mProximitySensorManager.turnOn();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: turnOnProximitySensor
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
|
turnOnProximitySensor
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
StatusBarManagerInternal getStatusBarManagerInternal() {
if (mStatusBarManagerInternal == null) {
mStatusBarManagerInternal = LocalServices.getService(StatusBarManagerInternal.class);
}
return mStatusBarManagerInternal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatusBarManagerInternal
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getStatusBarManagerInternal
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@GuardedBy(anyOf = {"this", "mProcLock"})
FgsTempAllowListItem isAllowlistedForFgsStartLOSP(int uid) {
if (Arrays.binarySearch(mDeviceIdleExceptIdleAllowlist, UserHandle.getAppId(uid)) >= 0) {
return FAKE_TEMP_ALLOW_LIST_ITEM;
}
final Pair<Long, FgsTempAllowListItem> entry = mFgsStartTempAllowList.get(uid);
return entry == null ? null : entry.second;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowlistedForFgsStartLOSP
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
|
isAllowlistedForFgsStartLOSP
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract char get(String name, char defaultValue)
throws IOException, IllegalArgumentException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
get
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
final ProcessRecord newProcessRecordLocked(ApplicationInfo info, String customProcess,
boolean isolated, int isolatedUid) {
String proc = customProcess != null ? customProcess : info.processName;
BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
final int userId = UserHandle.getUserId(info.uid);
int uid = info.uid;
if (isolated) {
if (isolatedUid == 0) {
int stepsLeft = Process.LAST_ISOLATED_UID - Process.FIRST_ISOLATED_UID + 1;
while (true) {
if (mNextIsolatedProcessUid < Process.FIRST_ISOLATED_UID
|| mNextIsolatedProcessUid > Process.LAST_ISOLATED_UID) {
mNextIsolatedProcessUid = Process.FIRST_ISOLATED_UID;
}
uid = UserHandle.getUid(userId, mNextIsolatedProcessUid);
mNextIsolatedProcessUid++;
if (mIsolatedProcesses.indexOfKey(uid) < 0) {
// No process for this uid, use it.
break;
}
stepsLeft--;
if (stepsLeft <= 0) {
return null;
}
}
} else {
// Special case for startIsolatedProcess (internal only), where
// the uid of the isolated process is specified by the caller.
uid = isolatedUid;
}
}
final ProcessRecord r = new ProcessRecord(stats, info, proc, uid);
if (!mBooted && !mBooting
&& userId == UserHandle.USER_OWNER
&& (info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) {
r.persistent = true;
}
addProcessNameLocked(r);
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newProcessRecordLocked
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
|
newProcessRecordLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void activityStopped(IBinder token, Bundle icicle,
PersistableBundle persistentState, CharSequence description) {
if (localLOGV) Slog.v(TAG, "Activity stopped: token=" + token);
// Refuse possible leaked file descriptors
if (icicle != null && icicle.hasFileDescriptors()) {
throw new IllegalArgumentException("File descriptors passed in Bundle");
}
final long origId = Binder.clearCallingIdentity();
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r != null) {
r.task.stack.activityStoppedLocked(r, icicle, persistentState, description);
}
}
trimApplications();
Binder.restoreCallingIdentity(origId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: activityStopped
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
activityStopped
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] toByteArray(File file) throws IOException {
return asByteSource(file).read();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toByteArray
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
toByteArray
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private String selectApplicationProtocol(List<String> protocols,
SelectedListenerFailureBehavior behavior,
String applicationProtocol) throws SSLException {
if (behavior == SelectedListenerFailureBehavior.ACCEPT) {
return applicationProtocol;
} else {
int size = protocols.size();
assert size > 0;
if (protocols.contains(applicationProtocol)) {
return applicationProtocol;
} else {
if (behavior == SelectedListenerFailureBehavior.CHOOSE_MY_LAST_PROTOCOL) {
return protocols.get(size - 1);
} else {
throw new SSLException("unknown protocol " + applicationProtocol);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectApplicationProtocol
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
selectApplicationProtocol
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private String generatePath(String name) {
return getDir().getPath() + separator + name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generatePath
File: brut.j.dir/src/main/java/brut/directory/FileDirectory.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
generatePath
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateWakeGestureListenerLp() {
if (shouldEnableWakeGestureLp()) {
mWakeGestureListener.requestWakeUpTrigger();
} else {
mWakeGestureListener.cancelWakeUpTrigger();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateWakeGestureListenerLp
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
|
updateWakeGestureListenerLp
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int send(int code, Intent intent, String resolvedType,
IIntentReceiver finishedReceiver, String requiredPermission, Bundle options) {
try {
mResult.offer(intent, 5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: send
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
send
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
void startLockTaskMode(@Nullable Task task, boolean isSystemCaller) {
ProtoLog.w(WM_DEBUG_LOCKTASK, "startLockTaskMode: %s", task);
if (task == null || task.mLockTaskAuth == LOCK_TASK_AUTH_DONT_LOCK) {
return;
}
final Task rootTask = mRootWindowContainer.getTopDisplayFocusedRootTask();
if (rootTask == null || task != rootTask.getTopMostTask()) {
throw new IllegalArgumentException("Invalid task, not in foreground");
}
// {@code isSystemCaller} is used to distinguish whether this request is initiated by the
// system or a specific app.
// * System-initiated requests will only start the pinned mode (screen pinning)
// * App-initiated requests
// - will put the device in fully locked mode (LockTask), if the app is allowlisted
// - will start the pinned mode, otherwise
final int callingUid = Binder.getCallingUid();
final long ident = Binder.clearCallingIdentity();
try {
// When a task is locked, dismiss the root pinned task if it exists
mRootWindowContainer.removeRootTasksInWindowingModes(WINDOWING_MODE_PINNED);
getLockTaskController().startLockTaskMode(task, isSystemCaller, callingUid);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskMode
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
startLockTaskMode
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void grantUriPermissionFromOwner(IBinder owner, int fromUid, String targetPkg,
Uri uri, int mode, int sourceUserId, int targetUserId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantUriPermissionFromOwner
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
grantUriPermissionFromOwner
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addRosterGroup(String group) {
mRoster.createGroup(group);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRosterGroup
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
addRosterGroup
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reject(HttpServletResponse response, int statusCode, String msg) throws IOException {
response.setStatus(statusCode);
response.setContentType("text/plain");
final PrintWriter writer = response.getWriter();
writer.println(msg);
writer.flush();
writer.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reject
File: server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2022-39310
|
MEDIUM
| 6.5
|
gocd
|
reject
|
server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
|
a644a7e5ed75d7b9e46f164fb83445f778077cf9
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Map<String, SemaphoreConfig> getSemaphoreConfigsByName(Config c) {
Collection<SemaphoreConfig> semaphoreConfigs = c.getSemaphoreConfigs();
HashMap<String, SemaphoreConfig> configsByName = new HashMap<String, SemaphoreConfig>(semaphoreConfigs.size());
for (SemaphoreConfig config : semaphoreConfigs) {
configsByName.put(config.getName(), config);
}
return configsByName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSemaphoreConfigsByName
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getSemaphoreConfigsByName
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
final void applyUpdateLockStateLocked(ActivityRecord r) {
// Modifications to the UpdateLock state are done on our handler, outside
// the activity manager's locks. The new state is determined based on the
// state *now* of the relevant activity record. The object is passed to
// the handler solely for logging detail, not to be consulted/modified.
final boolean nextState = r != null && r.immersive;
mHandler.sendMessage(
mHandler.obtainMessage(IMMERSIVE_MODE_LOCK_MSG, (nextState) ? 1 : 0, 0, r));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyUpdateLockStateLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
applyUpdateLockStateLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.