instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void updateBinaryStream(@Positive int columnIndex,
@Nullable InputStream inputStream) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(),
"updateBinaryStream(int, InputStream)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBinaryStream
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
|
updateBinaryStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int getInt(CharSequence name, int defaultValue) {
final Integer v = getInt(name);
return v != null ? v : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInt
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
getInt
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public final GF2Polynomial getFieldPolynomial()
{
if (fieldPolynomial == null)
{
computeFieldPolynomial();
}
return new GF2Polynomial(fieldPolynomial);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFieldPolynomial
File: core/src/main/java/org/bouncycastle/pqc/math/linearalgebra/GF2nField.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getFieldPolynomial
|
core/src/main/java/org/bouncycastle/pqc/math/linearalgebra/GF2nField.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
private void applyConfig() throws SSLException {
debug("JSSEngine: applyConfig()");
for (Integer key : config.keySet()) {
Integer value = config.get(key);
debug("Setting configuration option: " + key + "=" + value);
if (SSL.OptionSet(ssl_fd, key, value) != SSL.SECSuccess) {
throw new SSLException("Unable to set configuration value: " + key + "=" + value);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyConfig
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
applyConfig
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasCrossUsersPermission(CallerIdentity caller, int userHandle) {
return (userHandle == caller.getUserId()) || isSystemUid(caller) || isRootUid(caller)
|| hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCrossUsersPermission
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
|
hasCrossUsersPermission
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAddKeepalivePacketFilter(int slot, @NonNull KeepalivePacketData packet) {
if (!isThisCallbackActive()) return;
ClientModeImpl.this.sendMessage(
CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF, slot, 0, packet);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAddKeepalivePacketFilter
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onAddKeepalivePacketFilter
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public WorkflowOverview getWorkflowOverview(File file) throws IOException {
// Get the content of this file from Github
long fileSizeBytes = file.length();
// Check file size limit before parsing
if (fileSizeBytes <= singleFileSizeLimit) {
// Parse file as yaml
JsonNode cwlFile = yamlPathToJson(file.toPath());
// If the CWL file is packed there can be multiple workflows in a file
int packedCount = 0;
if (cwlFile.has(DOC_GRAPH)) {
// Packed CWL, find the first subelement which is a workflow and take it
for (JsonNode jsonNode : cwlFile.get(DOC_GRAPH)) {
if (extractProcess(jsonNode) == CWLProcess.WORKFLOW) {
cwlFile = jsonNode;
packedCount++;
}
}
if (packedCount > 1) {
return new WorkflowOverview("/" + file.getName(), "Packed file",
"contains " + packedCount + " workflows");
}
}
// Can only make an overview if this is a workflow
if (extractProcess(cwlFile) == CWLProcess.WORKFLOW) {
// Use filename for label if there is no defined one
String label = extractLabel(cwlFile);
if (label == null) {
label = file.getName();
}
// Return the constructed overview
return new WorkflowOverview("/" + file.getName(), label, extractDoc(cwlFile));
} else {
// Return null if not a workflow file
return null;
}
} else {
throw new IOException("File '" + file.getName() + "' is over singleFileSizeLimit - " +
FileUtils.byteCountToDisplaySize(fileSizeBytes) + "/" +
FileUtils.byteCountToDisplaySize(singleFileSizeLimit));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorkflowOverview
File: src/main/java/org/commonwl/view/cwl/CWLService.java
Repository: common-workflow-language/cwlviewer
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-41110
|
HIGH
| 7.5
|
common-workflow-language/cwlviewer
|
getWorkflowOverview
|
src/main/java/org/commonwl/view/cwl/CWLService.java
|
f6066f09edb70033a2ce80200e9fa9e70a5c29de
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
@Override
public Set<String> getGrantedPermissions(@NonNull String packageName,
@UserIdInt int userId) {
return mPermissionManagerServiceImpl.getGrantedPermissions(packageName, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGrantedPermissions
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getGrantedPermissions
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isInProgressFile(File file) {
return getInProgressMarkerFile(file).exists();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInProgressFile
File: subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java
Repository: gradle
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35946
|
MEDIUM
| 5.5
|
gradle
|
isInProgressFile
|
subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java
|
859eae2b2acf751ae7db3c9ffefe275aa5da0d5d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void formOK(UserRequest ureq) {
String val = dataEl.getValue();
if (!StringHelper.containsNonWhitespace(val) && (returnFileEl != null ? !returnFileEl.isUploadSuccess() : true)) {
// do not proceed when nothin in input field and no file uploaded
setFormWarning("form.step2.error");
return;
}
setFormWarning(null); // reset error
BulkAssessmentDatas datas = (BulkAssessmentDatas)getFromRunContext("datas");
if(datas == null) {
datas = new BulkAssessmentDatas();
}
if(statusEl.isOneSelected()) {
String selectedStatus = statusEl.getSelectedKey();
if(AssessmentEntryStatus.isValueOf(selectedStatus)) {
datas.setStatus(AssessmentEntryStatus.valueOf(selectedStatus));
}
}
if(visibilityEl.isOneSelected()) {
String selectedVisibility = visibilityEl.getSelectedKey();
if("visible".equals(selectedVisibility)) {
datas.setVisibility(Boolean.TRUE);
} else if("notvisible".equals(selectedVisibility)) {
datas.setVisibility(Boolean.FALSE);
}
}
if(acceptSubmissionEl != null && acceptSubmissionEl.isOneSelected()) {
datas.setAcceptSubmission(acceptSubmissionEl.isSelected(0));
}
if(bulkAssessmentTmpDir == null) {
VFSContainer bulkAssessmentDir = VFSManager.olatRootContainer("/bulkassessment/", null);
bulkAssessmentTmpDir = bulkAssessmentDir.createChildContainer(UUID.randomUUID().toString());
}
backupInputDatas(val, datas, bulkAssessmentTmpDir);
List<String[]> splittedRows = splitRawData(val);
addToRunContext("splittedRows", splittedRows);
List<BulkAssessmentRow> rows = new ArrayList<>(100);
if(returnFileEl != null) {
processReturnFiles(datas, rows, bulkAssessmentTmpDir);
}
datas.setRows(rows);
addToRunContext("datas", datas);
fireEvent(ureq, StepsEvent.ACTIVATE_NEXT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formOK
File: src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
formOK
|
src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAgentUrlIfNeeded(HttpServletRequest pReq) {
// Lookup the Agent URL if needed
if (initAgentUrlFromRequest) {
updateAgentUrl(NetworkUtil.sanitizeLocalUrl(pReq.getRequestURL().toString()), extractServletPath(pReq),pReq.getAuthType() != null);
initAgentUrlFromRequest = false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAgentUrlIfNeeded
File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
updateAgentUrlIfNeeded
|
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<Link> getRelatedLinks(Contentlet contentlet) throws DotDataException {
HibernateUtil dh = new HibernateUtil(Link.class);
Link l = new Link();
String tableName = l.getType();
String sql = "SELECT {" + tableName + ".*} from " + tableName + " " + tableName + ", tree tree, inode "
+ tableName + "_1_ where tree.parent = ? and tree.child = " + tableName + ".inode and " + tableName
+ "_1_.inode = " + tableName + ".inode and "+tableName+"_1_.type ='"+tableName+"'";
Logger.debug(this, "HibernateUtilSQL:getRelatedLinks\n " + sql);
dh.setSQLQuery(sql);
Logger.debug(this, "inode: " + contentlet.getInode() + "\n");
dh.setParam(contentlet.getInode());
return dh.list();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelatedLinks
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getRelatedLinks
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CiphertextHeaderV2 decode(final byte[] data, final Function<String, SecretKey> keyLookup)
throws EncodingException
{
final ByteBuffer bb = ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN);
return decodeInternal(
ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN),
keyLookup,
ByteBuffer -> bb.getInt(),
ByteBuffer -> bb.get(),
(ByteBuffer, output) -> bb.get(output));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decode
File: src/main/java/org/cryptacular/CiphertextHeaderV2.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
decode
|
src/main/java/org/cryptacular/CiphertextHeaderV2.java
|
00395c232cdc62d4292ce27999c026fc1f076b1d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onVaadinSessionStarted(VaadinRequest request,
VaadinSession session) {
SessionInitEvent event = new SessionInitEvent(this, session, request);
for (SessionInitListener listener : sessionInitListeners) {
try {
listener.sessionInit(event);
} catch (Exception e) {
/*
* for now, use the session error handler; in the future, could
* have an API for using some other handler for session init and
* destroy listeners
*/
session.getErrorHandler().error(new ErrorEvent(e));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onVaadinSessionStarted
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
onVaadinSessionStarted
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerScreenObserver(ScreenObserver observer) {
mScreenObservers.add(observer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerScreenObserver
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
registerScreenObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addViolation(String propertyName, String message) {
violationOccurred = true;
String messageTemplate = escapeEl(message);
context.buildConstraintViolationWithTemplate(messageTemplate)
.addPropertyNode(propertyName)
.addConstraintViolation();
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2020-11002
- Severity: HIGH
- CVSS Score: 9.0
Description: Disable message interpolation in ConstraintViolations by default (#3208)
Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`.
Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation.
The message parameters will be escaped by default.
Refs #3153
Refs #3157
Function: addViolation
File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
Repository: dropwizard
Fixed Code:
public void addViolation(String propertyName, String message) {
addViolation(propertyName, message, Collections.emptyMap());
}
|
[
"CWE-74"
] |
CVE-2020-11002
|
HIGH
| 9
|
dropwizard
|
addViolation
|
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
|
d5a512f7abf965275f2a6b913ac4fe778e424242
| 1
|
Analyze the following code function for security vulnerabilities
|
public static void addFileToZipAPKTool(String path, String srcFile, ZipOutputStream zip) throws Exception {
File folder = new File(srcFile);
String check = path.toLowerCase();
//if(check.startsWith("decoded unknown") || check.startsWith("decoded lib") || check.startsWith("decoded
// assets") || check.startsWith("decoded original") || check.startsWith("decoded smali") || check.startsWith
// ("decoded apktool.yml"))
if (check.startsWith("decoded original") || check.startsWith("decoded smali") || check.startsWith("decoded "
+ "apktool.yml"))
return;
//if(path.equals("original") || path.equals("classes.dex") || path.equals("apktool.yml"))
// continue;
if (folder.isDirectory()) {
addFolderToZipAPKTool(path, srcFile, zip);
} else {
byte[] buf = new byte[1024];
int len;
try (FileInputStream in = new FileInputStream(srcFile)) {
ZipEntry entry;
entry = new ZipEntry(path + "/" + folder.getName());
zip.putNextEntry(entry);
while ((len = in.read(buf)) > 0) {
zip.write(buf, 0, len);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addFileToZipAPKTool
File: src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
Repository: Konloch/bytecode-viewer
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-21675
|
MEDIUM
| 6.8
|
Konloch/bytecode-viewer
|
addFileToZipAPKTool
|
src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
|
1ec02658fe6858162f5e6a24f97928de6696c5cb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loadGroupWidgetProvidersLocked(int[] profileIds) {
List<ResolveInfo> allReceivers = null;
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
final int profileCount = profileIds.length;
for (int i = 0; i < profileCount; i++) {
final int profileId = profileIds[i];
List<ResolveInfo> receivers = queryIntentReceivers(intent, profileId);
if (receivers != null && !receivers.isEmpty()) {
if (allReceivers == null) {
allReceivers = new ArrayList<>();
}
allReceivers.addAll(receivers);
}
}
final int N = (allReceivers == null) ? 0 : allReceivers.size();
for (int i = 0; i < N; i++) {
ResolveInfo receiver = allReceivers.get(i);
addProviderLocked(receiver);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadGroupWidgetProvidersLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
loadGroupWidgetProvidersLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setAlwaysOnVpnPackage(ComponentName who, String vpnPackage, boolean lockdown,
List<String> lockdownAllowlist)
throws SecurityException {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_ALWAYS_ON_VPN_PACKAGE);
if (vpnPackage == null) {
final String prevVpnPackage;
synchronized (getLockObject()) {
prevVpnPackage = getProfileOwnerOrDeviceOwnerLocked(caller).mAlwaysOnVpnPackage;
// If the admin is clearing VPN package but hasn't configure any VPN previously,
// ignore it so that it doesn't interfere with user-configured VPNs.
if (TextUtils.isEmpty(prevVpnPackage)) {
return true;
}
}
revokeVpnAuthorizationForPackage(prevVpnPackage, caller.getUserId());
}
final int userId = caller.getUserId();
mInjector.binderWithCleanCallingIdentity(() -> {
if (vpnPackage != null && !isPackageInstalledForUser(vpnPackage, userId)) {
Slogf.w(LOG_TAG, "Non-existent VPN package specified: " + vpnPackage);
throw new ServiceSpecificException(
DevicePolicyManager.ERROR_VPN_PACKAGE_NOT_FOUND, vpnPackage);
}
if (vpnPackage != null && lockdown && lockdownAllowlist != null) {
for (String packageName : lockdownAllowlist) {
if (!isPackageInstalledForUser(packageName, userId)) {
Slogf.w(LOG_TAG, "Non-existent package in VPN allowlist: " + packageName);
throw new ServiceSpecificException(
DevicePolicyManager.ERROR_VPN_PACKAGE_NOT_FOUND, packageName);
}
}
}
// If some package is uninstalled after the check above, it will be ignored by CM.
if (!mInjector.getVpnManager().setAlwaysOnVpnPackageForUser(
userId, vpnPackage, lockdown, lockdownAllowlist)) {
throw new UnsupportedOperationException();
}
});
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_ALWAYS_ON_VPN_PACKAGE)
.setAdmin(caller.getComponentName())
.setStrings(vpnPackage)
.setBoolean(lockdown)
.setInt(lockdownAllowlist != null ? lockdownAllowlist.size() : 0)
.write();
synchronized (getLockObject()) {
ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
if (!TextUtils.equals(vpnPackage, admin.mAlwaysOnVpnPackage)
|| lockdown != admin.mAlwaysOnVpnLockdown) {
admin.mAlwaysOnVpnPackage = vpnPackage;
admin.mAlwaysOnVpnLockdown = lockdown;
saveSettingsLocked(userId);
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlwaysOnVpnPackage
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
|
setAlwaysOnVpnPackage
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> resolveAllBrowserApps(int userId) {
// Resolve the canonical browser intent and check that the handleAllWebDataURI boolean is set
List<ResolveInfo> list = queryIntentActivities(sBrowserIntent, null,
PackageManager.MATCH_ALL, userId);
final int count = list.size();
List<String> result = new ArrayList<String>(count);
for (int i=0; i<count; i++) {
ResolveInfo info = list.get(i);
if (info.activityInfo == null
|| !info.handleAllWebDataURI
|| (info.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0
|| result.contains(info.activityInfo.packageName)) {
continue;
}
result.add(info.activityInfo.packageName);
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveAllBrowserApps
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
|
resolveAllBrowserApps
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFirstConfiguredLoginURL() {
if (!CONF.facebookAppId().isEmpty()) {
return getFacebookLoginURL();
}
if (!CONF.googleAppId().isEmpty()) {
return getGoogleLoginURL();
}
if (!CONF.githubAppId().isEmpty()) {
return getGitHubLoginURL();
}
if (!CONF.linkedinAppId().isEmpty()) {
return getLinkedInLoginURL();
}
if (!CONF.twitterAppId().isEmpty()) {
return getTwitterLoginURL();
}
if (!CONF.microsoftAppId().isEmpty()) {
return getMicrosoftLoginURL();
}
if (isSlackAuthEnabled()) {
return getSlackLoginURL();
}
if (!CONF.amazonAppId().isEmpty()) {
return getAmazonLoginURL();
}
if (!CONF.oauthAppId("").isEmpty()) {
return getOAuth2LoginURL();
}
if (!CONF.oauthAppId("second").isEmpty()) {
return getOAuth2SecondLoginURL();
}
if (!CONF.oauthAppId("third").isEmpty()) {
return getOAuth2ThirdLoginURL();
}
return SIGNINLINK + "?code=3&error=true";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFirstConfiguredLoginURL
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
|
getFirstConfiguredLoginURL
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setTimeZone(ComponentName who, String timeZone) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller));
// Don't allow set timezone when auto timezone is on.
if (mInjector.settingsGlobalGetInt(Global.AUTO_TIME_ZONE, 0) == 1) {
return false;
}
mInjector.binderWithCleanCallingIdentity(() ->
mInjector.getAlarmManager().setTimeZone(timeZone));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_TIME_ZONE)
.setAdmin(caller.getComponentName())
.write();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTimeZone
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
|
setTimeZone
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasKeyPair(String callerPackage, String alias) {
final CallerIdentity caller = getCallerIdentity(callerPackage);
final boolean isCredentialManagementApp = isCredentialManagementApp(caller);
Preconditions.checkCallAuthorization(canInstallCertificates(caller)
|| isCredentialManagementApp);
if (isCredentialManagementApp) {
Preconditions.checkCallAuthorization(
isAliasInCredentialManagementAppPolicy(caller, alias),
CREDENTIAL_MANAGEMENT_APP_INVALID_ALIAS_MSG);
}
return mInjector.binderWithCleanCallingIdentity(() -> {
try (KeyChainConnection keyChainConnection =
KeyChain.bindAsUser(mContext, caller.getUserHandle())) {
return keyChainConnection.getService().containsKeyPair(alias);
} catch (RemoteException e) {
Slogf.e(LOG_TAG, "Querying keypair", e);
} catch (InterruptedException e) {
Slogf.w(LOG_TAG, "Interrupted while querying keypair", e);
Thread.currentThread().interrupt();
}
return false;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasKeyPair
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
|
hasKeyPair
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isValid(ConstraintValidatorContext context) {
boolean isValid = true;
Set<String> registryUrls = new HashSet<>();
for (RegistryLogin login: getRegistryLogins()) {
if (!registryUrls.add(login.getRegistryUrl())) {
isValid = false;
String message;
if (login.getRegistryUrl() != null)
message = "Duplicate login entry for registry '" + login.getRegistryUrl() + "'";
else
message = "Duplicate login entry for official registry";
context.buildConstraintViolationWithTemplate(message)
.addPropertyNode("registryLogins").addConstraintViolation();
break;
}
}
if (getRunOptions() != null) {
String[] arguments = StringUtils.parseQuoteTokens(getRunOptions());
String reservedOptions[] = new String[] {"-w", "--workdir", "-d", "--detach", "-a", "--attach", "-t", "--tty",
"-i", "--interactive", "--rm", "--restart", "--name"};
if (hasOptions(arguments, reservedOptions)) {
StringBuilder errorMessage = new StringBuilder("Can not use options: "
+ Joiner.on(", ").join(reservedOptions));
context.buildConstraintViolationWithTemplate(errorMessage.toString())
.addPropertyNode("runOptions").addConstraintViolation();
isValid = false;
}
}
if (!isValid)
context.disableDefaultConstraintViolation();
return isValid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValid
File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
isValid
|
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRenderedTitle(Syntax outputSyntax, XWikiContext context)
{
DocumentDisplayerParameters parameters = new DocumentDisplayerParameters();
parameters.setTitleDisplayed(true);
parameters.setExecutionContextIsolated(true);
parameters.setTargetSyntax(outputSyntax);
try {
XDOM titleXDOM = getDocumentDisplayer().display(this, parameters);
return renderXDOM(titleXDOM, outputSyntax);
} catch (Exception e) {
// We've failed to extract the Document's title or to render it. We log an error but we use the page name
// as the returned title in order to not generate errors in lots of places in the wiki (e.g. Activity
// Stream, menus, etc). The title is used in a lots of places...
LOGGER.error("Failed to render title for [{}]", getDocumentReference(), e);
return getDocumentReference().getName();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedTitle
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRenderedTitle
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getProducerCount(ConnectionId connectionId) {
int result = 0;
TransportConnectionState cs = lookupConnectionState(connectionId);
if (cs != null) {
for (SessionId sessionId : cs.getSessionIds()) {
SessionState sessionState = cs.getSessionState(sessionId);
if (sessionState != null) {
result += sessionState.getProducerIds().size();
}
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProducerCount
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
getProducerCount
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeUploadedAttachment(DocumentReference documentReference, String filename)
{
TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession();
return temporaryAttachmentSession.removeAttachment(documentReference, filename);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUploadedAttachment
File: xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-749"
] |
CVE-2023-26478
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
removeUploadedAttachment
|
xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
|
3c73c59e39b6436b1074d8834cf276916010014d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getContentFromURI(String uri) throws Exception
{
GetMethod getMethod = executeGet(uri);
Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());
return getMethod.getResponseBodyAsString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentFromURI
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-37277
|
CRITICAL
| 9.6
|
xwiki/xwiki-platform
|
getContentFromURI
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
|
4c175405faa0e62437df397811c7526dfc0fbae7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void multiplyBy(BigDecimal multiplicand) {
if (isInfinite() || isZero() || isNaN()) {
return;
}
BigDecimal temp = toBigDecimal();
temp = temp.multiply(multiplicand);
setToBigDecimal(temp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: multiplyBy
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
multiplyBy
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
void requestPssAllProcsLocked(long now, boolean always, boolean memLowered) {
if (!always) {
if (now < (mLastFullPssTime +
(memLowered ? FULL_PSS_LOWERED_INTERVAL : FULL_PSS_MIN_INTERVAL))) {
return;
}
}
if (DEBUG_PSS) Slog.d(TAG_PSS, "Requesting PSS of all procs! memLowered=" + memLowered);
mLastFullPssTime = now;
mFullPssPending = true;
mPendingPssProcesses.ensureCapacity(mLruProcesses.size());
mPendingPssProcesses.clear();
for (int i = mLruProcesses.size() - 1; i >= 0; i--) {
ProcessRecord app = mLruProcesses.get(i);
if (app.thread == null
|| app.curProcState == ActivityManager.PROCESS_STATE_NONEXISTENT) {
continue;
}
if (memLowered || now > (app.lastStateTime+ProcessList.PSS_ALL_INTERVAL)) {
app.pssProcState = app.setProcState;
app.nextPssTime = ProcessList.computeNextPssTime(app.curProcState, true,
mTestPssMode, isSleepingLocked(), now);
mPendingPssProcesses.add(app);
}
}
mBgHandler.sendEmptyMessage(COLLECT_PSS_BG_MSG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestPssAllProcsLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
requestPssAllProcsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasCachesDir() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCachesDir
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
hasCachesDir
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void
setInputSourceFile(ThreadContext context, IRubyObject file)
{
source = new InputSource();
ParserContext.setUrl(context, source, file);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInputSourceFile
File: ext/java/nokogiri/internals/ParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
setInputSourceFile
|
ext/java/nokogiri/internals/ParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearUserConfiguredVpns(int userId) {
final String adminConfiguredVpnPkg;
synchronized (getLockObject()) {
final ActiveAdmin owner = getDeviceOrProfileOwnerAdminLocked(userId);
if (owner == null) {
Slogf.wtf(LOG_TAG, "Admin not found");
return;
}
adminConfiguredVpnPkg = owner.mAlwaysOnVpnPackage;
}
// Clear always-on configuration if it wasn't set by the admin.
if (adminConfiguredVpnPkg == null) {
mInjector.getVpnManager().setAlwaysOnVpnPackageForUser(userId, null, false, null);
}
// Clear app authorizations to establish VPNs. When DISALLOW_CONFIG_VPN is enforced apps
// won't be able to get those authorizations unless it is configured by an admin.
final List<AppOpsManager.PackageOps> allVpnOps = mInjector.getAppOpsManager()
.getPackagesForOps(new int[] {AppOpsManager.OP_ACTIVATE_VPN});
if (allVpnOps == null) {
return;
}
for (AppOpsManager.PackageOps pkgOps : allVpnOps) {
if (UserHandle.getUserId(pkgOps.getUid()) != userId
|| pkgOps.getPackageName().equals(adminConfiguredVpnPkg)) {
continue;
}
if (pkgOps.getOps().size() != 1) {
Slogf.wtf(LOG_TAG, "Unexpected number of ops returned");
continue;
}
final @Mode int mode = pkgOps.getOps().get(0).getMode();
if (mode == MODE_ALLOWED) {
Slogf.i(LOG_TAG, String.format("Revoking VPN authorization for package %s uid %d",
pkgOps.getPackageName(), pkgOps.getUid()));
mInjector.getAppOpsManager().setMode(AppOpsManager.OP_ACTIVATE_VPN, pkgOps.getUid(),
pkgOps.getPackageName(), MODE_DEFAULT);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearUserConfiguredVpns
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
|
clearUserConfiguredVpns
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull StorageVolume getStorageVolume(@NonNull Context context,
@NonNull File path) throws FileNotFoundException {
int userId = extractUserId(path.getPath());
Context userContext = context;
if (userId >= 0 && (context.getUser().getIdentifier() != userId)) {
// This volume is for a different user than our context, create a context
// for that user to retrieve the correct volume.
try {
userContext = context.createPackageContextAsUser("system", 0,
UserHandle.of(userId));
} catch (PackageManager.NameNotFoundException e) {
throw new FileNotFoundException("Can't get package context for user " + userId);
}
}
StorageVolume volume = userContext.getSystemService(StorageManager.class)
.getStorageVolume(path);
if (volume == null) {
throw new FileNotFoundException("Can't find volume for " + path.getPath());
}
return volume;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStorageVolume
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
getStorageVolume
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeWidgetPayloadIfAppropriate(FileDescriptor fd, String pkgName)
throws IOException {
byte[] widgetState = AppWidgetBackupBridge.getWidgetState(pkgName,
UserHandle.USER_OWNER);
// has the widget state changed since last time?
final File widgetFile = new File(mStateDir, pkgName + "_widget");
final boolean priorStateExists = widgetFile.exists();
if (MORE_DEBUG) {
if (priorStateExists || widgetState != null) {
Slog.i(TAG, "Checking widget update: state=" + (widgetState != null)
+ " prior=" + priorStateExists);
}
}
if (!priorStateExists && widgetState == null) {
// no prior state, no new state => nothing to do
return;
}
// if the new state is not null, we might need to compare checksums to
// determine whether to update the widget blob in the archive. If the
// widget state *is* null, we know a priori at this point that we simply
// need to commit a deletion for it.
String newChecksum = null;
if (widgetState != null) {
newChecksum = SHA1Checksum(widgetState);
if (priorStateExists) {
final String priorChecksum;
try (
FileInputStream fin = new FileInputStream(widgetFile);
DataInputStream in = new DataInputStream(fin)
) {
priorChecksum = in.readUTF();
}
if (Objects.equals(newChecksum, priorChecksum)) {
// Same checksum => no state change => don't rewrite the widget data
return;
}
}
} // else widget state *became* empty, so we need to commit a deletion
BackupDataOutput out = new BackupDataOutput(fd);
if (widgetState != null) {
try (
FileOutputStream fout = new FileOutputStream(widgetFile);
DataOutputStream stateOut = new DataOutputStream(fout)
) {
stateOut.writeUTF(newChecksum);
}
out.writeEntityHeader(KEY_WIDGET_STATE, widgetState.length);
out.writeEntityData(widgetState, widgetState.length);
} else {
// Widget state for this app has been removed; commit a deletion
out.writeEntityHeader(KEY_WIDGET_STATE, -1);
widgetFile.delete();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeWidgetPayloadIfAppropriate
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
writeWidgetPayloadIfAppropriate
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {
if (arg1 == null || arg2 == null) {
return AviatorBoolean.FALSE;
}
Object strTmp = arg1.getValue(env);
Object regexTmp = arg2.getValue(env);
if (strTmp == null || regexTmp == null) {
return AviatorBoolean.FALSE;
}
String str = String.valueOf(strTmp);
String regex = String.valueOf(regexTmp);
boolean isMatch = Pattern.compile(regex).matcher(str).matches();
return AviatorBoolean.valueOf(isMatch);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: call
File: common/src/main/java/org/dromara/hertzbeat/common/config/AviatorConfiguration.java
Repository: apache/hertzbeat
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2023-51387
|
HIGH
| 8.8
|
apache/hertzbeat
|
call
|
common/src/main/java/org/dromara/hertzbeat/common/config/AviatorConfiguration.java
|
8dcf050e27ca95d15460a7ba98a3df8a9cd1d3d2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setCheckPermissionDelegateLocked(@Nullable CheckPermissionDelegate delegate) {
if (delegate != null || mCheckPermissionDelegate != null) {
PackageManager.invalidatePackageInfoCache();
}
mCheckPermissionDelegate = delegate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCheckPermissionDelegateLocked
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
setCheckPermissionDelegateLocked
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendResourcesChangedBroadcast(boolean mediaStatus, boolean replacing,
ArrayList<ApplicationInfo> infos, IIntentReceiver finishedReceiver) {
final int size = infos.size();
final String[] packageNames = new String[size];
final int[] packageUids = new int[size];
for (int i = 0; i < size; i++) {
final ApplicationInfo info = infos.get(i);
packageNames[i] = info.packageName;
packageUids[i] = info.uid;
}
sendResourcesChangedBroadcast(mediaStatus, replacing, packageNames, packageUids,
finishedReceiver);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendResourcesChangedBroadcast
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
|
sendResourcesChangedBroadcast
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void readFully(byte[] fragment, int fragmentLength)
throws IOException
{
if (fragmentLength == 0) {
finishedReading = true;
return;
}
// read the entire input data to the buffer
compressed = new byte[Math.max(8 * 1024, fragmentLength)]; // 8K
System.arraycopy(fragment, 0, compressed, 0, fragmentLength);
int cursor = fragmentLength;
for (int readBytes = 0; (readBytes = in.read(compressed, cursor, compressed.length - cursor)) != -1; ) {
cursor += readBytes;
if (cursor >= compressed.length) {
byte[] newBuf = new byte[(compressed.length * 2)];
System.arraycopy(compressed, 0, newBuf, 0, compressed.length);
compressed = newBuf;
}
}
finishedReading = true;
// Uncompress
int uncompressedLength = Snappy.uncompressedLength(compressed, 0, cursor);
uncompressed = new byte[uncompressedLength];
Snappy.uncompress(compressed, 0, cursor, uncompressed, 0);
this.uncompressedCursor = 0;
this.uncompressedLimit = uncompressedLength;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFully
File: src/main/java/org/xerial/snappy/SnappyInputStream.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-34455
|
HIGH
| 7.5
|
xerial/snappy-java
|
readFully
|
src/main/java/org/xerial/snappy/SnappyInputStream.java
|
3bf67857fcf70d9eea56eed4af7c925671e8eaea
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public static AssetManager getSystem() {
synchronized (sSync) {
createSystemAssetsInZygoteLocked(false, FRAMEWORK_APK_PATH);
return sSystem;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSystem
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
|
getSystem
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforcePermissionGrantStateOnFinancedDevice(
String packageName, String permission) {
if (!Manifest.permission.READ_PHONE_STATE.equals(permission)) {
throw new SecurityException(permission + " cannot be used when managing a financed"
+ " device for permission grant state");
} else if (!mOwners.getDeviceOwnerPackageName().equals(packageName)) {
throw new SecurityException("Device owner package is the only package that can be used"
+ " for permission grant state when managing a financed device");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePermissionGrantStateOnFinancedDevice
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
|
enforcePermissionGrantStateOnFinancedDevice
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepareFromUri(String packageName, int pid, int uid, Uri uri, Bundle extras) {
try {
final String reason = TAG + ":prepareFromUri";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onPrepareFromUri(packageName, pid, uid, uri, extras);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in prepareFromUri.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareFromUri
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
|
prepareFromUri
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getSQL(Delete delete) {
// Delete clause
StringBuilder sql = new StringBuilder();
String deleteClause = getDeleteStatement(delete);
sql.append(deleteClause);
// From clause
sql.append(" ").append(getTableSQL(delete));
// Where clauses
List<Condition> wheres = delete.getWheres();
if (!wheres.isEmpty()) {
sql.append(" ").append(getWhereSQL(delete));
}
return sql.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DeviceWiphyCapabilities getDeviceWiphyCapabilities() {
return mWifiNative.getDeviceWiphyCapabilities(mInterfaceName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceWiphyCapabilities
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getDeviceWiphyCapabilities
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder localPort(int port, SessionProtocol... protocols) {
requireNonNull(protocols, "protocols");
return localPort(port, ImmutableList.copyOf(protocols));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: localPort
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
localPort
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRequestedOrientation(IBinder token, int requestedOrientation) {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return;
}
final long origId = Binder.clearCallingIdentity();
try {
r.setRequestedOrientation(requestedOrientation);
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestedOrientation
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
setRequestedOrientation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void setOmniboxLivenessListener(OmniboxLivenessListener listener) {
mOmniboxLivenessListener = listener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOmniboxLivenessListener
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
setOmniboxLivenessListener
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
private User getUser(String tenantDomain, String username) {
User user = new User();
user.setUserName(UserCoreUtil.removeDomainFromName(username));
user.setUserStoreDomain(UserCoreUtil.extractDomainFromName(username));
user.setTenantDomain(tenantDomain);
return user;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
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
|
getUser
|
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
|
static final void appendMemBucket(StringBuilder out, long memKB, String label,
boolean stackLike) {
int start = label.lastIndexOf('.');
if (start >= 0) start++;
else start = 0;
int end = label.length();
for (int i=0; i<DUMP_MEM_BUCKETS.length; i++) {
if (DUMP_MEM_BUCKETS[i] >= memKB) {
long bucket = DUMP_MEM_BUCKETS[i]/1024;
out.append(bucket);
out.append(stackLike ? "MB." : "MB ");
out.append(label, start, end);
return;
}
}
out.append(memKB/1024);
out.append(stackLike ? "MB." : "MB ");
out.append(label, start, end);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendMemBucket
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
appendMemBucket
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private ModelAndView addGroup(HttpServletRequest request, HttpServletResponse response) throws Exception {
String groupName = request.getParameter("groupName");
String groupComment = request.getParameter("groupComment");
if (groupComment == null) {
groupComment = "";
}
boolean hasGroup = false;
try {
hasGroup = m_groupRepository.groupExists(groupName);
} catch (Throwable e) {
throw new ServletException("Can't determine if group " + groupName + " already exists in groups.xml.", e);
}
if (hasGroup) {
return new ModelAndView("admin/userGroupView/groups/newGroup", "action", "redo");
} else {
WebGroup newGroup = new WebGroup();
newGroup.setName(groupName);
newGroup.setComments(groupComment);
return editGroup(request, newGroup);
}
}
|
Vulnerability Classification:
- CWE: CWE-352, CWE-79
- CVE: CVE-2021-25929
- Severity: LOW
- CVSS Score: 3.5
Description: NMS-13231: Backport Security Issues from Last Month
Function: addGroup
File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
Repository: OpenNMS/opennms
Fixed Code:
private ModelAndView addGroup(HttpServletRequest request, HttpServletResponse response) throws Exception {
String groupName = request.getParameter("groupName");
String groupComment = request.getParameter("groupComment");
if (groupComment == null) {
groupComment = "";
}
if (groupName != null && groupName.matches(".*[&<>\"`']+.*")) {
throw new ServletException("Group ID must not contain any HTML markup.");
}
if (groupComment != null && groupComment.matches(".*[&<>\"`']+.*")) {
throw new ServletException("Group comment must not contain any HTML markup.");
}
boolean hasGroup = false;
try {
hasGroup = m_groupRepository.groupExists(groupName);
} catch (Throwable e) {
throw new ServletException("Can't determine if group " + groupName + " already exists in groups.xml.", e);
}
if (hasGroup) {
return new ModelAndView("admin/userGroupView/groups/newGroup", "action", "redo");
} else {
WebGroup newGroup = new WebGroup();
newGroup.setName(groupName);
newGroup.setComments(groupComment);
return editGroup(request, newGroup);
}
}
|
[
"CWE-352",
"CWE-79"
] |
CVE-2021-25929
|
LOW
| 3.5
|
OpenNMS/opennms
|
addGroup
|
opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
|
eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c
| 1
|
Analyze the following code function for security vulnerabilities
|
public JSONObject append(String key, Object value) throws JSONException {
testValidity(value);
Object object = this.opt(key);
if (object == null) {
this.put(key, new JSONArray().put(value));
} else if (object instanceof JSONArray) {
this.put(key, ((JSONArray) object).put(value));
} else {
throw wrongValueFormatException(key, "JSONArray", null, null);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
append
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
protected String decodeEmailInUri(String s) throws UnsupportedEncodingException {
// TODO: handle the case where there are spaces in the display name as
// well as the email such as "Guy with spaces <guy+with+spaces@gmail.com>"
// as they could be encoded ambiguously.
// Since URLDecode.decode changes + into ' ', and + is a valid
// email character, we need to find/ replace these ourselves before
// decoding.
try {
return URLDecoder.decode(replacePlus(s), UTF8_ENCODING_NAME);
} catch (IllegalArgumentException e) {
if (LogUtils.isLoggable(LOG_TAG, LogUtils.VERBOSE)) {
LogUtils.e(LOG_TAG, "%s while decoding '%s'", e.getMessage(), s);
} else {
LogUtils.e(LOG_TAG, e, "Exception while decoding mailto address");
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decodeEmailInUri
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
decodeEmailInUri
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyPackageChangeObserversOnUpdate(ReconciledPackage reconciledPkg) {
final PackageSetting pkgSetting = reconciledPkg.mPkgSetting;
final PackageInstalledInfo pkgInstalledInfo = reconciledPkg.mInstallResult;
final PackageRemovedInfo pkgRemovedInfo = pkgInstalledInfo.mRemovedInfo;
PackageChangeEvent pkgChangeEvent = new PackageChangeEvent();
pkgChangeEvent.packageName = pkgSetting.getPkg().getPackageName();
pkgChangeEvent.version = pkgSetting.getVersionCode();
pkgChangeEvent.lastUpdateTimeMillis = pkgSetting.getLastUpdateTime();
pkgChangeEvent.newInstalled = (pkgRemovedInfo == null || !pkgRemovedInfo.mIsUpdate);
pkgChangeEvent.dataRemoved = (pkgRemovedInfo != null && pkgRemovedInfo.mDataRemoved);
pkgChangeEvent.isDeleted = false;
mPm.notifyPackageChangeObservers(pkgChangeEvent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyPackageChangeObserversOnUpdate
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
notifyPackageChangeObserversOnUpdate
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkUserReference(UserReference userReference) throws ResetPasswordException
{
// FIXME: This check shouldn't be needed if we'd have the proper API to determine which kind of
// authentication is used.
if (!(userReference instanceof DocumentUserReference)) {
throw new ResetPasswordException("Only user having a page on the wiki can reset their password.");
}
try {
return this.userManager.exists(userReference);
} catch (UserException e) {
throw new ResetPasswordException(String.format("Failed to check if user [%s] exists.", userReference), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkUserReference
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2022-41933
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
checkUserReference
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
|
443e8398b75a1295067d74afb5898370782d863a
| 0
|
Analyze the following code function for security vulnerabilities
|
public StandardResponse delete(String[] ids) {
for (String id : ids) {
new Comment().deleteById(id);
}
return new StandardResponse();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: service/src/main/java/com/zrlog/service/CommentService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
delete
|
service/src/main/java/com/zrlog/service/CommentService.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkAutoRevokeAccess(AndroidPackage pkg, int callingUid) {
if (pkg == null) {
return false;
}
final boolean isCallerPrivileged = mContext.checkCallingOrSelfPermission(
Manifest.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS)
== PackageManager.PERMISSION_GRANTED;
final boolean isCallerInstallerOnRecord =
mPackageManagerInt.isCallerInstallerOfRecord(pkg, callingUid);
if (!isCallerPrivileged && !isCallerInstallerOnRecord) {
throw new SecurityException("Caller must either hold "
+ Manifest.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS
+ " or be the installer on record");
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAutoRevokeAccess
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
checkAutoRevokeAccess
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private final ActivityRecord resumedAppLocked() {
ActivityRecord act = mStackSupervisor.resumedAppLocked();
String pkg;
int uid;
if (act != null) {
pkg = act.packageName;
uid = act.info.applicationInfo.uid;
} else {
pkg = null;
uid = -1;
}
// Has the UID or resumed package name changed?
if (uid != mCurResumedUid || (pkg != mCurResumedPackage
&& (pkg == null || !pkg.equals(mCurResumedPackage)))) {
if (mCurResumedPackage != null) {
mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_TOP_FINISH,
mCurResumedPackage, mCurResumedUid);
}
mCurResumedPackage = pkg;
mCurResumedUid = uid;
if (mCurResumedPackage != null) {
mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_TOP_START,
mCurResumedPackage, mCurResumedUid);
}
}
return act;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumedAppLocked
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
|
resumedAppLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public final String getUserName() {
return userName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserName
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
|
getUserName
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPlatformHint(String key, String value) {
if(key.equals("platformHint.compatPaintMode")) {
compatPaintMode = value.equalsIgnoreCase("true");
return;
}
if(key.equals("platformHint.legacyPaint")) {
AndroidAsyncView.legacyPaintLogic = value.equalsIgnoreCase("true");;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPlatformHint
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
setPlatformHint
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
Optional<PatternEntity_LongInt> find(PatternCacheKey cacheKey);
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-15018
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Fix #18 SQLInjection vulnerability cleared
Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.
Function: find
File: src/main/java/uk/q3c/krail/jpa/i18n/JpaPatternDao.java
Repository: KrailOrg/krail-jpa
Fixed Code:
JpaPatternEntity find(PatternCacheKey cacheKey);
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
find
|
src/main/java/uk/q3c/krail/jpa/i18n/JpaPatternDao.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 1
|
Analyze the following code function for security vulnerabilities
|
static String getSubsetPrefix(PdfDictionary dic) {
if (dic == null)
return null;
String s = getFontName(dic);
if (s == null)
return null;
if (s.length() < 8 || s.charAt(6) != '+')
return null;
for (int k = 0; k < 6; ++k) {
char c = s.charAt(k);
if (c < 'A' || c > 'Z')
return null;
}
return s;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubsetPrefix
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getSubsetPrefix
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public CharSequence getConfirmLabel() {
return mConfirmLabel;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfirmLabel
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getConfirmLabel
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
int isAllowedToStart(ActivityRecord r, boolean newTask, Task targetTask) {
if (r.packageName == null) {
ActivityOptions.abort(mOptions);
return START_CLASS_NOT_FOUND;
}
// Do not start home activity if it cannot be launched on preferred display. We are not
// doing this in ActivityTaskSupervisor#canPlaceEntityOnDisplay because it might
// fallback to launch on other displays.
if (r.isActivityTypeHome()) {
if (!mRootWindowContainer.canStartHomeOnDisplayArea(r.info, mPreferredTaskDisplayArea,
true /* allowInstrumenting */)) {
Slog.w(TAG, "Cannot launch home on display area " + mPreferredTaskDisplayArea);
return START_CANCELED;
}
}
// Do not allow background activity start in new task or in a task that uid is not present.
// Also do not allow pinned window to start single instance activity in background,
// as it will recreate the window and makes it to foreground.
boolean blockBalInTask = (newTask
|| !targetTask.isUidPresent(mCallingUid)
|| (LAUNCH_SINGLE_INSTANCE == mLaunchMode && targetTask.inPinnedWindowingMode()));
if (mRestrictedBgActivity && blockBalInTask && handleBackgroundActivityAbort(r)) {
Slog.e(TAG, "Abort background activity starts from " + mCallingUid);
return START_ABORTED;
}
// When the flags NEW_TASK and CLEAR_TASK are set, then the task gets reused but still
// needs to be a lock task mode violation since the task gets cleared out and the device
// would otherwise leave the locked task.
final boolean isNewClearTask =
(mLaunchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK))
== (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
if (!newTask) {
if (mService.getLockTaskController().isLockTaskModeViolation(targetTask,
isNewClearTask)) {
Slog.e(TAG, "Attempted Lock Task Mode violation r=" + r);
return START_RETURN_LOCK_TASK_MODE_VIOLATION;
}
} else {
if (mService.getLockTaskController().isNewTaskLockTaskModeViolation(r)) {
Slog.e(TAG, "Attempted Lock Task Mode violation r=" + r);
return START_RETURN_LOCK_TASK_MODE_VIOLATION;
}
}
if (mInTaskFragment != null && !canEmbedActivity(mInTaskFragment, r, newTask, targetTask)) {
Slog.e(TAG, "Permission denied: Cannot embed " + r + " to " + mInTaskFragment.getTask()
+ " targetTask= " + targetTask);
return START_PERMISSION_DENIED;
}
// Do not start the activity if target display's DWPC does not allow it.
// We can't return fatal error code here because it will crash the caller of
// startActivity() if they don't catch the exception. We don't expect 3P apps to make
// changes.
if (mPreferredTaskDisplayArea != null) {
final DisplayContent displayContent = mRootWindowContainer.getDisplayContentOrCreate(
mPreferredTaskDisplayArea.getDisplayId());
if (displayContent != null && displayContent.mDwpcHelper.hasController()) {
final int targetWindowingMode = (targetTask != null)
? targetTask.getWindowingMode() : displayContent.getWindowingMode();
final int launchingFromDisplayId =
mSourceRecord != null ? mSourceRecord.getDisplayId() : DEFAULT_DISPLAY;
if (!displayContent.mDwpcHelper
.canActivityBeLaunched(r.info, targetWindowingMode, launchingFromDisplayId,
newTask)) {
Slog.w(TAG, "Abort to launch " + r.info.getComponentName()
+ " on display area " + mPreferredTaskDisplayArea);
return START_ABORTED;
}
}
}
return START_SUCCESS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowedToStart
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
|
isAllowedToStart
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
HttpStatus status() {
final String statusStr = get(HttpHeaderNames.STATUS);
checkState(statusStr != null, ":status header does not exist.");
return HttpStatus.valueOf(statusStr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: status
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
status
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
long saveLike(UserReference source, EntityReference target) throws LikeException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveLike
File: xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2023-35152
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
saveLike
|
xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
|
0993a7ab3c102f9ac37ffe361a83a3dc302c0e45
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLineNumber() {
final int lineNumber = nativeGetLineNumber(mParseState);
if (lineNumber == ERROR_NULL_DOCUMENT) {
throw new NullPointerException("Null document");
}
return lineNumber;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineNumber
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getLineNumber
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void cleanUpSessionNote(Request request) {
Session session = request.getSessionInternal();
/**
* Since the container has finished the authentication, we can retrieve the original saml message as well as any relay
* state from the SP
*/
String samlRequestMessage = (String) session.getNote(GeneralConstants.SAML_REQUEST_KEY);
String samlRequestMesssageBinding = (String) session.getNote(JBossSAMLConstants.BINDING.get());
String samlResponseMessage = (String) session.getNote(GeneralConstants.SAML_RESPONSE_KEY);
String relayState = (String) session.getNote(GeneralConstants.RELAY_STATE);
String signature = (String) session.getNote(GeneralConstants.SAML_SIGNATURE_REQUEST_KEY);
String sigAlg = (String) session.getNote(GeneralConstants.SAML_SIG_ALG_REQUEST_KEY);
if (logger.isTraceEnabled()) {
StringBuilder builder = new StringBuilder();
builder.append("Retrieved saml messages and relay state from session");
builder.append("saml Request message=").append(samlRequestMessage);
builder.append("Binding=").append(samlRequestMesssageBinding);
builder.append("::").append("SAMLResponseMessage=");
builder.append(samlResponseMessage).append(":").append("relay state=").append(relayState);
builder.append("Signature=").append(signature).append("::sigAlg=").append(sigAlg);
logger.trace(builder.toString());
}
if (isNotNull(samlRequestMessage)) {
session.removeNote(GeneralConstants.SAML_REQUEST_KEY);
session.removeNote(JBossSAMLConstants.BINDING.get());
}
if (isNotNull(samlResponseMessage)) {
session.removeNote(GeneralConstants.SAML_RESPONSE_KEY);
}
if (isNotNull(relayState)) {
session.removeNote(GeneralConstants.RELAY_STATE);
}
if (isNotNull(signature)) {
session.removeNote(GeneralConstants.SAML_SIGNATURE_REQUEST_KEY);
}
if (isNotNull(sigAlg)) {
session.removeNote(GeneralConstants.SAML_SIG_ALG_REQUEST_KEY);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpSessionNote
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
cleanUpSessionNote
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
private ApplicationInfo generateApplicationInfoFromSettingsLPw(String packageName, int flags,
int userId) {
if (!sUserManager.exists(userId)) return null;
PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps != null) {
if (ps.pkg == null) {
PackageInfo pInfo = generatePackageInfoFromSettingsLPw(packageName,
flags, userId);
if (pInfo != null) {
return pInfo.applicationInfo;
}
return null;
}
return PackageParser.generateApplicationInfo(ps.pkg, flags,
ps.readUserState(userId), userId);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateApplicationInfoFromSettingsLPw
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
|
generateApplicationInfoFromSettingsLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEncryptedPassword()
{
return encryptedPassword;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEncryptedPassword
File: src/main/java/org/projectforge/web/admin/SetupForm.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
getEncryptedPassword
|
src/main/java/org/projectforge/web/admin/SetupForm.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUserData(Account account, String key, String value) {
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setUserData: " + account
+ ", key " + key
+ ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
if (key == null) throw new IllegalArgumentException("key is null");
if (account == null) throw new IllegalArgumentException("account is null");
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format(
"uid %s cannot set user data for accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
if (!accountExistsCache(accounts, account)) {
return;
}
setUserdataInternal(accounts, account, key, value);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserData
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
setUserData
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public final CredentialCreatedListener getCredentialCreatedListener() {
return credentialCreatedListener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCredentialCreatedListener
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
getCredentialCreatedListener
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping({"/embed/ulogin/(*:appId)/(*:userviewId)/(~:key)","/embed/ulogin/(*:appId)/(*:userviewId)","/embed/ulogin/(*:appId)/(*:userviewId)/(*:key)/(*:menuId)"})
public String embedLogin(ModelMap map, HttpServletRequest request, HttpServletResponse response, @RequestParam("appId") String appId, @RequestParam("userviewId") String userviewId, @RequestParam(value = "menuId", required = false) String menuId, @RequestParam(value = "key", required = false) String key, Boolean embed) throws Exception {
if (embed == null) {
embed = true;
}
//check for empty key
if (key != null && key.equals(Userview.USERVIEW_KEY_EMPTY_VALUE)) {
key = null;
}
// validate input
SecurityUtil.validateStringInput(appId);
SecurityUtil.validateStringInput(menuId);
SecurityUtil.validateStringInput(key);
SecurityUtil.validateBooleanInput(embed);
// retrieve app and userview
AppDefinition appDef = appService.getPublishedAppDefinition(appId);
if (appDef == null) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return null;
}
map.addAttribute("appId", appDef.getId());
map.addAttribute("appDefinition", appDef);
map.addAttribute("appVersion", appDef.getVersion());
map.addAttribute("key", key);
map.addAttribute("menuId", menuId);
map.addAttribute("embed", embed);
map.addAttribute("queryString", request.getQueryString());
UserviewDefinition userview = userviewDefinitionDao.loadById(userviewId, appDef);
if (userview != null) {
String json = userview.getJson();
Userview userviewObject = userviewService.createUserview(json, menuId, false, request.getContextPath(), request.getParameterMap(), key, embed);
UserviewThemeProcesser processer = new UserviewThemeProcesser(userviewObject, request);
map.addAttribute("userview", userviewObject);
map.addAttribute("processer", processer);
String view = processer.getLoginView();
if (view != null) {
if (view.startsWith("redirect:")) {
map.clear();
}
return view;
}
}
return "ubuilder/login";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: embedLogin
File: wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
embedLogin
|
wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void deleteRequestHeaders(SQLiteDatabase db, String where, String[] whereArgs) {
String[] projection = new String[] {Downloads.Impl._ID};
Cursor cursor = db.query(DB_TABLE, projection, where, whereArgs, null, null, null, null);
try {
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
long id = cursor.getLong(0);
String idWhere = Downloads.Impl.RequestHeaders.COLUMN_DOWNLOAD_ID + "=" + id;
db.delete(Downloads.Impl.RequestHeaders.HEADERS_DB_TABLE, idWhere, null);
}
} finally {
cursor.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteRequestHeaders
File: src/com/android/providers/downloads/DownloadProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
deleteRequestHeaders
|
src/com/android/providers/downloads/DownloadProvider.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void aliasType(String name, Class type) {
if (classAliasingMapper == null) {
throw new com.thoughtworks.xstream.InitializationException("No "
+ ClassAliasingMapper.class.getName()
+ " available");
}
classAliasingMapper.addTypeAlias(name, type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: aliasType
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
|
aliasType
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public void uninstall() {
SC_HANDLE serviceManager = openServiceControlManager(null, Winsvc.SC_MANAGER_ALL_ACCESS);
if (serviceManager != null) {
SC_HANDLE service = ADVAPI_32.OpenService(serviceManager, serviceName, Winsvc.SERVICE_ALL_ACCESS);
if (service != null) {
ADVAPI_32.DeleteService(service);
ADVAPI_32.CloseServiceHandle(service);
}
ADVAPI_32.CloseServiceHandle(serviceManager);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uninstall
File: src/main/java/org/traccar/WindowsService.java
Repository: traccar
The code follows secure coding practices.
|
[
"CWE-428"
] |
CVE-2021-21292
|
LOW
| 1.9
|
traccar
|
uninstall
|
src/main/java/org/traccar/WindowsService.java
|
cc69a9907ac9878db3750aa14ffedb28626455da
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean equals(Headers<K, V, ?> h2, HashingStrategy<V> valueHashingStrategy) {
if (h2.size() != size()) {
return false;
}
if (this == h2) {
return true;
}
for (K name : names()) {
List<V> otherValues = h2.getAll(name);
List<V> values = getAll(name);
if (otherValues.size() != values.size()) {
return false;
}
for (int i = 0; i < otherValues.size(); i++) {
if (!valueHashingStrategy.equals(otherValues.get(i), values.get(i))) {
return false;
}
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
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
|
equals
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<LogFile> getRollingFileLogs(RollingFileAppender rollingFileAppender) {
final String filePattern = rollingFileAppender.getFilePattern();
final String baseFileName = rollingFileAppender.getFileName();
final ImmutableList.Builder<LogFile> logFiles = ImmutableList.builder();
// The current open uncompressed logfile
buildLogFile("0", baseFileName).ifPresent(logFiles::add);
// TODO support filePatterns with https://logging.apache.org/log4j/2.x/manual/lookups.html#DateLookup
// TODO support filePatterns with SimpleDateFormat
// e.g: filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz"
var regex = f("^%s\\.%%i\\.gz", baseFileName);
if (filePattern.matches(regex)) {
final String formatString = filePattern.replace("%i", "%d");
IntStream.range(1, LOGFILE_ENUMERATION_RANGE).forEach(i -> {
var file = f(formatString, i);
buildLogFile(String.valueOf(i), file).ifPresent(logFiles::add);
});
}
return logFiles.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRollingFileLogs
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
getRollingFileLogs
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
public void saveFollows(String issueId, List<String> follows) {
IssueFollowExample example = new IssueFollowExample();
example.createCriteria().andIssueIdEqualTo(issueId);
issueFollowMapper.deleteByExample(example);
if (!CollectionUtils.isEmpty(follows)) {
for (String follow : follows) {
IssueFollow issueFollow = new IssueFollow();
issueFollow.setIssueId(issueId);
issueFollow.setFollowId(follow);
issueFollowMapper.insert(issueFollow);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveFollows
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
saveFollows
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setShowingLocked(boolean showing, boolean forceCallbacks) {
final boolean aodShowing = mDozing && !mWakeAndUnlocking;
final boolean notifyDefaultDisplayCallbacks = showing != mShowing || forceCallbacks;
final boolean updateActivityLockScreenState = showing != mShowing
|| aodShowing != mAodShowing || forceCallbacks;
mShowing = showing;
mAodShowing = aodShowing;
if (notifyDefaultDisplayCallbacks) {
notifyDefaultDisplayCallbacks(showing);
}
if (updateActivityLockScreenState) {
updateActivityLockScreenState(showing, aodShowing);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShowingLocked
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
|
setShowingLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public TStruct readStructBegin(
Map<Integer, com.facebook.thrift.meta_data.FieldMetaData> metaDataMap) throws TException {
lastField_.push(lastFieldId_);
lastFieldId_ = 0;
return ANONYMOUS_STRUCT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readStructBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readStructBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public void readFromTemplate(EditForm eform, XWikiContext context) throws XWikiException
{
String template = eform.getTemplate();
readFromTemplate(template, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFromTemplate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
readFromTemplate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadUrl(LoadUrlParams params) {
if (mNativeContentViewCore == 0) return;
nativeLoadUrl(mNativeContentViewCore,
params.mUrl,
params.mLoadUrlType,
params.mTransitionType,
params.getReferrer() != null ? params.getReferrer().getUrl() : null,
params.getReferrer() != null ? params.getReferrer().getPolicy() : 0,
params.mUaOverrideOption,
params.getExtraHeadersString(),
params.mPostData,
params.mBaseUrlForDataUrl,
params.mVirtualUrlForDataUrl,
params.mCanLoadLocalResources);
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2014-3159
- Severity: MEDIUM
- CVSS Score: 6.4
Description: Use LoadURLWithParams in ChromeWebContentsDelegateAndroid
Build a LoadURLParams object from the OpenURLParams and properly set all
parameters on that object when calling into NavigationController. This makes
sure we set the correct state for the load.
BUG=352083
Review URL: https://codereview.chromium.org/267253007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273865 0039d316-1c4b-4281-b951-d872f2087c98
Function: loadUrl
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
Fixed Code:
public void loadUrl(LoadUrlParams params) {
if (mNativeContentViewCore == 0) return;
nativeLoadUrl(mNativeContentViewCore,
params.mUrl,
params.mLoadUrlType,
params.mTransitionType,
params.getReferrer() != null ? params.getReferrer().getUrl() : null,
params.getReferrer() != null ? params.getReferrer().getPolicy() : 0,
params.mUaOverrideOption,
params.getExtraHeadersString(),
params.mPostData,
params.mBaseUrlForDataUrl,
params.mVirtualUrlForDataUrl,
params.mCanLoadLocalResources,
params.mIsRendererInitiated);
}
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
loadUrl
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAccept(String ssid) {
log("Accept Root CA cert for " + ssid);
sendMessage(CMD_ACCEPT_EAP_SERVER_CERTIFICATE, ssid);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21242
- Severity: CRITICAL
- CVSS Score: 9.8
Description: [TOFU] Validate full cert chains before displaying dialog
When a full chain including a Root CA is provided by the server,
perform a full validation of the chain before displaying the
TOFU dialog.
If validation passes: Display a TOFU dialog and ask the user if
they trust this network. Saying yes means that the Root can be
installed safely for that network. They might say no - this is
possible if an attacker creates a full chain they control which
results in a different SHA-256 (everything else looks correct).
If they say no, we stop the connection.
If validation fails: Display an error message saying that the
validation failed, we stop the connection and won't display the
TOFU dialog.
Use server certificate pinning for servers that send only a leaf
or a partial chain with no Root CA.
Additionally: clean up the debug logs to reduce the noise and
focus only on the important details.
Bug: 277824547
Test: atest InsecureEapNetworkHandler
Test: Connect to various Enterprise networks
Negative test: Confirm verification fails for invalid chains
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b0ee00ddf38bb677876a6cffb876e6f511e2c139)
Merged-In: I224c80e2787497634d3e68760122dac5f177585a
Change-Id: I224c80e2787497634d3e68760122dac5f177585a
Function: onAccept
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
Fixed Code:
@Override
public void onAccept(String ssid, int networkId) {
log("Accept Root CA cert for " + ssid);
sendMessage(CMD_ACCEPT_EAP_SERVER_CERTIFICATE, networkId);
}
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onAccept
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 1
|
Analyze the following code function for security vulnerabilities
|
private final boolean cleanUpApplicationRecordLocked(ProcessRecord app,
boolean restarting, boolean allowRestart, int index) {
if (index >= 0) {
removeLruProcessLocked(app);
ProcessList.remove(app.pid);
}
mProcessesToGc.remove(app);
mPendingPssProcesses.remove(app);
// Dismiss any open dialogs.
if (app.crashDialog != null && !app.forceCrashReport) {
app.crashDialog.dismiss();
app.crashDialog = null;
}
if (app.anrDialog != null) {
app.anrDialog.dismiss();
app.anrDialog = null;
}
if (app.waitDialog != null) {
app.waitDialog.dismiss();
app.waitDialog = null;
}
app.crashing = false;
app.notResponding = false;
app.resetPackageList(mProcessStats);
app.unlinkDeathRecipient();
app.makeInactive(mProcessStats);
app.waitingToKill = null;
app.forcingToForeground = null;
updateProcessForegroundLocked(app, false, false);
app.foregroundActivities = false;
app.hasShownUi = false;
app.treatLikeActivity = false;
app.hasAboveClient = false;
app.hasClientActivities = false;
mServices.killServicesLocked(app, allowRestart);
boolean restart = false;
// Remove published content providers.
for (int i = app.pubProviders.size() - 1; i >= 0; i--) {
ContentProviderRecord cpr = app.pubProviders.valueAt(i);
final boolean always = app.bad || !allowRestart;
boolean inLaunching = removeDyingProviderLocked(app, cpr, always);
if ((inLaunching || always) && cpr.hasConnectionOrHandle()) {
// We left the provider in the launching list, need to
// restart it.
restart = true;
}
cpr.provider = null;
cpr.proc = null;
}
app.pubProviders.clear();
// Take care of any launching providers waiting for this process.
if (cleanupAppInLaunchingProvidersLocked(app, false)) {
restart = true;
}
// Unregister from connected content providers.
if (!app.conProviders.isEmpty()) {
for (int i = app.conProviders.size() - 1; i >= 0; i--) {
ContentProviderConnection conn = app.conProviders.get(i);
conn.provider.connections.remove(conn);
stopAssociationLocked(app.uid, app.processName, conn.provider.uid,
conn.provider.name);
}
app.conProviders.clear();
}
// At this point there may be remaining entries in mLaunchingProviders
// where we were the only one waiting, so they are no longer of use.
// Look for these and clean up if found.
// XXX Commented out for now. Trying to figure out a way to reproduce
// the actual situation to identify what is actually going on.
if (false) {
for (int i = mLaunchingProviders.size() - 1; i >= 0; i--) {
ContentProviderRecord cpr = mLaunchingProviders.get(i);
if (cpr.connections.size() <= 0 && !cpr.hasExternalProcessHandles()) {
synchronized (cpr) {
cpr.launchingApp = null;
cpr.notifyAll();
}
}
}
}
skipCurrentReceiverLocked(app);
// Unregister any receivers.
for (int i = app.receivers.size() - 1; i >= 0; i--) {
removeReceiverLocked(app.receivers.valueAt(i));
}
app.receivers.clear();
// If the app is undergoing backup, tell the backup manager about it
if (mBackupTarget != null && app.pid == mBackupTarget.app.pid) {
if (DEBUG_BACKUP || DEBUG_CLEANUP) Slog.d(TAG_CLEANUP, "App "
+ mBackupTarget.appInfo + " died during backup");
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
bm.agentDisconnected(app.info.packageName);
} catch (RemoteException e) {
// can't happen; backup manager is local
}
}
for (int i = mPendingProcessChanges.size() - 1; i >= 0; i--) {
ProcessChangeItem item = mPendingProcessChanges.get(i);
if (item.pid == app.pid) {
mPendingProcessChanges.remove(i);
mAvailProcessChanges.add(item);
}
}
mUiHandler.obtainMessage(DISPATCH_PROCESS_DIED_UI_MSG, app.pid, app.info.uid,
null).sendToTarget();
// If the caller is restarting this app, then leave it in its
// current lists and let the caller take care of it.
if (restarting) {
return false;
}
if (!app.persistent || app.isolated) {
if (DEBUG_PROCESSES || DEBUG_CLEANUP) Slog.v(TAG_CLEANUP,
"Removing non-persistent process during cleanup: " + app);
removeProcessNameLocked(app.processName, app.uid);
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
} else if (!app.removed) {
// This app is persistent, so we need to keep its record around.
// If it is not already on the pending app list, add it there
// and start a new process for it.
if (mPersistentStartingProcesses.indexOf(app) < 0) {
mPersistentStartingProcesses.add(app);
restart = true;
}
}
if ((DEBUG_PROCESSES || DEBUG_CLEANUP) && mProcessesOnHold.contains(app)) Slog.v(
TAG_CLEANUP, "Clean-up removing on hold: " + app);
mProcessesOnHold.remove(app);
if (app == mHomeProcess) {
mHomeProcess = null;
}
if (app == mPreviousProcess) {
mPreviousProcess = null;
}
if (restart && !app.isolated) {
// We have components that still need to be running in the
// process, so re-launch it.
if (index < 0) {
ProcessList.remove(app.pid);
}
addProcessNameLocked(app);
startProcessLocked(app, "restart", app.processName);
return true;
} else if (app.pid > 0 && app.pid != MY_PID) {
// Goodbye!
boolean removed;
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(app.pid);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
}
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
}
app.setPid(0);
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3912
- Severity: HIGH
- CVSS Score: 9.3
Description: DO NOT MERGE: Clean up when recycling a pid with a pending launch
Fix for accidental launch of a broadcast receiver in an
incorrect app instance.
Bug: 30202481
Change-Id: I8ec8f19c633f3aec8da084dab5fd5b312443336f
(cherry picked from commit 55eacb944122ddc0a3bb693b36fe0f07b0fe18c9)
Function: cleanUpApplicationRecordLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
Fixed Code:
private final boolean cleanUpApplicationRecordLocked(ProcessRecord app,
boolean restarting, boolean allowRestart, int index, boolean replacingPid) {
Slog.d(TAG, "cleanUpApplicationRecord -- " + app.pid);
if (index >= 0) {
removeLruProcessLocked(app);
ProcessList.remove(app.pid);
}
mProcessesToGc.remove(app);
mPendingPssProcesses.remove(app);
// Dismiss any open dialogs.
if (app.crashDialog != null && !app.forceCrashReport) {
app.crashDialog.dismiss();
app.crashDialog = null;
}
if (app.anrDialog != null) {
app.anrDialog.dismiss();
app.anrDialog = null;
}
if (app.waitDialog != null) {
app.waitDialog.dismiss();
app.waitDialog = null;
}
app.crashing = false;
app.notResponding = false;
app.resetPackageList(mProcessStats);
app.unlinkDeathRecipient();
app.makeInactive(mProcessStats);
app.waitingToKill = null;
app.forcingToForeground = null;
updateProcessForegroundLocked(app, false, false);
app.foregroundActivities = false;
app.hasShownUi = false;
app.treatLikeActivity = false;
app.hasAboveClient = false;
app.hasClientActivities = false;
mServices.killServicesLocked(app, allowRestart);
boolean restart = false;
// Remove published content providers.
for (int i = app.pubProviders.size() - 1; i >= 0; i--) {
ContentProviderRecord cpr = app.pubProviders.valueAt(i);
final boolean always = app.bad || !allowRestart;
boolean inLaunching = removeDyingProviderLocked(app, cpr, always);
if ((inLaunching || always) && cpr.hasConnectionOrHandle()) {
// We left the provider in the launching list, need to
// restart it.
restart = true;
}
cpr.provider = null;
cpr.proc = null;
}
app.pubProviders.clear();
// Take care of any launching providers waiting for this process.
if (cleanupAppInLaunchingProvidersLocked(app, false)) {
restart = true;
}
// Unregister from connected content providers.
if (!app.conProviders.isEmpty()) {
for (int i = app.conProviders.size() - 1; i >= 0; i--) {
ContentProviderConnection conn = app.conProviders.get(i);
conn.provider.connections.remove(conn);
stopAssociationLocked(app.uid, app.processName, conn.provider.uid,
conn.provider.name);
}
app.conProviders.clear();
}
// At this point there may be remaining entries in mLaunchingProviders
// where we were the only one waiting, so they are no longer of use.
// Look for these and clean up if found.
// XXX Commented out for now. Trying to figure out a way to reproduce
// the actual situation to identify what is actually going on.
if (false) {
for (int i = mLaunchingProviders.size() - 1; i >= 0; i--) {
ContentProviderRecord cpr = mLaunchingProviders.get(i);
if (cpr.connections.size() <= 0 && !cpr.hasExternalProcessHandles()) {
synchronized (cpr) {
cpr.launchingApp = null;
cpr.notifyAll();
}
}
}
}
skipCurrentReceiverLocked(app);
// Unregister any receivers.
for (int i = app.receivers.size() - 1; i >= 0; i--) {
removeReceiverLocked(app.receivers.valueAt(i));
}
app.receivers.clear();
// If the app is undergoing backup, tell the backup manager about it
if (mBackupTarget != null && app.pid == mBackupTarget.app.pid) {
if (DEBUG_BACKUP || DEBUG_CLEANUP) Slog.d(TAG_CLEANUP, "App "
+ mBackupTarget.appInfo + " died during backup");
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
bm.agentDisconnected(app.info.packageName);
} catch (RemoteException e) {
// can't happen; backup manager is local
}
}
for (int i = mPendingProcessChanges.size() - 1; i >= 0; i--) {
ProcessChangeItem item = mPendingProcessChanges.get(i);
if (item.pid == app.pid) {
mPendingProcessChanges.remove(i);
mAvailProcessChanges.add(item);
}
}
mUiHandler.obtainMessage(DISPATCH_PROCESS_DIED_UI_MSG, app.pid, app.info.uid,
null).sendToTarget();
// If the caller is restarting this app, then leave it in its
// current lists and let the caller take care of it.
if (restarting) {
return false;
}
if (!app.persistent || app.isolated) {
if (DEBUG_PROCESSES || DEBUG_CLEANUP) Slog.v(TAG_CLEANUP,
"Removing non-persistent process during cleanup: " + app);
if (!replacingPid) {
removeProcessNameLocked(app.processName, app.uid);
}
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
} else if (!app.removed) {
// This app is persistent, so we need to keep its record around.
// If it is not already on the pending app list, add it there
// and start a new process for it.
if (mPersistentStartingProcesses.indexOf(app) < 0) {
mPersistentStartingProcesses.add(app);
restart = true;
}
}
if ((DEBUG_PROCESSES || DEBUG_CLEANUP) && mProcessesOnHold.contains(app)) Slog.v(
TAG_CLEANUP, "Clean-up removing on hold: " + app);
mProcessesOnHold.remove(app);
if (app == mHomeProcess) {
mHomeProcess = null;
}
if (app == mPreviousProcess) {
mPreviousProcess = null;
}
if (restart && !app.isolated) {
// We have components that still need to be running in the
// process, so re-launch it.
if (index < 0) {
ProcessList.remove(app.pid);
}
addProcessNameLocked(app);
startProcessLocked(app, "restart", app.processName);
return true;
} else if (app.pid > 0 && app.pid != MY_PID) {
// Goodbye!
boolean removed;
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(app.pid);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
}
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
}
app.setPid(0);
}
return false;
}
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
cleanUpApplicationRecordLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean isLaunchSourceType(@LaunchSourceType int type) {
return mLaunchSourceType == type;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLaunchSourceType
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
|
isLaunchSourceType
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeHeaders(final String iContentType) throws IOException {
writeHeaders(iContentType, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeHeaders
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
writeHeaders
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean allJarsSigned() {
return this.unverifiedJars.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allJarsSigned
File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
allJarsSigned
|
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
|
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeLogStart() {
if (!SecurityLog.isLoggingEnabled()) {
return;
}
final String verifiedBootState =
mInjector.systemPropertiesGet("ro.boot.verifiedbootstate");
final String verityMode = mInjector.systemPropertiesGet("ro.boot.veritymode");
SecurityLog.writeEvent(SecurityLog.TAG_OS_STARTUP, verifiedBootState, verityMode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeLogStart
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
|
maybeLogStart
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition isNull() {
Condition conditionLocal = new IsNullCondition(selector);
return getOnGoingLogicalCondition(conditionLocal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNull
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
isNull
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void mergeCustomField(IssuesWithBLOBs issues, String defaultCustomField) {
if (StringUtils.isNotBlank(defaultCustomField)) {
List<CustomFieldItemDTO> customFields = extIssuesMapper.getIssueCustomField(issues.getId());
Map<String, CustomFieldItemDTO> fieldMap = customFields.stream()
.collect(Collectors.toMap(CustomFieldItemDTO::getId, i -> i));
List<CustomFieldItemDTO> defaultFields = JSON.parseArray(defaultCustomField, CustomFieldItemDTO.class);
for (CustomFieldItemDTO defaultField : defaultFields) {
String id = defaultField.getId();
if (StringUtils.isBlank(id)) {
defaultField.setId(defaultField.getKey());
}
if (fieldMap.keySet().contains(id)) {
// 设置第三方平台的属性名称
fieldMap.get(id).setCustomData(defaultField.getCustomData());
} else {
// 如果自定义字段里没有模板新加的字段,就把新字段加上
customFields.add(defaultField);
}
}
// 过滤没有配置第三方字段名称的字段,不需要更新
customFields = customFields.stream()
.filter(i -> StringUtils.isNotBlank(i.getCustomData()))
.collect(Collectors.toList());
issues.setCustomFields(JSON.toJSONString(customFields));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mergeCustomField
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
mergeCustomField
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
// Saved so we don't force user to re-enter their password if configuration changes
outState.putBoolean(PASSWORD_CONFIRMED, mPasswordConfirmed);
outState.putBoolean(WAITING_FOR_CONFIRMATION, mWaitingForConfirmation);
outState.putInt(ENCRYPT_REQUESTED_QUALITY, mEncryptionRequestQuality);
outState.putBoolean(ENCRYPT_REQUESTED_DISABLED, mEncryptionRequestDisabled);
if (mUserPassword != null) {
outState.putString(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, mUserPassword);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSaveInstanceState
File: src/com/android/settings/password/ChooseLockGeneric.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
onSaveInstanceState
|
src/com/android/settings/password/ChooseLockGeneric.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setPermission(Context c, Group g, int actionID, Bitstream bs)
throws SQLException, AuthorizeException
{
if (!isTest)
{
// remove the default policy
AuthorizeManager.removeAllPolicies(c, bs);
// add the policy
ResourcePolicy rp = ResourcePolicy.create(c);
rp.setResource(bs);
rp.setAction(actionID);
rp.setGroup(g);
rp.update();
}
else
{
if (actionID == Constants.READ)
{
System.out.println("\t\tpermissions: READ for " + g.getName());
}
else if (actionID == Constants.WRITE)
{
System.out.println("\t\tpermissions: WRITE for " + g.getName());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPermission
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
setPermission
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityStarter setCallingPid(int pid) {
mRequest.callingPid = pid;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCallingPid
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
|
setCallingPid
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isUidProfileOwnerLocked(int appUid) {
ensureLocked();
final int userId = UserHandle.getUserId(appUid);
final ComponentName profileOwnerComponent = mOwners.getProfileOwnerComponent(userId);
if (profileOwnerComponent == null) {
return false;
}
for (ActiveAdmin admin : getUserData(userId).mAdminList) {
final ComponentName currentAdminComponent = admin.info.getComponent();
if (admin.getUid() == appUid && profileOwnerComponent.equals(currentAdminComponent)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUidProfileOwnerLocked
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
|
isUidProfileOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteHost() {
try {
sService.deleteHost(mContextOpPackageName, mHostId);
}
catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteHost
File: core/java/android/appwidget/AppWidgetHost.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
deleteHost
|
core/java/android/appwidget/AppWidgetHost.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public void bind(int index, long value) {
mPreparedStatement.bindLong(index, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bind
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
bind
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void answerVideo(String callId, int videoState,
Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: answerVideo
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
answerVideo
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getReindexThreadCount() {
return myReindexThreadCount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReindexThreadCount
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
getReindexThreadCount
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectDeserializer get(Type type) {
Type mixin = JSON.getMixInAnnotations(type);
if (null == mixin) {
return this.deserializers.get(type);
}
IdentityHashMap<Type, ObjectDeserializer> mixInClasses = this.mixInDeserializers.get(type);
if (mixInClasses == null) {
return null;
}
return mixInClasses.get(mixin);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
get
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> T unmarshal(final Class<T> clazz, final Reader reader) {
return unmarshal(clazz, reader, VALIDATE_IF_POSSIBLE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-0871
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
unmarshal
|
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
|
3c17231714e3d55809efc580a05734ed530f9ad4
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.