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
|
private boolean canHandleCheckPolicyComplianceIntent(CallerIdentity caller) {
mInjector.binderWithCleanCallingIdentity(() -> {
final Intent intent = new Intent(DevicePolicyManager.ACTION_CHECK_POLICY_COMPLIANCE);
intent.setPackage(caller.getPackageName());
final List<ResolveInfo> handlers =
mInjector.getPackageManager().queryIntentActivitiesAsUser(intent, /* flags= */
0, caller.getUserId());
return !handlers.isEmpty();
});
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canHandleCheckPolicyComplianceIntent
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
canHandleCheckPolicyComplianceIntent
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = CANCEL_URL + "/{referenceId:\\S+}", method = RequestMethod.DELETE)
public final void cancel(
@PathVariable final String referenceId,
final HttpServletResponse statusResponse) {
MDC.put(Processor.MDC_JOB_ID_KEY, referenceId);
setNoCache(statusResponse);
try {
this.jobManager.cancel(referenceId);
} catch (NoSuchReferenceException e) {
error(statusResponse, e.getMessage(), HttpStatus.NOT_FOUND);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
Repository: mapfish/mapfish-print
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-15231
|
MEDIUM
| 4.3
|
mapfish/mapfish-print
|
cancel
|
core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
|
89155f2506b9cee822e15ce60ccae390a1419d5e
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull AssetFileDescriptor openNonAssetFd(int cookie, @NonNull String fileName)
throws IOException {
Objects.requireNonNull(fileName, "fileName");
synchronized (this) {
ensureOpenLocked();
final ParcelFileDescriptor pfd =
nativeOpenNonAssetFd(mObject, cookie, fileName, mOffsets);
if (pfd == null) {
throw new FileNotFoundException("Asset absolute file: " + fileName);
}
return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openNonAssetFd
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
openNonAssetFd
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable) throws ApiException {
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeAPI
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
invokeAPI
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String nextString(char quote) throws JSONException {
char c;
StringBuilder sb = new StringBuilder();
for (;;) {
c = next();
switch (c) {
case 0:
case '\n':
case '\r':
throw syntaxError("Unterminated string");
case '\\':
c = next();
switch (c) {
case 'b':
sb.append('\b');
break;
case 't':
sb.append('\t');
break;
case 'n':
sb.append('\n');
break;
case 'f':
sb.append('\f');
break;
case 'r':
sb.append('\r');
break;
case 'u':
sb.append((char)Integer.parseInt(next(4), 16));
break;
case 'x' :
sb.append((char) Integer.parseInt(next(2), 16));
break;
default:
sb.append(c);
}
break;
default:
if (c == quote) {
return sb.toString();
}
sb.append(c);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextString
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
|
nextString
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native byte[] refOf(Object target);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refOf
File: src/main/java/org/mozilla/jss/util/GlobalRefProxy.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
refOf
|
src/main/java/org/mozilla/jss/util/GlobalRefProxy.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
public final HeaderEntry<K, V> after() {
return after;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: after
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
after
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<? extends Descriptor> getApplicableItemDescriptors() {
return Jenkins.getInstance().getDescriptorList(getItemType());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicableItemDescriptors
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getApplicableItemDescriptors
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void checkNewPassword(GenericValue userLogin, String currentPassword, String newPassword, String newPasswordVerify, String passwordHint, List<String> errorMessageList, boolean ignoreCurrentPassword, Locale locale) {
Delegator delegator = userLogin.getDelegator();
boolean useEncryption = "true".equals(EntityUtilProperties.getPropertyValue("security", "password.encrypt", delegator));
String errMsg = null;
if (!ignoreCurrentPassword) {
// if the password.accept.encrypted.and.plain property in security is set to true allow plain or encrypted passwords
// if this is a system account don't bother checking the passwords
boolean passwordMatches = checkPassword(userLogin.getString("currentPassword"), useEncryption, currentPassword);
if ((currentPassword == null) || (!passwordMatches)) {
errMsg = UtilProperties.getMessage(resource,"loginservices.old_password_not_correct_reenter", locale);
errorMessageList.add(errMsg);
}
if (checkPassword(userLogin.getString("currentPassword"), useEncryption, newPassword)) {
errMsg = UtilProperties.getMessage(resource,"loginservices.new_password_is_equal_to_old_password", locale);
errorMessageList.add(errMsg);
}
}
if (UtilValidate.isEmpty(newPassword) || UtilValidate.isEmpty(newPasswordVerify)) {
errMsg = UtilProperties.getMessage(resource,"loginservices.password_or_verify_missing", locale);
errorMessageList.add(errMsg);
} else if (!newPassword.equals(newPasswordVerify)) {
errMsg = UtilProperties.getMessage(resource,"loginservices.password_did_not_match_verify_password", locale);
errorMessageList.add(errMsg);
}
int passwordChangeHistoryLimit = 0;
try {
passwordChangeHistoryLimit = EntityUtilProperties.getPropertyAsInteger("security", "password.change.history.limit", 0).intValue();
} catch (NumberFormatException nfe) {
//No valid value is found so don't bother to save any password history
passwordChangeHistoryLimit = 0;
}
Debug.logInfo(" password.change.history.limit is set to " + passwordChangeHistoryLimit, module);
if (passwordChangeHistoryLimit > 0) {
Debug.logInfo(" checkNewPassword Checking if user is tyring to use old password " + passwordChangeHistoryLimit, module);
try {
List<GenericValue> pwdHistList = EntityQuery.use(delegator)
.from("UserLoginPasswordHistory")
.where("userLoginId",userLogin.getString("userLoginId"))
.orderBy("-fromDate")
.queryList();
for (GenericValue pwdHistValue : pwdHistList) {
if (checkPassword(pwdHistValue.getString("currentPassword"), useEncryption, newPassword)) {
Map<String, Integer> messageMap = UtilMisc.toMap("passwordChangeHistoryLimit", passwordChangeHistoryLimit);
errMsg = UtilProperties.getMessage(resource,"loginservices.password_must_be_different_from_last_passwords", messageMap, locale);
errorMessageList.add(errMsg);
break;
}
}
} catch (GenericEntityException e) {
Debug.logWarning(e, "", module);
Map<String, String> messageMap = UtilMisc.toMap("errorMessage", e.getMessage());
errMsg = UtilProperties.getMessage(resource,"loginevents.error_accessing_password_change_history", messageMap, locale);
}
}
int minPasswordLength = 0;
try {
minPasswordLength = EntityUtilProperties.getPropertyAsInteger("security", "password.length.min", 0).intValue();
} catch (NumberFormatException nfe) {
minPasswordLength = 0;
}
if (newPassword != null) {
// Matching password with pattern
String passwordPattern = EntityUtilProperties.getPropertyValue("security", "security.login.password.pattern", "^.*(?=.{5,}).*$", delegator);
boolean usePasswordPattern = UtilProperties.getPropertyAsBoolean("security", "security.login.password.pattern.enable", true);
if (usePasswordPattern) {
Pattern pattern = Pattern.compile(passwordPattern);
Matcher matcher = pattern.matcher(newPassword);
boolean matched = matcher.matches();
if (!matched) {
// This is a mix to handle the OOTB pattern which is only a fixed length
Map<String, String> messageMap = UtilMisc.toMap("minPasswordLength", Integer.toString(minPasswordLength));
String passwordPatternMessage = EntityUtilProperties.getPropertyValue("security",
"security.login.password.pattern.description", "loginservices.password_must_be_least_characters_long", delegator);
errMsg = UtilProperties.getMessage(resource, passwordPatternMessage, messageMap, locale);
errorMessageList.add(errMsg);
}
} else {
if (!(newPassword.length() >= minPasswordLength)) {
Map<String, String> messageMap = UtilMisc.toMap("minPasswordLength", Integer.toString(minPasswordLength));
errMsg = UtilProperties.getMessage(resource,"loginservices.password_must_be_least_characters_long", messageMap, locale);
errorMessageList.add(errMsg);
}
}
if (newPassword.equalsIgnoreCase(userLogin.getString("userLoginId"))) {
errMsg = UtilProperties.getMessage(resource,"loginservices.password_may_not_equal_username", locale);
errorMessageList.add(errMsg);
}
if (UtilValidate.isNotEmpty(passwordHint) && (passwordHint.toUpperCase(Locale.getDefault()).indexOf(newPassword.toUpperCase(Locale.getDefault())) >= 0)) {
errMsg = UtilProperties.getMessage(resource,"loginservices.password_hint_may_not_contain_password", locale);
errorMessageList.add(errMsg);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkNewPassword
File: framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
Repository: apache/ofbiz-framework
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2021-25958
|
MEDIUM
| 5
|
apache/ofbiz-framework
|
checkNewPassword
|
framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
|
2f5b8d33e32c4d9a48243cf9e503236acd5aec5c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void iterateSubmissions() {
Future first = submissions.poll();
try {
while (first != null) {
first = (Future) first.get();
}
} catch (FaweException e) {
Fawe.handleFaweException(faweExceptionReasonsUsed, e, LOGGER);
} catch (ExecutionException | InterruptedException e) {
if (e.getCause() instanceof FaweException) {
Fawe.handleFaweException(faweExceptionReasonsUsed, (FaweException) e.getCause(), LOGGER);
} else {
String message = e.getMessage();
int hash = message != null ? message.hashCode() : 0;
if (lastException != hash) {
lastException = hash;
exceptionCount = 0;
LOGGER.catching(e);
} else if (exceptionCount < Settings.settings().QUEUE.PARALLEL_THREADS) {
exceptionCount++;
LOGGER.warn(message);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: iterateSubmissions
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
iterateSubmissions
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void printXMLComment(String content)
{
printXMLComment(content, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printXMLComment
File: xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
printXMLComment
|
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasSame(AbstractProject owner, Collection<? extends AbstractProject> projects) {
List<AbstractProject> children = getChildProjects(owner);
return children.size()==projects.size() && children.containsAll(projects);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasSame
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
hasSame
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean saveFile(int convertedAttempt, File artifact, MultipartFile multipartFile, boolean shouldUnzip) throws IOException {
try (InputStream inputStream = multipartFile.getInputStream()) {
return artifactsService.saveFile(artifact, inputStream, shouldUnzip, convertedAttempt);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveFile
File: server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-43289
|
MEDIUM
| 5
|
gocd
|
saveFile
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beginDefinitionTerm()
{
getXHTMLWikiPrinter().printXMLStartElement("dt");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginDefinitionTerm
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
|
beginDefinitionTerm
|
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 AssetHandler onMissing(final int statusCode) {
this.statusCode = statusCode;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMissing
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
onMissing
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDocumentURI() {
return doc.getDocumentURI();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocumentURI
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getDocumentURI
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
void ensurePackageDexOpt(String packageName) {
IPackageManager pm = AppGlobals.getPackageManager();
try {
if (pm.performDexOptIfNeeded(packageName, null /* instruction set */)) {
mDidDexOpt = true;
}
} catch (RemoteException e) {
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensurePackageDexOpt
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
|
ensurePackageDexOpt
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateInt(@Positive int columnIndex, int x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateInt
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateInt
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean clearApplicationUserDataLI(String packageName, int userId) {
if (packageName == null) {
Slog.w(TAG, "Attempt to delete null packageName.");
return false;
}
// Try finding details about the requested package
PackageParser.Package pkg;
synchronized (mPackages) {
pkg = mPackages.get(packageName);
if (pkg == null) {
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps != null) {
pkg = ps.pkg;
}
}
if (pkg == null) {
Slog.w(TAG, "Package named '" + packageName + "' doesn't exist.");
return false;
}
PackageSetting ps = (PackageSetting) pkg.mExtras;
resetUserChangesToRuntimePermissionsAndFlagsLPw(ps, userId);
}
// Always delete data directories for package, even if we found no other
// record of app. This helps users recover from UID mismatches without
// resorting to a full data wipe.
int retCode = mInstaller.clearUserData(pkg.volumeUuid, packageName, userId);
if (retCode < 0) {
Slog.w(TAG, "Couldn't remove cache files for package: " + packageName);
return false;
}
final int appId = pkg.applicationInfo.uid;
removeKeystoreDataIfNeeded(userId, appId);
// Create a native library symlink only if we have native libraries
// and if the native libraries are 32 bit libraries. We do not provide
// this symlink for 64 bit libraries.
if (pkg.applicationInfo.primaryCpuAbi != null &&
!VMRuntime.is64BitAbi(pkg.applicationInfo.primaryCpuAbi)) {
final String nativeLibPath = pkg.applicationInfo.nativeLibraryDir;
if (mInstaller.linkNativeLibraryDirectory(pkg.volumeUuid, pkg.packageName,
nativeLibPath, userId) < 0) {
Slog.w(TAG, "Failed linking native library dir");
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearApplicationUserDataLI
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
|
clearApplicationUserDataLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWGroupByAndWildcardFilterSameTagK() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{host=quirm|tsort}"
+ "{host=wildcard(*quirm)}");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
sub.validateAndSetQuery();
assertTrue(sub.getFilters().get(0) instanceof TagVWildcardFilter);
assertTrue(sub.getFilters().get(1) instanceof TagVLiteralOrFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWGroupByAndWildcardFilterSameTagK
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWGroupByAndWildcardFilterSameTagK
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected queryData queryLastApp(SQLiteDatabase db,
String app_id, String content_type) {
String sql = "select install_order, package_name, class_name, "
+ " app_type, need_signature, further_processing"
+ " from " + APPID_TABLE_NAME
+ " where x_wap_application=\'" + app_id + "\'"
+ " and content_type=\'" + content_type + "\'"
+ " order by install_order desc";
if (DEBUG_SQL) Log.v(LOG_TAG, "sql: " + sql);
Cursor cur = db.rawQuery(sql, null);
queryData ret = null;
if (cur.moveToNext()) {
ret = new queryData();
ret.installOrder = cur.getInt(cur.getColumnIndex("install_order"));
ret.packageName = cur.getString(cur.getColumnIndex("package_name"));
ret.className = cur.getString(cur.getColumnIndex("class_name"));
ret.appType = cur.getInt(cur.getColumnIndex("app_type"));
ret.needSignature = cur.getInt(cur.getColumnIndex("need_signature"));
ret.furtherProcessing = cur.getInt(cur.getColumnIndex("further_processing"));
}
cur.close();
return ret;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2014-8507
- Severity: HIGH
- CVSS Score: 7.5
Description: Externally Reported Moderate Security Issue: SQL Injection in WAPPushManager
Bug 17969135
Use query (instead of rawQuery) and pass in arguments instead of building
the query with a giant string. Add a unit test that fails with the old
code but passes with the new code.
Change-Id: Id04a1db6fb95fcd923e1f36f5ab3b94402590918
Function: queryLastApp
File: packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
Repository: android
Fixed Code:
protected queryData queryLastApp(SQLiteDatabase db,
String app_id, String content_type) {
if (LOCAL_LOGV) Log.v(LOG_TAG, "queryLastApp app_id: " + app_id
+ " content_type: " + content_type);
Cursor cur = db.query(APPID_TABLE_NAME,
new String[] {"install_order", "package_name", "class_name",
"app_type", "need_signature", "further_processing"},
"x_wap_application=? and content_type=?",
new String[] {app_id, content_type},
null /* groupBy */,
null /* having */,
"install_order desc" /* orderBy */);
queryData ret = null;
if (cur.moveToNext()) {
ret = new queryData();
ret.installOrder = cur.getInt(cur.getColumnIndex("install_order"));
ret.packageName = cur.getString(cur.getColumnIndex("package_name"));
ret.className = cur.getString(cur.getColumnIndex("class_name"));
ret.appType = cur.getInt(cur.getColumnIndex("app_type"));
ret.needSignature = cur.getInt(cur.getColumnIndex("need_signature"));
ret.furtherProcessing = cur.getInt(cur.getColumnIndex("further_processing"));
}
cur.close();
return ret;
}
|
[
"CWE-89"
] |
CVE-2014-8507
|
HIGH
| 7.5
|
android
|
queryLastApp
|
packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
|
48ed835468c6235905459e6ef7df032baf3e4df6
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setScope( final String scope )
{
this.scope = Scope.valueOf( scope );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScope
File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
Repository: enonic/xp
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2024-23679
|
CRITICAL
| 9.8
|
enonic/xp
|
setScope
|
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
|
0189975691e9e6407a9fee87006f730e84f734ff
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getValidSpaceId(Profile authUser, String space) {
if (authUser == null) {
return DEFAULT_SPACE;
}
String defaultSpace = authUser.hasSpaces() ? ALL_MY_SPACES : DEFAULT_SPACE;
String s = canAccessSpace(authUser, space) ? space : defaultSpace;
return StringUtils.isBlank(s) ? DEFAULT_SPACE : s;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValidSpaceId
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getValidSpaceId
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateRef(String columnName, @Nullable Ref x) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateRef(String,Ref)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateRef
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateRef
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
void abortAndClearOptionsAnimation() {
if (mPendingOptions != null) {
mPendingOptions.abort();
}
clearOptionsAnimation();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: abortAndClearOptionsAnimation
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
|
abortAndClearOptionsAnimation
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void allowTypes(Class[] types) {
addPermission(new ExplicitTypePermission(types));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowTypes
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
allowTypes
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private static DomNode findOutputNode(final DomNode xsltDomNode) {
for (final DomNode child : xsltDomNode.getChildren()) {
if ("output".equals(child.getLocalName())) {
return child;
}
for (final DomNode child1 : child.getChildren()) {
if ("output".equals(child1.getLocalName())) {
return child1;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findOutputNode
File: src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2023-26119
|
CRITICAL
| 9.8
|
HtmlUnit/htmlunit
|
findOutputNode
|
src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java
|
641325bbc84702dc9800ec7037aec061ce21956b
| 0
|
Analyze the following code function for security vulnerabilities
|
void dispatchUserSwitch(final UserStartedState uss, final int oldUserId,
final int newUserId) {
final int N = mUserSwitchObservers.beginBroadcast();
if (N > 0) {
final IRemoteCallback callback = new IRemoteCallback.Stub() {
int mCount = 0;
@Override
public void sendResult(Bundle data) throws RemoteException {
synchronized (ActivityManagerService.this) {
if (mCurUserSwitchCallback == this) {
mCount++;
if (mCount == N) {
sendContinueUserSwitchLocked(uss, oldUserId, newUserId);
}
}
}
}
};
synchronized (this) {
uss.switching = true;
mCurUserSwitchCallback = callback;
}
for (int i=0; i<N; i++) {
try {
mUserSwitchObservers.getBroadcastItem(i).onUserSwitching(
newUserId, callback);
} catch (RemoteException e) {
}
}
} else {
synchronized (this) {
sendContinueUserSwitchLocked(uss, oldUserId, newUserId);
}
}
mUserSwitchObservers.finishBroadcast();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchUserSwitch
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
|
dispatchUserSwitch
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void executePreProcessCommands(Scheduler scheduler)
throws SchedulerException {
for(String group: jobGroupsToDelete) {
if(group.equals("*")) {
log.info("Deleting all jobs in ALL groups.");
for (String groupName : scheduler.getJobGroupNames()) {
if (!jobGroupsToNeverDelete.contains(groupName)) {
for (JobKey key : scheduler.getJobKeys(GroupMatcher.jobGroupEquals(groupName))) {
scheduler.deleteJob(key);
}
}
}
}
else {
if(!jobGroupsToNeverDelete.contains(group)) {
log.info("Deleting all jobs in group: {}", group);
for (JobKey key : scheduler.getJobKeys(GroupMatcher.jobGroupEquals(group))) {
scheduler.deleteJob(key);
}
}
}
}
for(String group: triggerGroupsToDelete) {
if(group.equals("*")) {
log.info("Deleting all triggers in ALL groups.");
for (String groupName : scheduler.getTriggerGroupNames()) {
if (!triggerGroupsToNeverDelete.contains(groupName)) {
for (TriggerKey key : scheduler.getTriggerKeys(GroupMatcher.triggerGroupEquals(groupName))) {
scheduler.unscheduleJob(key);
}
}
}
}
else {
if(!triggerGroupsToNeverDelete.contains(group)) {
log.info("Deleting all triggers in group: {}", group);
for (TriggerKey key : scheduler.getTriggerKeys(GroupMatcher.triggerGroupEquals(group))) {
scheduler.unscheduleJob(key);
}
}
}
}
for(JobKey key: jobsToDelete) {
if(!jobGroupsToNeverDelete.contains(key.getGroup())) {
log.info("Deleting job: {}", key);
scheduler.deleteJob(key);
}
}
for(TriggerKey key: triggersToDelete) {
if(!triggerGroupsToNeverDelete.contains(key.getGroup())) {
log.info("Deleting trigger: {}", key);
scheduler.unscheduleJob(key);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executePreProcessCommands
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
executePreProcessCommands
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean doUnzip(VFSLeaf vfsItem, VFSContainer currentContainer, UserRequest ureq, WindowControl wControl) {
String name = vfsItem.getName();
if (!name.toLowerCase().endsWith(".zip")) {
wControl.setError(translator.translate("FileUnzipFailed", new String[] {vfsItem.getName()}));
return false;
}
// we make a new folder with the same name as the zip file
String sZipContainer = name.substring(0, name.length() - 4);
boolean versioning = currentContainer.canVersion() == VFSConstants.YES;
VFSContainer zipContainer = currentContainer.createChildContainer(sZipContainer);
if (zipContainer == null) {
if(versioning) {
VFSItem resolvedItem = currentContainer.resolve(sZipContainer);
if(resolvedItem instanceof VFSContainer) {
zipContainer = (VFSContainer)resolvedItem;
} else {
String numberedFilename = findContainerName(currentContainer, sZipContainer);
if(StringHelper.containsNonWhitespace(numberedFilename)) {
zipContainer = currentContainer.createChildContainer(numberedFilename);
}
if(zipContainer == null) {// we try our best
wControl.setError(translator.translate("unzip.alreadyexists", new String[] {sZipContainer}));
return false;
}
}
} else {
// folder already exists... issue warning
wControl.setError(translator.translate("unzip.alreadyexists", new String[] {sZipContainer}));
return false;
}
} else if (zipContainer.canMeta() == VFSConstants.YES) {
VFSMetadata info = zipContainer.getMetaInfo();
if(info instanceof VFSMetadataImpl) {
((VFSMetadataImpl)info).setFileInitializedBy(ureq.getIdentity());
vfsRepositoryService.updateMetadata(info);
}
}
if (!ZipUtil.unzipNonStrict(vfsItem, zipContainer, ureq.getIdentity(), versioning)) {
// operation failed - rollback
zipContainer.delete();
wControl.setError(translator.translate("failed"));
return false;
} else {
// check quota
long quotaLeftKB = VFSManager.getQuotaLeftKB(currentContainer);
if (quotaLeftKB != Quota.UNLIMITED && quotaLeftKB < 0) {
// quota exceeded - rollback
zipContainer.delete();
wControl.setError(translator.translate("QuotaExceeded"));
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doUnzip
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdUnzip.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
doUnzip
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdUnzip.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void loadFiles() {
loadAll();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadFiles
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
|
loadFiles
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
@SuppressWarnings("GoodTime") // reading system time without TimeSource
public static void touch(File file) throws IOException {
checkNotNull(file);
if (!file.createNewFile() && !file.setLastModified(System.currentTimeMillis())) {
throw new IOException("Unable to update modification time of " + file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: touch
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
touch
|
android/guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
public SFile getCanonicalFile() throws IOException {
return new SFile(internal.getCanonicalFile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCanonicalFile
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getCanonicalFile
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize() throws InitializationException
{
ListenerChain chain = new ListenerChain();
setListenerChain(chain);
// Construct the listener chain in the right order. Listeners early in the chain are called before listeners
// placed later in the chain.
chain.addListener(this);
chain.addListener(new BlockStateChainingListener(chain));
chain.addListener(new EmptyBlockChainingListener(chain));
chain.addListener(new MetaDataStateChainingListener(chain));
chain.addListener(new HTML5ChainingRenderer(this.linkRenderer, this.imageRenderer, chain));
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-32070
- Severity: MEDIUM
- CVSS Score: 6.1
Description: XRENDERING-663: Restrict allowed attributes in HTML rendering
* Change HTML renderers to only print allowed attributes and elements.
* Add prefix to forbidden attributes to preserve them in XWiki syntax.
* Adapt tests to expect that invalid attributes get a prefix.
Function: initialize
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5Renderer.java
Repository: xwiki/xwiki-rendering
Fixed Code:
@Override
public void initialize() throws InitializationException
{
ListenerChain chain = new ListenerChain();
setListenerChain(chain);
// Construct the listener chain in the right order. Listeners early in the chain are called before listeners
// placed later in the chain.
chain.addListener(this);
chain.addListener(new BlockStateChainingListener(chain));
chain.addListener(new EmptyBlockChainingListener(chain));
chain.addListener(new MetaDataStateChainingListener(chain));
chain.addListener(new HTML5ChainingRenderer(this.linkRenderer, this.imageRenderer, this.htmlElementSanitizer,
chain));
}
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
initialize
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5Renderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 1
|
Analyze the following code function for security vulnerabilities
|
void replaceWith(CharSequence text, TextPaint paint,
int width, Alignment align,
float spacingmult, float spacingadd) {
if (width < 0) {
throw new IllegalArgumentException("Layout: " + width + " < 0");
}
mText = text;
mPaint = paint;
mWidth = width;
mAlignment = align;
mSpacingMult = spacingmult;
mSpacingAdd = spacingadd;
mSpannedText = text instanceof Spanned;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceWith
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
replaceWith
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAllowFeed(Integer allowFeed) {
this.allowFeed = allowFeed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowFeed
File: src/main/java/cn/luischen/model/ContentDomain.java
Repository: WinterChenS/my-site
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29638
|
MEDIUM
| 5.4
|
WinterChenS/my-site
|
setAllowFeed
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CertRequestInfos fromDOM(Element infosElement) {
CertRequestInfos infos = new CertRequestInfos();
NodeList totalList = infosElement.getElementsByTagName("total");
if (totalList.getLength() > 0) {
String value = totalList.item(0).getTextContent();
infos.setTotal(Integer.parseInt(value));
}
NodeList infoList = infosElement.getElementsByTagName("CertRequestInfo");
int infoCount = infoList.getLength();
for (int i=0; i<infoCount; i++) {
Element infoElement = (Element) infoList.item(i);
CertRequestInfo info = CertRequestInfo.fromDOM(infoElement);
infos.addEntry(info);
}
return infos;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromDOM
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfos.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromDOM
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfos.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public User getUserByUserName(String username) {
return this.getOne(
new LambdaQueryWrapper<User>()
.eq(User::getUsername, username)
);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserByUserName
File: framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
Repository: CloudExplorer-Dev/CloudExplorer-Lite
The code follows secure coding practices.
|
[
"CWE-521"
] |
CVE-2023-3423
|
HIGH
| 8.8
|
CloudExplorer-Dev/CloudExplorer-Lite
|
getUserByUserName
|
framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
|
7d4dab60352079953b7be120afe9bd14983ae3bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder insertInstruction(String target, String data);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertInstruction
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
insertInstruction
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maskRandomizedMacAddressInWifiConfiguration(WifiConfiguration configuration) {
setRandomizedMacAddress(configuration, DEFAULT_MAC_ADDRESS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maskRandomizedMacAddressInWifiConfiguration
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
maskRandomizedMacAddressInWifiConfiguration
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getHomePhone(final String userID) throws IOException {
return getContactInfo(userID, ContactType.homePhone.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomePhone
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getHomePhone
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("rawtypes")
@Override
public Route.Collection with(final Runnable callback) {
// hacky way of doing what we want... but we do simplify developer life
int size = this.bag.size();
callback.run();
// collect latest routes and apply route props
List<Route.Props> local = this.bag.stream()
.skip(size)
.filter(Route.Props.class::isInstance)
.map(Route.Props.class::cast)
.collect(Collectors.toList());
return new Route.Collection(local.toArray(new Route.Props[local.size()]));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: with
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
with
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateEventDispatchingLocked(boolean booted) {
mWindowManager.setEventDispatching(booted && !mShuttingDown);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateEventDispatchingLocked
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
|
updateEventDispatchingLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void protocolVersionMismatch(DataInputStream is) throws IOException {
MalformedFrameException x;
// We expect the letters M, Q, P in that order: generate an informative error if they're not found
byte[] expectedBytes = new byte[] { 'M', 'Q', 'P' };
for (byte expectedByte : expectedBytes) {
int nextByte = is.readUnsignedByte();
if (nextByte != expectedByte) {
throw new MalformedFrameException("Invalid AMQP protocol header from server: expected character " +
expectedByte + ", got " + nextByte);
}
}
try {
int[] signature = new int[4];
for (int i = 0; i < 4; i++) {
signature[i] = is.readUnsignedByte();
}
if (signature[0] == 1 &&
signature[1] == 1 &&
signature[2] == 8 &&
signature[3] == 0) {
x = new MalformedFrameException("AMQP protocol version mismatch; we are version " +
AMQP.PROTOCOL.MAJOR + "-" + AMQP.PROTOCOL.MINOR + "-" + AMQP.PROTOCOL.REVISION +
", server is 0-8");
}
else {
String sig = "";
for (int i = 0; i < 4; i++) {
if (i != 0) sig += ",";
sig += signature[i];
}
x = new MalformedFrameException("AMQP protocol version mismatch; we are version " +
AMQP.PROTOCOL.MAJOR + "-" + AMQP.PROTOCOL.MINOR + "-" + AMQP.PROTOCOL.REVISION +
", server sent signature " + sig);
}
} catch (IOException ex) {
x = new MalformedFrameException("Invalid AMQP protocol header from server");
}
throw x;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: protocolVersionMismatch
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
protocolVersionMismatch
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void engineUpdate(
byte b)
throws SignatureException
{
digest.update(b);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineUpdate
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2016-1000338
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineUpdate
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
|
b0c3ce99d43d73a096268831d0d120ffc89eac7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void assertNotReleased() {
if (released) {
throw new IllegalStateException();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assertNotReleased
File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-17091
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
assertNotReleased
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTokenString() {
return tokenString;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTokenString
File: core/src/main/java/org/keycloak/KeycloakSecurityContext.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-1714
|
MEDIUM
| 6.5
|
keycloak
|
getTokenString
|
core/src/main/java/org/keycloak/KeycloakSecurityContext.java
|
d5483d884de797e2ef6e69f92085bc10bf87e864
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void prepareFromMediaId(String packageName, String mediaId, Bundle extras) {
mSessionCb.prepareFromMediaId(packageName, Binder.getCallingPid(),
Binder.getCallingUid(), mediaId, extras);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareFromMediaId
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
prepareFromMediaId
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void registerTaskStackListener(ITaskStackListener listener) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerTaskStackListener
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
registerTaskStackListener
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isPhoneIdle(Context context) {
TelecomManager manager = (TelecomManager) context.getSystemService(
Context.TELECOM_SERVICE);
if (manager != null) {
return !manager.isInCall();
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPhoneIdle
File: sip/src/com/android/services/telephony/sip/SipUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
isPhoneIdle
|
sip/src/com/android/services/telephony/sip/SipUtil.java
|
a294ae5342410431a568126183efe86261668b5d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isValid() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValid
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
isValid
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPackageScreenCompatMode(String packageName) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(packageName);
mRemote.transact(GET_PACKAGE_SCREEN_COMPAT_MODE_TRANSACTION, data, reply, 0);
reply.readException();
int mode = reply.readInt();
reply.recycle();
data.recycle();
return mode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageScreenCompatMode
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getPackageScreenCompatMode
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
WindowState getTopFullscreenOpaqueWindow() {
for (int i = mChildren.size() - 1; i >= 0; i--) {
final WindowState win = mChildren.get(i);
if (win != null && win.mAttrs.isFullscreen() && !win.isFullyTransparent()) {
return win;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTopFullscreenOpaqueWindow
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
|
getTopFullscreenOpaqueWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static VerifiedSigner verify(String apkFile, boolean verifyIntegrity)
throws SignatureNotFoundException, SecurityException, IOException {
try (RandomAccessFile apk = new RandomAccessFile(apkFile, "r")) {
return verify(apk, verifyIntegrity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verify
File: core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verify
|
core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
private QuestionItem processResource(ResourceType resource, Path imsmanifestPath, ManifestMetadataBuilder metadataBuilder) {
try {
String href = resource.getHref();
Path parentPath = imsmanifestPath.getParent();
Path assessmentItemPath = parentPath.resolve(href);
if(Files.notExists(assessmentItemPath)) {
return null;
}
String dir = qpoolFileStorage.generateDir();
//storage
File itemStorage = qpoolFileStorage.getDirectory(dir);
File outputFile = new File(itemStorage, href);
if(!outputFile.getParentFile().exists()) {
outputFile.getParentFile().mkdirs();
}
QTI21Infos infos = getInfos(imsmanifestPath);
convertXmlFile(assessmentItemPath, outputFile.toPath(), infos);
QtiXmlReader qtiXmlReader = new QtiXmlReader(qtiService.jqtiExtensionManager());
ResourceLocator fileResourceLocator = new FileResourceLocator();
ResourceLocator inputResourceLocator =
ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
URI assessmentObjectSystemId = outputFile.toURI();
AssessmentObjectXmlLoader assessmentObjectXmlLoader = new AssessmentObjectXmlLoader(qtiXmlReader, inputResourceLocator);
ResolvedAssessmentItem resolvedAssessmentItem = assessmentObjectXmlLoader.loadAndResolveAssessmentItem(assessmentObjectSystemId);
AssessmentItem assessmentItem = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful();
if(!AssessmentItemChecker.checkAndCorrect(assessmentItem)) {
qtiService.persistAssessmentObject(outputFile, assessmentItem);
}
AssessmentItemMetadata metadata = new AssessmentItemMetadata(metadataBuilder);
String editor = null;
String editorVersion = null;
if(StringHelper.containsNonWhitespace(assessmentItem.getToolName())) {
editor = assessmentItem.getToolName();
}
if(StringHelper.containsNonWhitespace(assessmentItem.getToolVersion())) {
editorVersion = assessmentItem.getToolVersion();
}
QuestionItemImpl qitem = processItem(assessmentItem, null, href,
editor, editorVersion, dir, metadata);
//create manifest
ManifestBuilder manifest = ManifestBuilder.createAssessmentItemBuilder();
String itemId = IdentifierGenerator.newAsIdentifier("item").toString();
ResourceType importedResource = manifest.appendAssessmentItem(itemId, href);
ManifestMetadataBuilder importedMetadataBuilder = manifest.getMetadataBuilder(importedResource, true);
importedMetadataBuilder.setMetadata(metadataBuilder.getMetadata());
manifest.write(new File(itemStorage, "imsmanifest.xml"));
//process material
List<String> materials = ImportExportHelper.getMaterials(assessmentItem);
for(String material:materials) {
if(material.indexOf("://") < 0) {// material can be an external URL
Path materialFile = assessmentItemPath.getParent().resolve(material);
PathUtils.copyFileToDir(materialFile, outputFile.getParentFile(), material);
}
}
return qitem;
} catch (Exception e) {
log.error("", e);
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-39180
- Severity: HIGH
- CVSS Score: 9.0
Description: OO-5549: check parent by unzip
Function: processResource
File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
Repository: OpenOLAT
Fixed Code:
private QuestionItem processResource(ResourceType resource, Path imsmanifestPath, ManifestMetadataBuilder metadataBuilder) {
try {
String href = resource.getHref();
Path parentPath = imsmanifestPath.getParent();
Path assessmentItemPath = parentPath.resolve(href);
if(Files.notExists(assessmentItemPath)) {
return null;
}
Path normalizedPath = assessmentItemPath.normalize();
if(!normalizedPath.startsWith(parentPath)) {
throw new IOException("Invalid Item");
}
String dir = qpoolFileStorage.generateDir();
//storage
File itemStorage = qpoolFileStorage.getDirectory(dir);
File outputFile = new File(itemStorage, href);
if(!outputFile.getParentFile().exists()) {
outputFile.getParentFile().mkdirs();
}
QTI21Infos infos = getInfos(imsmanifestPath);
convertXmlFile(assessmentItemPath, outputFile.toPath(), infos);
QtiXmlReader qtiXmlReader = new QtiXmlReader(qtiService.jqtiExtensionManager());
ResourceLocator fileResourceLocator = new FileResourceLocator();
ResourceLocator inputResourceLocator =
ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
URI assessmentObjectSystemId = outputFile.toURI();
AssessmentObjectXmlLoader assessmentObjectXmlLoader = new AssessmentObjectXmlLoader(qtiXmlReader, inputResourceLocator);
ResolvedAssessmentItem resolvedAssessmentItem = assessmentObjectXmlLoader.loadAndResolveAssessmentItem(assessmentObjectSystemId);
AssessmentItem assessmentItem = resolvedAssessmentItem.getRootNodeLookup().extractIfSuccessful();
if(!AssessmentItemChecker.checkAndCorrect(assessmentItem)) {
qtiService.persistAssessmentObject(outputFile, assessmentItem);
}
AssessmentItemMetadata metadata = new AssessmentItemMetadata(metadataBuilder);
String editor = null;
String editorVersion = null;
if(StringHelper.containsNonWhitespace(assessmentItem.getToolName())) {
editor = assessmentItem.getToolName();
}
if(StringHelper.containsNonWhitespace(assessmentItem.getToolVersion())) {
editorVersion = assessmentItem.getToolVersion();
}
QuestionItemImpl qitem = processItem(assessmentItem, null, href,
editor, editorVersion, dir, metadata);
//create manifest
ManifestBuilder manifest = ManifestBuilder.createAssessmentItemBuilder();
String itemId = IdentifierGenerator.newAsIdentifier("item").toString();
ResourceType importedResource = manifest.appendAssessmentItem(itemId, href);
ManifestMetadataBuilder importedMetadataBuilder = manifest.getMetadataBuilder(importedResource, true);
importedMetadataBuilder.setMetadata(metadataBuilder.getMetadata());
manifest.write(new File(itemStorage, "imsmanifest.xml"));
//process material
List<String> materials = ImportExportHelper.getMaterials(assessmentItem);
for(String material:materials) {
if(material.indexOf("://") < 0) {// material can be an external URL
Path materialFile = assessmentItemPath.getParent().resolve(material);
Path normalizedMaterialPath = materialFile.normalize();
if(!normalizedMaterialPath.startsWith(parentPath)) {
throw new IOException("Invalid Item");
}
PathUtils.copyFileToDir(materialFile, outputFile.getParentFile(), material);
}
}
return qitem;
} catch (Exception e) {
log.error("", e);
return null;
}
}
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
processResource
|
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
|
5668a41ab3f1753102a89757be013487544279d5
| 1
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public <T> T deserialize(Response response, GenericType<T> returnType) throws ApiException {
if (response == null || returnType == null) {
return null;
}
if ("byte[]".equals(returnType.toString())) {
// Handle binary response (byte array).
return (T) response.readEntity(byte[].class);
} else if (returnType.getRawType() == File.class) {
// Handle file downloading.
T file = (T) downloadFileFromResponse(response);
return file;
}
String contentType = null;
List<Object> contentTypes = response.getHeaders().get("Content-Type");
if (contentTypes != null && !contentTypes.isEmpty())
contentType = String.valueOf(contentTypes.get(0));
// read the entity stream multiple times
response.bufferEntity();
return response.readEntity(returnType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserialize
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
deserialize
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isLockTaskPermitted(String pkg) {
// Check policy-exempt apps first, as it doesn't require the lock
if (listPolicyExemptAppsUnchecked(mContext).contains(pkg)) {
if (VERBOSE_LOG) {
Slogf.v(LOG_TAG, "isLockTaskPermitted(%s): returning true for policy-exempt app",
pkg);
}
return true;
}
final int userId = mInjector.userHandleGetCallingUserId();
if (isPolicyEngineForFinanceFlagEnabled()) {
LockTaskPolicy policy = mDevicePolicyEngine.getResolvedPolicy(
PolicyDefinition.LOCK_TASK, userId);
if (policy == null) {
return false;
}
return policy.getPackages().contains(pkg);
} else {
synchronized (getLockObject()) {
return getUserData(userId).mLockTaskPackages.contains(pkg);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLockTaskPermitted
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
|
isLockTaskPermitted
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ShortcutInfo deleteDynamicWithId(@NonNull String shortcutId, boolean ignoreInvisible,
boolean ignorePersistedShortcuts) {
return deleteOrDisableWithId(
shortcutId, /* disable =*/ false, /* overrideImmutable=*/ false, ignoreInvisible,
ShortcutInfo.DISABLED_REASON_NOT_DISABLED, ignorePersistedShortcuts);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteDynamicWithId
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
deleteDynamicWithId
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setBubbleMetadata(@Nullable BubbleMetadata data) {
mN.mBubbleMetadata = data;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBubbleMetadata
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setBubbleMetadata
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean canBeTopRunning() {
return !finishing && showToCurrentUser();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canBeTopRunning
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
|
canBeTopRunning
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String endpointConfigElementName(EndpointConfig endpointConfig) {
if (endpointConfig instanceof ServerSocketEndpointConfig) {
switch (endpointConfig.getProtocolType()) {
case REST:
return "rest-server-socket-endpoint-config";
case WAN:
return "wan-server-socket-endpoint-config";
case CLIENT:
return "client-server-socket-endpoint-config";
case MEMBER:
return "member-server-socket-endpoint-config";
case MEMCACHE:
return "memcache-server-socket-endpoint-config";
default:
throw new IllegalStateException("Not recognised protocol type");
}
}
return "wan-endpoint-config";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endpointConfigElementName
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
endpointConfigElementName
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean valid(String host) {
return InternetDomainName.isValid(host) || ip(host) || subnet(host);
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2018-17228
- Severity: HIGH
- CVSS Score: 7.5
Description: Adding hosts validation fixing https://github.com/narkisr/nmap4j/issues/9
Function: valid
File: src/main/java/org/nmap4j/valid/HostsInputValidator.java
Repository: narkisr/nmap4j
Fixed Code:
public boolean valid(String host) {
return InternetDomainName.isValid(host) || isIp(host) || isSubnet(host) || isFile(host);
}
|
[
"CWE-78"
] |
CVE-2018-17228
|
HIGH
| 7.5
|
narkisr/nmap4j
|
valid
|
src/main/java/org/nmap4j/valid/HostsInputValidator.java
|
06b58aa3345d2f977553685a026b93e61f0c491e
| 1
|
Analyze the following code function for security vulnerabilities
|
private void migrate9(File dataDir, Stack<Integer> versions) {
try {
Map<String, String> accountIdToName = new HashMap<>();
Set<String> userIds = new HashSet<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Accounts.xml")) {
File renamedFile = new File(dataDir, file.getName().replace("Accounts.xml", "Users.xml"));
FileUtils.moveFile(file, renamedFile);
String content = FileUtils.readFileToString(renamedFile, StandardCharsets.UTF_8);
content = StringUtils.replace(content, "com.gitplex.server.model.Account",
"com.gitplex.server.model.User");
VersionedXmlDoc dom = VersionedXmlDoc.fromXML(content);
for (Element element: dom.getRootElement().elements()) {
accountIdToName.put(element.elementText("id"), element.elementText("name"));
if (element.elementTextTrim("organization").equals("true")) {
element.detach();
} else {
userIds.add(element.elementText("id"));
element.element("organization").detach();
element.element("defaultPrivilege").detach();
element.element("noSpaceName").detach();
if (element.element("noSpaceFullName") != null)
element.element("noSpaceFullName").detach();
}
}
dom.writeToFile(renamedFile, false);
}
}
long lastUserAuthorizationId = 0;
VersionedXmlDoc userAuthorizationsDom = new VersionedXmlDoc();
Element userAuthorizationListElement = userAuthorizationsDom.addElement("list");
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Depots.xml")) {
File renamedFile = new File(dataDir, file.getName().replace("Depots.xml", "Projects.xml"));
FileUtils.moveFile(file, renamedFile);
String content = FileUtils.readFileToString(renamedFile, StandardCharsets.UTF_8);
content = StringUtils.replace(content, "com.gitplex.server.model.Depot",
"com.gitplex.server.model.Project");
VersionedXmlDoc dom = VersionedXmlDoc.fromXML(content);
for (Element element: dom.getRootElement().elements()) {
String accountId = element.elementText("account");
element.element("account").detach();
String depotName = element.elementText("name");
element.element("name").setText(accountIdToName.get(accountId) + "." + depotName);
if (element.element("defaultPrivilege") != null )
element.element("defaultPrivilege").detach();
String adminId;
if (userIds.contains(accountId)) {
adminId = accountId;
} else {
adminId = "1";
}
Element userAuthorizationElement =
userAuthorizationListElement.addElement("com.gitplex.server.model.UserAuthorization");
userAuthorizationElement.addAttribute("revision", "0.0");
userAuthorizationElement.addElement("id").setText(String.valueOf(++lastUserAuthorizationId));
userAuthorizationElement.addElement("user").setText(adminId);
userAuthorizationElement.addElement("project").setText(element.elementText("id"));
userAuthorizationElement.addElement("privilege").setText("ADMIN");
}
dom.writeToFile(renamedFile, false);
} else if (file.getName().startsWith("BranchWatchs.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (!userIds.contains(element.elementText("user"))) {
element.detach();
} else {
element.element("depot").setName("project");
}
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Teams.xml")
|| file.getName().startsWith("TeamMemberships.xml")
|| file.getName().startsWith("TeamAuthorizations.xml")
|| file.getName().startsWith("OrganizationMemberships.xml")
|| file.getName().startsWith("UserAuthorizations.xml")
|| file.getName().startsWith("PullRequest")
|| file.getName().startsWith("Review")
|| file.getName().startsWith("ReviewInvitation")) {
FileUtils.deleteFile(file);
} else if (file.getName().startsWith("Configs.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (element.elementText("key").equals("SYSTEM")) {
String storagePath = element.element("setting").elementText("storagePath");
File storageDir = new File(storagePath);
File repositoriesDir = new File(storageDir, "repositories");
if (repositoriesDir.exists()) {
File projectsDir = new File(storageDir, "projects");
FileUtils.moveDirectory(repositoriesDir, projectsDir);
for (File projectDir: projectsDir.listFiles()) {
File infoDir = new File(projectDir, "info");
if (infoDir.exists())
FileUtils.deleteDir(infoDir);
}
}
} else if (element.elementText("key").equals("SECURITY")) {
element.element("setting").addElement("enableAnonymousAccess").setText("false");
}
}
dom.writeToFile(file, false);
}
}
userAuthorizationsDom.writeToFile(new File(dataDir, "UserAuthorizations.xml"), false);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate9
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate9
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getServiceWorker(String appId, String userviewId, String userviewKey) {
Set<String> urls = getCacheUrls(appId, userviewId, userviewKey);
urls.addAll(UserviewUtil.getAppStaticResources(AppUtil.getCurrentAppDefinition()));
String urlsToCache = "";
for (String url : urls) {
if (!urlsToCache.isEmpty()) {
urlsToCache += ", ";
}
urlsToCache += "'" + url + "'";
}
HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
String appUserviewId = appId + "-" + userviewId;
Object[] arguments = new Object[]{
request.getContextPath(),
appUserviewId,
urlsToCache
};
String js = AppUtil.readPluginResource(getClass().getName(), "/resources/themes/universal/sw.js", arguments, false, "");
return js;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceWorker
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getServiceWorker
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String dialogScriptSubmit() {
if (useNewStyle()) {
return super.dialogScriptSubmit();
}
StringBuffer result = new StringBuffer(512);
result.append("function submitAction(actionValue, theForm, formName) {\n");
result.append("\tif (theForm == null) {\n");
result.append("\t\ttheForm = document.forms[formName];\n");
result.append("\t}\n");
result.append("\ttheForm." + PARAM_FRAMENAME + ".value = window.name;\n");
result.append("\tif (actionValue == \"" + DIALOG_OK + "\") {\n");
result.append("\t\treturn true;\n");
result.append("\t}\n");
result.append("\ttheForm." + PARAM_ACTION + ".value = actionValue;\n");
result.append("\ttheForm.submit();\n");
result.append("\treturn false;\n");
result.append("}\n");
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogScriptSubmit
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogScriptSubmit
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onDragDownReset() {
mStackScroller.setDimmed(true /* dimmed */, true /* animated */);
mStackScroller.resetScrollPosition();
mStackScroller.resetCheckSnoozeLeavebehind();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDragDownReset
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
|
onDragDownReset
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void invokeBeam() {
NfcPermissions.enforceUserPermissions(mContext);
if (mForegroundUtils.isInForeground(Binder.getCallingUid())) {
mP2pLinkManager.onManualBeamInvoke(null);
} else {
Log.e(TAG, "Calling activity not in foreground.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeBeam
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
invokeBeam
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSyncRequest(EndPoint info, int reason, Bundle extras);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSyncRequest
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
onSyncRequest
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDumpUid(boolean dumpUid) {
mDumpUid = dumpUid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDumpUid
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
setDumpUid
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean supportsLocalVoiceInteraction() {
return LocalServices.getService(VoiceInteractionManagerInternal.class)
.supportsLocalVoiceInteraction();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supportsLocalVoiceInteraction
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
|
supportsLocalVoiceInteraction
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCmsBean(CmsBean cmsBean) {
this.cmsBean = cmsBean;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCmsBean
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
|
setCmsBean
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Grid<T> getSource() {
return (Grid<T>) super.getSource();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSource
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
|
getSource
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract int getTopPadding();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTopPadding
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getTopPadding
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOwnerInfo(String info, int userId) {
setString(LOCK_SCREEN_OWNER_INFO, info, userId);
updateCryptoUserInfo(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOwnerInfo
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
setOwnerInfo
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> idAll(ApiScenarioBatchRequest request) {
ServiceUtils.getSelectAllIds(request, request.getCondition(),
(query) -> extApiScenarioMapper.selectIdsByQuery(query));
return request.getIds();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: idAll
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
idAll
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserSwitchComplete(int userId) {
updateCameraVisibility();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserSwitchComplete
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onUserSwitchComplete
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTrustUsuallyManaged(boolean managed, int userId) {
try {
getLockSettings().setBoolean(IS_TRUST_USUALLY_MANAGED, managed, userId);
} catch (RemoteException e) {
// System dead.
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTrustUsuallyManaged
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
setTrustUsuallyManaged
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void atualizarCliente(Cliente cliente) throws ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
try {
con = ConnectionFactory.getConnection();
con.setAutoCommit(false);
stmt = con.prepareStatement(stmtAtualizaCliente);
stmt.setString(1, cliente.getNome());
stmt.setString(2, cliente.getSexo());
stmt.setString(3, cliente.getCpf());
stmt.setDate(4, cliente.getNascimento());
stmt.setString(5, cliente.getTelefone());
stmt.setString(6, cliente.getEmail());
stmt.setString(7, cliente.getSenha());
stmt.setString(8, cliente.getCep());
stmt.setString(9, cliente.getEndereco());
stmt.setString(10, cliente.getEndNumero());
stmt.setString(11, cliente.getEndComplemento());
stmt.setString(12, cliente.getBairro());
stmt.setString(13, cliente.getCidade());
stmt.setString(14, cliente.getEstado());
stmt.setInt(15, cliente.getPerfil());
stmt.setInt(16, cliente.getIdCliente());
stmt.executeUpdate();
con.commit();
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: atualizarCliente
File: src/java/br/com/magazine/dao/ClienteDAO.java
Repository: evandro-machado/Trabalho-Web2
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10061
|
MEDIUM
| 5.2
|
evandro-machado/Trabalho-Web2
|
atualizarCliente
|
src/java/br/com/magazine/dao/ClienteDAO.java
|
f59ac954625d0a4f6d34f069a2e26686a7a20aeb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String settingTypeToString(int type) {
switch (type) {
case SETTINGS_TYPE_GLOBAL: {
return "SETTINGS_GLOBAL";
}
case SETTINGS_TYPE_SECURE: {
return "SETTINGS_SECURE";
}
case SETTINGS_TYPE_SYSTEM: {
return "SETTINGS_SYSTEM";
}
default: {
return "UNKNOWN";
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: settingTypeToString
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
settingTypeToString
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canManageUsers(CallerIdentity caller) {
return hasCallingOrSelfPermission(permission.MANAGE_USERS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canManageUsers
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
canManageUsers
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final synchronized <T extends Describable<T>>
void removeFromList(Descriptor<T> item, List<T> collection) throws IOException {
for( int i=0; i< collection.size(); i++ ) {
if(collection.get(i).getDescriptor()==item) {
// found it
collection.remove(i);
save();
updateTransientActions();
return;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeFromList
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
removeFromList
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityStarter setActivityInfo(ActivityInfo info) {
mRequest.activityInfo = info;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActivityInfo
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
setActivityInfo
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean areAllUsersAffiliatedWithDeviceLocked() {
return mInjector.binderWithCleanCallingIdentity(() -> {
final List<UserInfo> userInfos = mUserManager.getAliveUsers();
for (int i = 0; i < userInfos.size(); i++) {
int userId = userInfos.get(i).id;
if (!isUserAffiliatedWithDeviceLocked(userId)) {
Slogf.d(LOG_TAG, "User id " + userId + " not affiliated.");
return false;
}
}
return true;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: areAllUsersAffiliatedWithDeviceLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
areAllUsersAffiliatedWithDeviceLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFolder(String folder) {
this.folder = folder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFolder
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
setFolder
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public int userIdCount() {
return mUidMap.size();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userIdCount
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
|
userIdCount
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
default Optional<String> getOrigin() {
return findFirst(ORIGIN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrigin
File: http/src/main/java/io/micronaut/http/HttpHeaders.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
getOrigin
|
http/src/main/java/io/micronaut/http/HttpHeaders.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ActivityManager.RecentTaskInfo getTaskInfo() {
checkCaller();
synchronized (ActivityManagerService.this) {
long origId = Binder.clearCallingIdentity();
try {
TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(mTaskId);
if (tr == null) {
throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
}
return createRecentTaskInfoFromTaskRecord(tr);
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskInfo
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
|
getTaskInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteInput[] getDataOnlyRemoteInputs() {
return getParcelableArrayFromBundle(mExtras, EXTRA_DATA_ONLY_INPUTS, RemoteInput.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDataOnlyRemoteInputs
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getDataOnlyRemoteInputs
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public DataOutputStream getOutputStream() {
return new DataOutputStream(accumulator);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutputStream
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getOutputStream
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseHeldUnits(final List<Element> elements) throws GameParseException {
for (final Element current : elements) {
final PlayerId player = getPlayerId(current, "player", true);
final UnitType type = getUnitType(current, "unitType", true);
final int quantity = Integer.parseInt(current.getAttribute("quantity"));
player.getUnits().addAll(type.create(quantity, player));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseHeldUnits
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
|
parseHeldUnits
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
public Attribute getGlobalAttributeByName(String name) {
return globalAttributes.get(name.toLowerCase());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalAttributeByName
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
getGlobalAttributeByName
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean removeJobGroupToNeverDelete(String group) {
if(group != null)
return jobGroupsToNeverDelete.remove(group);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeJobGroupToNeverDelete
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
removeJobGroupToNeverDelete
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setExpireTimeSeconds(long expireTimeSeconds) {
customHeaders.put("Cache-Control", "private, max-age=" + expireTimeSeconds);
customHeaders.put("Expires", new Date(System.currentTimeMillis() + (expireTimeSeconds * 1000)).toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExpireTimeSeconds
File: src/main/java/spark/staticfiles/StaticFilesConfiguration.java
Repository: perwendel/spark
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2016-9177
|
MEDIUM
| 5
|
perwendel/spark
|
setExpireTimeSeconds
|
src/main/java/spark/staticfiles/StaticFilesConfiguration.java
|
26b57d0596ee73c14c558463943ef0857e53b91f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateInputRestrictedLocked() {
boolean inputRestricted = isInputRestricted();
if (mInputRestricted != inputRestricted) {
mInputRestricted = inputRestricted;
int size = mKeyguardStateCallbacks.size();
for (int i = size - 1; i >= 0; i--) {
final IKeyguardStateCallback callback = mKeyguardStateCallbacks.get(i);
try {
callback.onInputRestrictedStateChanged(inputRestricted);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to call onDeviceProvisioned", e);
if (e instanceof DeadObjectException) {
mKeyguardStateCallbacks.remove(callback);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateInputRestrictedLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
updateInputRestrictedLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String all() {
int page = ParseUtil.strToInt(getPara(1), 1);
Map<String, Object> data = new Log().find(page, getDefaultRows());
setPageInfo(Constants.getArticleUri() + "all-", data, page);
return "index";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: all
File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
all
|
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
private void hidePopups() {
hideSelectPopup();
hideHandles();
hideSelectActionBar();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hidePopups
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
|
hidePopups
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void copyAccount(
UserHandle targetUser, UserHandle sourceUser, Account accountToMigrate,
String callerPackage) {
final long startTime = SystemClock.elapsedRealtime();
try {
final AccountManager accountManager = mContext.getSystemService(AccountManager.class);
final boolean copySucceeded = accountManager.copyAccountToUser(
accountToMigrate,
sourceUser,
targetUser,
/* callback= */ null, /* handler= */ null)
.getResult(60 * 3, TimeUnit.SECONDS);
if (copySucceeded) {
logCopyAccountStatus(COPY_ACCOUNT_SUCCEEDED, callerPackage);
logEventDuration(
DevicePolicyEnums.PLATFORM_PROVISIONING_COPY_ACCOUNT_MS,
startTime,
callerPackage);
} else {
logCopyAccountStatus(COPY_ACCOUNT_FAILED, callerPackage);
Slogf.e(LOG_TAG, "Failed to copy account to " + targetUser);
}
} catch (OperationCanceledException e) {
// Account migration is not considered a critical operation.
logCopyAccountStatus(COPY_ACCOUNT_TIMED_OUT, callerPackage);
Slogf.e(LOG_TAG, "Exception copying account to " + targetUser, e);
} catch (AuthenticatorException | IOException e) {
logCopyAccountStatus(COPY_ACCOUNT_EXCEPTION, callerPackage);
Slogf.e(LOG_TAG, "Exception copying account to " + targetUser, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyAccount
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
copyAccount
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequirePOST
public void doEval(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
checkPermission(ADMINISTER);
try {
MetaClass mc = WebApp.getCurrent().getMetaClass(getClass());
Script script = mc.classLoader.loadTearOff(JellyClassLoaderTearOff.class).createContext().compileScript(new InputSource(req.getReader()));
new JellyRequestDispatcher(this,script).forward(req,rsp);
} catch (JellyException e) {
throw new ServletException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doEval
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
doEval
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServiceProvider getServiceProvider(String serviceProviderName, String tenantDomain)
throws IdentityApplicationManagementException {
// invoking the listeners
Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners();
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && !listener.doPreGetServiceProvider(serviceProviderName, tenantDomain)) {
return null;
}
}
ServiceProvider serviceProvider = null;
try {
startTenantFlow(tenantDomain);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
serviceProvider = appDAO.getApplication(serviceProviderName, tenantDomain);
if (serviceProvider == null && ApplicationManagementServiceComponent.getFileBasedSPs().containsKey(
serviceProviderName)) {
serviceProvider = ApplicationManagementServiceComponent.getFileBasedSPs().get(serviceProviderName);
}
} finally {
endTenantFlow();
}
// invoking the listeners
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() &&
!listener.doPostGetServiceProvider(serviceProvider, serviceProviderName, tenantDomain)) {
return null;
}
}
return serviceProvider;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceProvider
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getServiceProvider
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setRenderer(InternetResource res, String path)
throws FacesException {
int lastPoint = path.lastIndexOf('.');
if (lastPoint > 0) {
String ext = path.substring(lastPoint);
ResourceRenderer resourceRenderer = getRendererByExtension(ext);
if (null != resourceRenderer) {
res.setRenderer(resourceRenderer);
} else {
if (log.isDebugEnabled()) {
log.debug(Messages.getMessage(
Messages.NO_RESOURCE_REGISTERED_ERROR_2, path,
renderers.keySet()));
}
// String mimeType = servletContext.getMimeType(path);
res.setRenderer(defaultRenderer);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRenderer
File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Repository: nuxeo/richfaces-3.3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2013-4521
|
HIGH
| 7.5
|
nuxeo/richfaces-3.3
|
setRenderer
|
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
|
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.