instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public AuthenticationResponse parseResponse(String encodedResponse, boolean verifySignature, KeySelector keySelector)
throws SAMLException {
AuthenticationResponse response = new AuthenticationResponse();
byte[] decodedResponse = Base64.getMimeDecoder().decode(encodedResponse);
response.rawResponse = new String(decodedResponse, StandardCharsets.UTF_8);
Document document = parseFromBytes(decodedResponse);
if (verifySignature) {
verifySignature(document, keySelector);
}
ResponseType jaxbResponse = unmarshallFromDocument(document, ResponseType.class);
response.status.code = ResponseStatus.fromSAMLFormat(jaxbResponse.getStatus().getStatusCode().getValue());
response.id = jaxbResponse.getID();
response.inResponseTo = jaxbResponse.getInResponseTo();
response.issuer = jaxbResponse.getIssuer() != null ? jaxbResponse.getIssuer().getValue() : null;
response.issueInstant = toZonedDateTime(jaxbResponse.getIssueInstant());
response.destination = jaxbResponse.getDestination();
response.version = jaxbResponse.getVersion();
List<Object> assertions = jaxbResponse.getAssertionOrEncryptedAssertion();
for (Object assertion : assertions) {
if (assertion instanceof EncryptedElementType) {
logger.warn("SAML response contained encrypted attribute. It was ignored.");
continue;
}
AssertionType assertionType = (AssertionType) assertion;
// Handle the subject
SubjectType subject = assertionType.getSubject();
if (subject != null) {
response.assertion.subject = new Subject();
List<JAXBElement<?>> elements = subject.getContent();
for (JAXBElement<?> element : elements) {
Class<?> type = element.getDeclaredType();
if (type == NameIDType.class) {
if (response.assertion.subject.nameID != null) {
logger.warn("SAML response contained multiple NameID elements. Only the first one was used.");
continue;
}
// Extract the name
response.assertion.subject.nameID = parseNameId((NameIDType) element.getValue());
} else if (type == SubjectConfirmationType.class) {
// Extract the confirmation
response.assertion.subject.subjectConfirmation = parseConfirmation((SubjectConfirmationType) element.getValue());
} else if (type == EncryptedElementType.class) {
throw new SAMLException("This library currently doesn't handle encrypted assertions");
}
}
}
// Handle conditions to pull out audience restriction
ConditionsType conditionsType = assertionType.getConditions();
if (conditionsType != null) {
response.assertion.conditions = new Conditions();
response.assertion.conditions.notBefore = convertToZonedDateTime(conditionsType.getNotBefore());
response.assertion.conditions.notOnOrAfter = convertToZonedDateTime(conditionsType.getNotOnOrAfter());
List<ConditionAbstractType> conditionAbstractTypes = conditionsType.getConditionOrAudienceRestrictionOrOneTimeUse();
// Only handling the AudienceRestriction.
// - Optional additional conditions include OneTimeUse and ProxyRestriction. See section 2.5.1 in the SAML v2 core spec,
// the way these additional conditions are described, I see no use for them.
// - OneTimeUse specifics are in section 2.5.1.5
// - ProxyRestriction specifics are in section 2.6.1.6
// http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf
for (ConditionAbstractType conditionAbstractType : conditionAbstractTypes) {
if (conditionAbstractType instanceof AudienceRestrictionType) {
AudienceRestrictionType restrictionType = (AudienceRestrictionType) conditionAbstractType;
response.assertion.conditions.audiences.addAll(restrictionType.getAudience());
}
}
}
// Handle the attributes
List<StatementAbstractType> statements = assertionType.getStatementOrAuthnStatementOrAuthzDecisionStatement();
for (StatementAbstractType statement : statements) {
if (statement instanceof AttributeStatementType) {
AttributeStatementType attributeStatementType = (AttributeStatementType) statement;
List<Object> attributeObjects = attributeStatementType.getAttributeOrEncryptedAttribute();
for (Object attributeObject : attributeObjects) {
if (attributeObject instanceof AttributeType) {
AttributeType attributeType = (AttributeType) attributeObject;
String name = attributeType.getName();
List<Object> attributeValues = attributeType.getAttributeValue();
List<String> values = attributeValues.stream().map(this::attributeToString).collect(Collectors.toList());
response.assertion.attributes.computeIfAbsent(name, k -> new ArrayList<>()).addAll(values);
} else {
throw new SAMLException("This library currently doesn't support encrypted attributes");
}
}
}
}
}
return response;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-27736
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Refactor utility methods into SAMLTools, add tests.
Function: parseResponse
File: src/main/java/io/fusionauth/samlv2/service/DefaultSAMLv2Service.java
Repository: FusionAuth/fusionauth-samlv2
Fixed Code:
@Override
public AuthenticationResponse parseResponse(String encodedResponse, boolean verifySignature, KeySelector keySelector)
throws SAMLException {
AuthenticationResponse response = new AuthenticationResponse();
byte[] decodedResponse = Base64.getMimeDecoder().decode(encodedResponse);
response.rawResponse = new String(decodedResponse, StandardCharsets.UTF_8);
Document document = newDocumentFromBytes(decodedResponse);
if (verifySignature) {
verifySignature(document, keySelector);
}
ResponseType jaxbResponse = unmarshallFromDocument(document, ResponseType.class);
response.status.code = ResponseStatus.fromSAMLFormat(jaxbResponse.getStatus().getStatusCode().getValue());
response.id = jaxbResponse.getID();
response.inResponseTo = jaxbResponse.getInResponseTo();
response.issuer = jaxbResponse.getIssuer() != null ? jaxbResponse.getIssuer().getValue() : null;
response.issueInstant = toZonedDateTime(jaxbResponse.getIssueInstant());
response.destination = jaxbResponse.getDestination();
response.version = jaxbResponse.getVersion();
List<Object> assertions = jaxbResponse.getAssertionOrEncryptedAssertion();
for (Object assertion : assertions) {
if (assertion instanceof EncryptedElementType) {
logger.warn("SAML response contained encrypted attribute. It was ignored.");
continue;
}
AssertionType assertionType = (AssertionType) assertion;
// Handle the subject
SubjectType subject = assertionType.getSubject();
if (subject != null) {
response.assertion.subject = new Subject();
List<JAXBElement<?>> elements = subject.getContent();
for (JAXBElement<?> element : elements) {
Class<?> type = element.getDeclaredType();
if (type == NameIDType.class) {
if (response.assertion.subject.nameID != null) {
logger.warn("SAML response contained multiple NameID elements. Only the first one was used.");
continue;
}
// Extract the name
response.assertion.subject.nameID = parseNameId((NameIDType) element.getValue());
} else if (type == SubjectConfirmationType.class) {
// Extract the confirmation
response.assertion.subject.subjectConfirmation = parseConfirmation((SubjectConfirmationType) element.getValue());
} else if (type == EncryptedElementType.class) {
throw new SAMLException("This library currently doesn't handle encrypted assertions");
}
}
}
// Handle conditions to pull out audience restriction
ConditionsType conditionsType = assertionType.getConditions();
if (conditionsType != null) {
response.assertion.conditions = new Conditions();
response.assertion.conditions.notBefore = convertToZonedDateTime(conditionsType.getNotBefore());
response.assertion.conditions.notOnOrAfter = convertToZonedDateTime(conditionsType.getNotOnOrAfter());
List<ConditionAbstractType> conditionAbstractTypes = conditionsType.getConditionOrAudienceRestrictionOrOneTimeUse();
// Only handling the AudienceRestriction.
// - Optional additional conditions include OneTimeUse and ProxyRestriction. See section 2.5.1 in the SAML v2 core spec,
// the way these additional conditions are described, I see no use for them.
// - OneTimeUse specifics are in section 2.5.1.5
// - ProxyRestriction specifics are in section 2.6.1.6
// http://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf
for (ConditionAbstractType conditionAbstractType : conditionAbstractTypes) {
if (conditionAbstractType instanceof AudienceRestrictionType) {
AudienceRestrictionType restrictionType = (AudienceRestrictionType) conditionAbstractType;
response.assertion.conditions.audiences.addAll(restrictionType.getAudience());
}
}
}
// Handle the attributes
List<StatementAbstractType> statements = assertionType.getStatementOrAuthnStatementOrAuthzDecisionStatement();
for (StatementAbstractType statement : statements) {
if (statement instanceof AttributeStatementType) {
AttributeStatementType attributeStatementType = (AttributeStatementType) statement;
List<Object> attributeObjects = attributeStatementType.getAttributeOrEncryptedAttribute();
for (Object attributeObject : attributeObjects) {
if (attributeObject instanceof AttributeType) {
AttributeType attributeType = (AttributeType) attributeObject;
String name = attributeType.getName();
List<Object> attributeValues = attributeType.getAttributeValue();
List<String> values = attributeValues.stream().map(SAMLTools::attributeToString).collect(Collectors.toList());
response.assertion.attributes.computeIfAbsent(name, k -> new ArrayList<>()).addAll(values);
} else {
throw new SAMLException("This library currently doesn't support encrypted attributes");
}
}
}
}
}
return response;
}
|
[
"CWE-611"
] |
CVE-2021-27736
|
MEDIUM
| 4
|
FusionAuth/fusionauth-samlv2
|
parseResponse
|
src/main/java/io/fusionauth/samlv2/service/DefaultSAMLv2Service.java
|
c66fb689d50010662f705d5b585c6388ce555dbd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Test
public void saveBatchX(TestContext context) {
List<Object> list = Collections.singletonList(xPojo);
postgresClient = createFoo(context);
postgresClient.saveBatch(FOO, list, context.asyncAssertSuccess(save -> {
String id = save.getResults().get(0).getString(0);
postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> {
context.assertEquals("x", get.getString("key"));
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveBatchX
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
saveBatchX
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void execJSUnsafe(final AndroidBrowserComponent bc, final String javaScript, final ValueCallback<String> resultCallback) {
if (useEvaluateJavascript()) {
try {
bc.web.evaluateJavascript(javaScript, resultCallback);
} catch (Throwable t) {
com.codename1.io.Log.e(t);
resultCallback.onReceiveValue(null);
}
} else {
jsCallbackIndex = (++jsCallbackIndex) % 1024;
int index = jsCallbackIndex;
// The jsCallback is a special java object exposed to javascript that we use
// to return values from javascript to java.
synchronized (bc.jsCallback){
// Initialize the return value to null
while (!bc.jsCallback.isIndexAvailable(index)) {
index++;
}
jsCallbackIndex = index+1;
}
final int fIndex = index;
// We are placing the javascript inside eval() so we need to escape
// the input.
String escaped = StringUtil.replaceAll(javaScript, "\\", "\\\\");
escaped = StringUtil.replaceAll(escaped, "'", "\\'");
final String js = "javascript:(function(){"
+ "try{"
+bc.jsCallback.jsInit()
+bc.jsCallback.jsCleanup()
+ AndroidBrowserComponentCallback.JS_RETURNVAL_VARNAME+"["+index+"]"
+ "=eval('"+escaped +"');} catch (e){console.log(e)};"
+ AndroidBrowserComponentCallback.JS_VAR_NAME+".addReturnValue(" + index+", ''+"
+ AndroidBrowserComponentCallback.JS_RETURNVAL_VARNAME+"["+index+"]"
+ ");})()";
// Send the Javascript string via SetURL.
// NOTE!! This is sent asynchronously so we will need to wait for
// the result to come in.
bc.setURL(js, null);
if (resultCallback == null) {
return;
}
Thread t = new Thread(new Runnable() {
public void run() {
int maxTries = 500;
int tryCounter = 0;
// If we are not on the EDT, then it is safe to just loop and wait.
while (!bc.jsCallback.isValueSet(fIndex) && tryCounter++ < maxTries) {
synchronized(bc.jsCallback){
Util.wait(bc.jsCallback, 20);
}
}
if (bc.jsCallback.isValueSet(fIndex)) {
String retval = bc.jsCallback.getReturnValue(fIndex);
bc.jsCallback.remove(fIndex);
resultCallback.onReceiveValue(retval != null ? JSONObject.quote(retval) : null);
} else {
com.codename1.io.Log.e(new RuntimeException("Failed to execute javascript "+js+" after maximum wait time."));
resultCallback.onReceiveValue(null);
}
}
});
t.start();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execJSUnsafe
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
|
execJSUnsafe
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateConfiguration(Configuration values) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConfiguration
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
updateConfiguration
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsInt02Nanoseconds() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 0);
Instant value = MAPPER.readerFor(Instant.class)
.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue("123456789");
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsInt02Nanoseconds
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsInt02Nanoseconds
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<Act> historicList(Page<Act> page, Act act){
String userId = UserUtils.getUser().getLoginName();//ObjectUtils.toString(UserUtils.getUser().getId());
HistoricTaskInstanceQuery histTaskQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(userId).finished()
.includeProcessVariables().orderByHistoricTaskInstanceEndTime().desc();
// 设置查询条件
if (StringUtils.isNotBlank(act.getProcDefKey())){
histTaskQuery.processDefinitionKey(act.getProcDefKey());
}
if (act.getBeginDate() != null){
histTaskQuery.taskCompletedAfter(act.getBeginDate());
}
if (act.getEndDate() != null){
histTaskQuery.taskCompletedBefore(act.getEndDate());
}
// 查询总数
page.setCount(histTaskQuery.count());
// 查询列表
List<HistoricTaskInstance> histList = histTaskQuery.listPage(page.getFirstResult(), page.getMaxResults());
//处理分页问题
List<Act> actList=Lists.newArrayList();
for (HistoricTaskInstance histTask : histList) {
Act e = new Act();
e.setHistTask(histTask);
e.setVars(histTask.getProcessVariables());
// e.setTaskVars(histTask.getTaskLocalVariables());
// System.out.println(histTask.getId()+" = "+histTask.getProcessVariables() + " ========== " + histTask.getTaskLocalVariables());
e.setProcDef(ProcessDefCache.get(histTask.getProcessDefinitionId()));
// e.setProcIns(runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult());
// e.setProcExecUrl(ActUtils.getProcExeUrl(task.getProcessDefinitionId()));
e.setStatus("finish");
actList.add(e);
//page.getList().add(e);
}
page.setList(actList);
return page;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: historicList
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
historicList
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected XMLReader createReader() throws SAXException {
SAXParser parser;
try {
parser = PARSER_FACTORY.newSAXParser();
} catch (final ParserConfigurationException e) {
throw ProcessException.wrap(e);
}
return parser.getXMLReader();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createReader
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
createReader
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDestination(String function, UserNotificationSessionController nuSC,
HttpRequest request) {
String destination;
try {
request.setCharacterEncoding("UTF-8");
if (function.startsWith(MAIN_FUNCTION)) {
final NotificationContext context = getNotificationContext(request);
UserNotification notification = nuSC.prepareNotification(context);
final String title = notification.getNotificationMetaData().getTitle(nuSC.getLanguage());
request.setAttribute(MESSAGE_TITLE, title);
String recipientUsers = request.getParameter(RECIPIENT_USERS);
String recipientGroups = request.getParameter(RECIPIENT_GROUPS);
if (recipientUsers != null || recipientGroups != null) {
request.setAttribute(RECIPIENT_USERS, nuSC.getUsersFrom(recipientUsers));
request.setAttribute(RECIPIENT_GROUPS, nuSC.getGroupsFrom(recipientGroups));
}
request.setAttribute(NotificationContext.COMPONENT_ID, context.getComponentId());
request.setAttribute(NotificationContext.RESOURCE_ID, context.getResourceId());
final String param = request.getParameter(RECIPIENT_EDITION_PARAM);
final boolean areRecipientsEditable;
if (StringUtil.isDefined(param)) {
areRecipientsEditable = StringUtil.getBooleanValue(param);
} else {
areRecipientsEditable = true;
}
SettingBundle settings = ResourceLocator
.getSettingBundle("org.silverpeas.notificationManager.settings.notificationManagerSettings");
request.setAttribute(SIMPLE_DETAILS_PARAM, settings.getInteger("notif.manual.ui.simpleDetails.whenRecipientTotalExceed", 15));
request.setAttribute(RECIPIENT_EDITION_PARAM, areRecipientsEditable);
destination = "/userNotification/jsp/notificationSender.jsp";
} else if (SENDING_FUNCTION.equals(function)) {
final NotificationContext context = getNotificationContext(request);
nuSC.sendNotification(context);
nuSC.clearNotification();
destination = "/peasCore/jsp/close.jsp";
} else if (RELEASE_FUNCTION.equals(function)) {
nuSC.clearNotification();
destination = "/peasCore/jsp/close.jsp";
} else {
destination = "/userNotification/jsp/" + function;
}
} catch (Exception e) {
request.setAttribute("javax.servlet.jsp.jspException", e);
destination = "/admin/jsp/errorpageMain.jsp";
}
return destination;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDestination
File: core-war/src/main/java/org/silverpeas/web/notificationuser/servlets/UserNotificationRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getDestination
|
core-war/src/main/java/org/silverpeas/web/notificationuser/servlets/UserNotificationRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isCsrfTokenValid(VaadinSession session,
String requestToken) {
if (session.getService().getDeploymentConfiguration()
.isXsrfProtectionEnabled()) {
String sessionToken = session.getCsrfToken();
if (sessionToken == null || !MessageDigest.isEqual(
sessionToken.getBytes(StandardCharsets.UTF_8),
requestToken.getBytes(StandardCharsets.UTF_8))) {
return false;
}
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-203
- CVE: CVE-2021-31403
- Severity: LOW
- CVSS Score: 1.9
Description: Alternate way of defining UTF-8
Function: isCsrfTokenValid
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
Fixed Code:
public static boolean isCsrfTokenValid(VaadinSession session,
String requestToken) {
if (session.getService().getDeploymentConfiguration()
.isXsrfProtectionEnabled()) {
String sessionToken = session.getCsrfToken();
try {
if (sessionToken == null || !MessageDigest.isEqual(
sessionToken.getBytes("UTF-8"),
requestToken.getBytes("UTF-8"))) {
return false;
}
} catch (UnsupportedEncodingException e) {
getLogger().log(Level.WARNING,
"Session token was not UTF-8, this should never happen.");
return false;
}
}
return true;
}
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
isCsrfTokenValid
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
79b37b8ea2bcb4718237821773959dcfbccf31e2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: perform
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
perform
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getStartY() {
return mStartY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStartY
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getStartY
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public Result verify() throws IOException, ApkFormatException, NoSuchAlgorithmException,
IllegalStateException {
Closeable in = null;
try {
DataSource apk;
if (mApkDataSource != null) {
apk = mApkDataSource;
} else if (mApkFile != null) {
RandomAccessFile f = new RandomAccessFile(mApkFile, "r");
in = f;
apk = DataSources.asDataSource(f, 0, f.length());
} else {
throw new IllegalStateException("APK not provided");
}
return verify(apk);
} finally {
if (in != null) {
in.close();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verify
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verify
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isPackageTestOnly(String packageName, int userHandle) {
final ApplicationInfo ai;
try {
ai = mInjector.getIPackageManager().getApplicationInfo(packageName,
(PackageManager.MATCH_DIRECT_BOOT_AWARE
| PackageManager.MATCH_DIRECT_BOOT_UNAWARE), userHandle);
} catch (RemoteException e) {
throw new IllegalStateException(e);
}
if (ai == null) {
throw new IllegalStateException("Couldn't find package: "
+ packageName + " on user " + userHandle);
}
return (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageTestOnly
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
|
isPackageTestOnly
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder data(String data);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: data
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
data
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLine( String line )
{
if ( line == null )
{
return;
}
try
{
parts = CommandLineUtils.translateCommandline( line );
}
catch ( Exception e )
{
System.err.println( "Error translating Commandline." );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLine
File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
setLine
|
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initChangeListeners() {
// Make sure we only add text changed listeners once!
clearChangeListeners();
mSubject.addTextChangedListener(this);
mBodyView.addTextChangedListener(this);
if (mToListener == null) {
mToListener = new RecipientTextWatcher(mTo, this);
}
mTo.addTextChangedListener(mToListener);
if (mCcListener == null) {
mCcListener = new RecipientTextWatcher(mCc, this);
}
mCc.addTextChangedListener(mCcListener);
if (mBccListener == null) {
mBccListener = new RecipientTextWatcher(mBcc, this);
}
mBcc.addTextChangedListener(mBccListener);
mFromSpinner.setOnAccountChangedListener(this);
mAttachmentsView.setAttachmentChangesListener(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initChangeListeners
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
|
initChangeListeners
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, String> readMapFile(String filename) throws Exception
{
Map<String, String> myHash = new HashMap<>();
BufferedReader is = null;
try
{
is = new BufferedReader(new FileReader(filename));
String line;
while ((line = is.readLine()) != null)
{
String myFile;
String myHandle;
// a line should be archive filename<whitespace>handle
StringTokenizer st = new StringTokenizer(line);
if (st.hasMoreTokens())
{
myFile = st.nextToken();
}
else
{
throw new Exception("Bad mapfile line:\n" + line);
}
if (st.hasMoreTokens())
{
myHandle = st.nextToken();
}
else
{
throw new Exception("Bad mapfile line:\n" + line);
}
myHash.put(myFile, myHandle);
}
}
finally
{
if (is != null)
{
is.close();
}
}
return myHash;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readMapFile
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
readMapFile
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isMacRandomizationForceDisabledOnSsid(WifiConfiguration config) {
Set<String> unsupportedSsids = new ArraySet<>(mContext.getResources().getStringArray(
R.array.config_wifiForceDisableMacRandomizationSsidList));
return unsupportedSsids.contains(config.SSID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMacRandomizationForceDisabledOnSsid
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
|
isMacRandomizationForceDisabledOnSsid
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull String getSplitPermission() {
return mSplitPermissionInfoParcelable.getSplitPermission();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSplitPermission
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getSplitPermission
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean shouldShadedLibraryIdBePatched(String packagePrefix) {
return TRY_TO_PATCH_SHADED_ID && PlatformDependent.isOsx() && !packagePrefix.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldShadedLibraryIdBePatched
File: common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-378",
"CWE-379"
] |
CVE-2021-21290
|
LOW
| 1.9
|
netty
|
shouldShadedLibraryIdBePatched
|
common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java
|
c735357bf29d07856ad171c6611a2e1a0e0000ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public Locale getInterfaceLocalePreference()
{
return this.xwiki.getInterfaceLocalePreference(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInterfaceLocalePreference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getInterfaceLocalePreference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean injectHasUnlimitedShortcutsApiCallsPermission(int callingPid, int callingUid) {
return mContext.checkPermission(permission.UNLIMITED_SHORTCUTS_API_CALLS,
callingPid, callingUid) == PackageManager.PERMISSION_GRANTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectHasUnlimitedShortcutsApiCallsPermission
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
injectHasUnlimitedShortcutsApiCallsPermission
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private int fractionCount() {
return -getLowerDisplayMagnitude();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fractionCount
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
|
fractionCount
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public Issue getIssue() {
return mIssue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIssue
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getIssue
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
public char next() {
if (more()) {
char c = this.mySource.charAt(this.myIndex);
this.myIndex += 1;
return c;
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: next
File: src/main/java/org/codehaus/jettison/json/JSONTokener.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
next
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition trace(final String path, final Route.Filter filter) {
return appendDefinition(TRACE, path, filter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trace
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
trace
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DynamicForm withLang(Lang lang) {
return new DynamicForm(
super.rawData(),
super.files(),
this.errors(),
this.value(),
this.messagesApi,
this.formatters,
this.validatorFactory,
this.config,
lang);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withLang
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
withLang
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String handlePwaOfflinePage(Map<String, Object> data) {
return UserviewUtil.getTemplate(this, data, "/templates/userview/pwaOffline.ftl");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePwaOfflinePage
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
handlePwaOfflinePage
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onFullCloseMessage(final WebSocketChannel channel, final BufferedBinaryMessage message) {
if(session.isSessionClosed()) {
//we have already handled this when we sent the close frame
message.getData().free();
return;
}
final Pooled<ByteBuffer[]> pooled = message.getData();
final ByteBuffer singleBuffer = toBuffer(pooled.getResource());
final ByteBuffer toSend = singleBuffer.duplicate();
//send the close immediatly
WebSockets.sendClose(toSend, channel, null);
session.getContainer().invokeEndpointMethod(executor, new Runnable() {
@Override
public void run() {
try {
if (singleBuffer.remaining() > 1) {
final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
session.closeInternal(new CloseReason(code, reasonPhrase));
} else {
session.closeInternal(new CloseReason(CloseReason.CloseCodes.NO_STATUS_CODE, null));
}
} catch (IOException e) {
invokeOnError(e);
} finally {
pooled.close();
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFullCloseMessage
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
onFullCloseMessage
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // since 2.9
public boolean isNaN() {
if (_currToken == JsonToken.VALUE_NUMBER_FLOAT) {
if ((_numTypesValid & NR_DOUBLE) != 0) {
// 10-Mar-2017, tatu: Alas, `Double.isFinite(d)` only added in JDK 8
double d = _numberDouble;
return Double.isNaN(d) || Double.isInfinite(d);
}
if ((_numTypesValid & NR_FLOAT) != 0) {
float f = _numberFloat;
return Float.isNaN(f) || Float.isInfinite(f);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNaN
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
isNaN
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void println(Object object) {
internalPrintln(defaultPrntOptions(false), object);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: println
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
println
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int deleteTempDrmData(SQLiteDatabase db, String selection,
String[] selectionArgs) {
return deleteDataRows(db, TABLE_DRM, selection, selectionArgs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteTempDrmData
File: src/com/android/providers/telephony/MmsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-22"
] |
CVE-2023-21268
|
MEDIUM
| 5.5
|
android
|
deleteTempDrmData
|
src/com/android/providers/telephony/MmsProvider.java
|
ca4c9a19635119d95900793e7a41b820cd1d94d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean transferSplashScreenIfNeeded() {
if (finishing || !mHandleExitSplashScreen || mStartingSurface == null
|| mStartingWindow == null
|| mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH) {
return false;
}
if (isTransferringSplashScreen()) {
return true;
}
requestCopySplashScreen();
return isTransferringSplashScreen();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transferSplashScreenIfNeeded
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
|
transferSplashScreenIfNeeded
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setDeviceOwner(ComponentName admin, String ownerName, int userId,
boolean setProfileOwnerOnCurrentUserIfNecessary) {
if (!mHasFeature) {
logMissingFeatureAction("Cannot set " + ComponentName.flattenToShortString(admin)
+ " as device owner for user " + userId);
return false;
}
Preconditions.checkArgument(admin != null);
final CallerIdentity caller = getCallerIdentity();
// Cannot be called while holding the lock:
final boolean hasIncompatibleAccountsOrNonAdb =
hasIncompatibleAccountsOrNonAdbNoLock(caller, userId, admin);
synchronized (getLockObject()) {
enforceCanSetDeviceOwnerLocked(caller, admin, userId, hasIncompatibleAccountsOrNonAdb);
Preconditions.checkArgument(isPackageInstalledForUser(admin.getPackageName(), userId),
"Invalid component " + admin + " for device owner");
final ActiveAdmin activeAdmin = getActiveAdminUncheckedLocked(admin, userId);
Preconditions.checkArgument(activeAdmin != null && !getUserData(
userId).mRemovingAdmins.contains(admin), "Not active admin: " + admin);
// Shutting down backup manager service permanently.
toggleBackupServiceActive(UserHandle.USER_SYSTEM, /* makeActive= */ false);
if (isAdb(caller)) {
// Log device owner provisioning was started using adb.
MetricsLogger.action(mContext, PROVISIONING_ENTRY_POINT_ADB, LOG_TAG_DEVICE_OWNER);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.PROVISIONING_ENTRY_POINT_ADB)
.setAdmin(admin)
.setStrings(LOG_TAG_DEVICE_OWNER)
.write();
}
mOwners.setDeviceOwner(admin, ownerName, userId);
mOwners.writeDeviceOwner();
setDeviceOwnershipSystemPropertyLocked();
//TODO(b/180371154): when provisionFullyManagedDevice is used in tests, remove this
// hard-coded default value setting.
if (isAdb(caller)) {
activeAdmin.mAdminCanGrantSensorsPermissions = true;
mPolicyCache.setAdminCanGrantSensorsPermissions(userId, true);
saveSettingsLocked(userId);
}
mInjector.binderWithCleanCallingIdentity(() -> {
// Restrict adding a managed profile when a device owner is set on the device.
// That is to prevent the co-existence of a managed profile and a device owner
// on the same device.
// Instead, the device may be provisioned with an organization-owned managed
// profile, such that the admin on that managed profile has extended management
// capabilities that can affect the entire device (but not access private data
// on the primary profile).
mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_MANAGED_PROFILE, true,
UserHandle.of(userId));
// Restrict adding a clone profile when a device owner is set on the device.
// That is to prevent the co-existence of a clone profile and a device owner
// on the same device.
// CDD for reference : https://source.android.com/compatibility/12/android-12-cdd#95_multi-user_support
mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_CLONE_PROFILE, true,
UserHandle.of(userId));
// TODO Send to system too?
sendOwnerChangedBroadcast(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED, userId);
});
mDeviceAdminServiceController.startServiceForOwner(
admin.getPackageName(), userId, "set-device-owner");
Slogf.i(LOG_TAG, "Device owner set: " + admin + " on user " + userId);
}
if (setProfileOwnerOnCurrentUserIfNecessary
&& mInjector.userManagerIsHeadlessSystemUserMode()) {
int currentForegroundUser;
synchronized (getLockObject()) {
currentForegroundUser = getCurrentForegroundUserId();
}
Slogf.i(LOG_TAG, "setDeviceOwner(): setting " + admin
+ " as profile owner on user " + currentForegroundUser);
// Sets profile owner on current foreground user since
// the human user will complete the DO setup workflow from there.
manageUserUnchecked(/* deviceOwner= */ admin, /* profileOwner= */ admin,
/* managedUser= */ currentForegroundUser, /* adminExtras= */ null,
/* showDisclaimer= */ false);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceOwner
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
|
setDeviceOwner
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTempFolderPath() {
return tempFolderPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTempFolderPath
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getTempFolderPath
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void fatalError(TransformerException exception) throws TransformerException {
throw exception;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fatalError
File: hazelcast/src/main/java/com/hazelcast/internal/util/XmlUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0265
|
HIGH
| 7.5
|
hazelcast
|
fatalError
|
hazelcast/src/main/java/com/hazelcast/internal/util/XmlUtil.java
|
4d6b666cd0291abd618c3b95cdbb51aa4208e748
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setContinueButton(View decor, View.OnClickListener listener) {
final TextView yesButton = decor.findViewById(R.id.autofill_dialog_yes);
// set "Continue" by default
yesButton.setText(R.string.autofill_continue_yes);
yesButton.setOnClickListener(listener);
yesButton.setVisibility(View.VISIBLE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContinueButton
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
setContinueButton
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setCacheEntryTimeout(long timeout) {
if (timeout < 1) {
throw new IllegalArgumentException("timeout must be >= 1");
}
this.cacheEntryTimeout = timeout;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCacheEntryTimeout
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setCacheEntryTimeout
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearLockedTasks(String reason) {
synchronized (mGlobalLock) {
getLockTaskController().clearLockedTasks(reason);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearLockedTasks
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
clearLockedTasks
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public Jooby server(final Class<? extends Server> server) {
requireNonNull(server, "Server required.");
// remove server lookup
List<Object> tmp = bag.stream()
.skip(1)
.collect(Collectors.toList());
tmp.add(0,
(Module) (env, conf, binder) -> binder.bind(Server.class).to(server).asEagerSingleton());
bag.clear();
bag.addAll(tmp);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: server
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
server
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public DefaultJpaInstanceConfiguration password(String password) {
put(PersistenceUnitProperties.JDBC_PASSWORD, password);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: password
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
password
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addProperty(StringBuilder file, String key, Object value) {
if (null == value) value = "";
file.append(key + "=" + String.valueOf(value) + "\n");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addProperty
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
addProperty
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopSystemLockTaskMode() throws RemoteException {
if (mStackSupervisor.getLockTaskModeState() == ActivityManager.LOCK_TASK_MODE_PINNED) {
stopLockTaskMode();
} else {
mStackSupervisor.showLockTaskToast();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopSystemLockTaskMode
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
|
stopSystemLockTaskMode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUidGone(int uid, boolean disabled) {
injectPostToHandler(() ->
handleOnUidStateChanged(uid, ActivityManager.PROCESS_STATE_NONEXISTENT));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUidGone
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
onUidGone
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void didFailLoad(boolean isProvisionalLoad, boolean isMainFrame, int errorCode,
String description, String failingUrl) {
for (TabObserver observer : mObservers) {
observer.onDidFailLoad(Tab.this, isProvisionalLoad, isMainFrame, errorCode,
description, failingUrl);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: didFailLoad
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
didFailLoad
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void validateIpAddress(final String ipAddress) {
if (!isValidIpAddress(ipAddress)) {
throw new IllegalArgumentException(
String.format(Locale.ENGLISH, "[%s] is an invalid IP address.", ipAddress));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateIpAddress
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
validateIpAddress
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canChooseCertificates(CallerIdentity caller) {
return isProfileOwner(caller) || isDefaultDeviceOwner(caller)
|| isCallerDelegate(caller, DELEGATION_CERT_SELECTION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canChooseCertificates
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
|
canChooseCertificates
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long size() throws IOException {
if (!file.isFile()) {
throw new FileNotFoundException(file.toString());
}
return file.length();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
size
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
public Channel pollAndVerifyCachedChannel(URI uri, ProxyServer proxy, ConnectionPoolKeyStrategy connectionPoolKeyStrategy) {
final Channel channel = channelPool.poll(connectionPoolKeyStrategy.getKey(uri, proxy));
if (channel != null) {
LOGGER.debug("Using cached Channel {}\n for uri {}\n", channel, uri);
try {
verifyChannelPipeline(channel.pipeline(), uri.getScheme());
} catch (Exception ex) {
LOGGER.debug(ex.getMessage(), ex);
}
}
return channel;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pollAndVerifyCachedChannel
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
pollAndVerifyCachedChannel
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public IntentBuilder setUserId(int userId) {
mIntent.putExtra(Intent.EXTRA_USER_ID, userId);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserId
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
setUserId
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<WifiConfiguration> convertMultiTypeConfigsToLegacyConfigs(
List<WifiConfiguration> configs) {
if (!SdkLevel.isAtLeastS()) {
return configs;
}
List<WifiConfiguration> legacyConfigs = new ArrayList<>();
for (WifiConfiguration config : configs) {
for (SecurityParams params: config.getSecurityParamsList()) {
if (!params.isEnabled()) continue;
if (shouldOmitAutoUpgradeParams(params)) continue;
WifiConfiguration legacyConfig = new WifiConfiguration(config);
legacyConfig.setSecurityParams(params);
legacyConfigs.add(legacyConfig);
}
}
return legacyConfigs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertMultiTypeConfigsToLegacyConfigs
File: service/java/com/android/server/wifi/WifiConfigurationUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21252
|
MEDIUM
| 5.5
|
android
|
convertMultiTypeConfigsToLegacyConfigs
|
service/java/com/android/server/wifi/WifiConfigurationUtil.java
|
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized void beginHandshake() throws SSLException {
switch (handshakeState) {
case STARTED_IMPLICITLY:
checkEngineClosed();
// A user did not start handshake by calling this method by him/herself,
// but handshake has been started already by wrap() or unwrap() implicitly.
// Because it's the user's first time to call this method, it is unfair to
// raise an exception. From the user's standpoint, he or she never asked
// for renegotiation.
handshakeState = HandshakeState.STARTED_EXPLICITLY; // Next time this method is invoked by the user,
// we should raise an exception.
break;
case STARTED_EXPLICITLY:
// Nothing to do as the handshake is not done yet.
break;
case FINISHED:
if (clientMode) {
// Only supported for server mode at the moment.
throw RENEGOTIATION_UNSUPPORTED;
}
// For renegotiate on the server side we need to issue the following command sequence with openssl:
//
// SSL_renegotiate(ssl)
// SSL_do_handshake(ssl)
// ssl->state = SSL_ST_ACCEPT
// SSL_do_handshake(ssl)
//
// Bcause of this we fall-through to call handshake() after setting the state, as this will also take
// care of updating the internal OpenSslSession object.
//
// See also:
// https://github.com/apache/httpd/blob/2.4.16/modules/ssl/ssl_engine_kernel.c#L812
// http://h71000.www7.hp.com/doc/83final/ba554_90007/ch04s03.html
if (SSL.renegotiate(ssl) != 1 || SSL.doHandshake(ssl) != 1) {
throw shutdownWithError("renegotiation failed");
}
SSL.setState(ssl, SSL.SSL_ST_ACCEPT);
// fall-through
case NOT_STARTED:
handshakeState = HandshakeState.STARTED_EXPLICITLY;
handshake();
break;
default:
throw new Error();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginHandshake
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
beginHandshake
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setEnableCompression(boolean enableCompression) {
this.enableCompression = enableCompression;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEnableCompression
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setEnableCompression
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private int runUninstall() throws RemoteException {
int flags = 0;
int userId = UserHandle.USER_ALL;
String opt;
while ((opt=nextOption()) != null) {
if (opt.equals("-k")) {
flags |= PackageManager.DELETE_KEEP_DATA;
} else if (opt.equals("--user")) {
String param = nextArg();
if (isNumber(param)) {
userId = Integer.parseInt(param);
} else {
showUsage();
System.err.println("Error: Invalid user: " + param);
return 1;
}
} else {
System.err.println("Error: Unknown option: " + opt);
return 1;
}
}
String pkg = nextArg();
if (pkg == null) {
System.err.println("Error: no package specified");
showUsage();
return 1;
}
if (userId == UserHandle.USER_ALL) {
userId = UserHandle.USER_OWNER;
flags |= PackageManager.DELETE_ALL_USERS;
} else {
PackageInfo info;
try {
info = mPm.getPackageInfo(pkg, 0, userId);
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(PM_NOT_RUNNING_ERR);
return 1;
}
if (info == null) {
System.err.println("Failure - not installed for " + userId);
return 1;
}
final boolean isSystem =
(info.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
// If we are being asked to delete a system app for just one
// user set flag so it disables rather than reverting to system
// version of the app.
if (isSystem) {
flags |= PackageManager.DELETE_SYSTEM_APP;
}
}
final LocalIntentReceiver receiver = new LocalIntentReceiver();
mInstaller.uninstall(pkg, null /* callerPackageName */, flags,
receiver.getIntentSender(), userId);
final Intent result = receiver.getResult();
final int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS,
PackageInstaller.STATUS_FAILURE);
if (status == PackageInstaller.STATUS_SUCCESS) {
System.out.println("Success");
return 0;
} else {
Log.e(TAG, "Failure details: " + result.getExtras());
System.err.println("Failure ["
+ result.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) + "]");
return 1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runUninstall
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runUninstall
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void finishHeavyWeightApp() {
synchronized (mGlobalLock) {
if (mHeavyWeightProcess != null) {
mHeavyWeightProcess.finishActivities();
}
ActivityTaskManagerService.this.clearHeavyWeightProcessIfEquals(
mHeavyWeightProcess);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishHeavyWeightApp
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
finishHeavyWeightApp
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, String[]> getParameterMap() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParameterMap
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getParameterMap
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void getTilesForAction(Context context,
UserHandle user, String action, Map<Pair<String, String>, Tile> addedCache,
String defaultCategory, ArrayList<Tile> outTiles, boolean requireSettings) {
Intent intent = new Intent(action);
if (requireSettings) {
intent.setPackage(SETTING_PKG);
}
getTilesForIntent(context, user, intent, addedCache, defaultCategory, outTiles,
requireSettings, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTilesForAction
File: packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
getTilesForAction
|
packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
|
e206f02d46ae5e38c74d138b51f6e1637e261abe
| 0
|
Analyze the following code function for security vulnerabilities
|
private VerifyCredentialResponse verifyCredential(int userId, CredentialHash storedHash,
String credential, boolean hasChallenge, long challenge, CredentialUtil credentialUtil)
throws RemoteException {
if ((storedHash == null || storedHash.hash.length == 0) && TextUtils.isEmpty(credential)) {
// don't need to pass empty credentials to GateKeeper
return VerifyCredentialResponse.OK;
}
if (TextUtils.isEmpty(credential)) {
return VerifyCredentialResponse.ERROR;
}
if (storedHash.version == CredentialHash.VERSION_LEGACY) {
byte[] hash = credentialUtil.toHash(credential, userId);
if (Arrays.equals(hash, storedHash.hash)) {
unlockKeystore(credentialUtil.adjustForKeystore(credential), userId);
// Users with legacy credentials don't have credential-backed
// FBE keys, so just pass through a fake token/secret
Slog.i(TAG, "Unlocking user with fake token: " + userId);
final byte[] fakeToken = String.valueOf(userId).getBytes();
unlockUser(userId, fakeToken, fakeToken);
// migrate credential to GateKeeper
credentialUtil.setCredential(credential, null, userId);
if (!hasChallenge) {
return VerifyCredentialResponse.OK;
}
// Fall through to get the auth token. Technically this should never happen,
// as a user that had a legacy credential would have to unlock their device
// before getting to a flow with a challenge, but supporting for consistency.
} else {
return VerifyCredentialResponse.ERROR;
}
}
VerifyCredentialResponse response;
boolean shouldReEnroll = false;
GateKeeperResponse gateKeeperResponse = getGateKeeperService()
.verifyChallenge(userId, challenge, storedHash.hash, credential.getBytes());
int responseCode = gateKeeperResponse.getResponseCode();
if (responseCode == GateKeeperResponse.RESPONSE_RETRY) {
response = new VerifyCredentialResponse(gateKeeperResponse.getTimeout());
} else if (responseCode == GateKeeperResponse.RESPONSE_OK) {
byte[] token = gateKeeperResponse.getPayload();
if (token == null) {
// something's wrong if there's no payload with a challenge
Slog.e(TAG, "verifyChallenge response had no associated payload");
response = VerifyCredentialResponse.ERROR;
} else {
shouldReEnroll = gateKeeperResponse.getShouldReEnroll();
response = new VerifyCredentialResponse(token);
}
} else {
response = VerifyCredentialResponse.ERROR;
}
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
// credential has matched
unlockKeystore(credential, userId);
Slog.i(TAG, "Unlocking user " + userId +
" with token length " + response.getPayload().length);
unlockUser(userId, response.getPayload(), secretFromCredential(credential));
if (isManagedProfileWithSeparatedLock(userId)) {
TrustManager trustManager =
(TrustManager) mContext.getSystemService(Context.TRUST_SERVICE);
trustManager.setDeviceLockedForUser(userId, false);
}
if (shouldReEnroll) {
credentialUtil.setCredential(credential, credential, userId);
}
} else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
if (response.getTimeout() > 0) {
requireStrongAuth(STRONG_AUTH_REQUIRED_AFTER_LOCKOUT, userId);
}
}
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyCredential
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
verifyCredential
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean inboundOpenWorkSpace(final HttpServletRequest req) throws NamespaceException {
final String placeName = RequestUtil.getParameter(req, CLIENT_NAME);
final String spaceName = RequestUtil.getParameter(req, SPACE_NAME);
// Look up the place reference
final IPickUpSpace place = lookupPlace(placeName);
if (place == null) {
throw new IllegalArgumentException("No client place found using name " + placeName);
}
logger.info("Notified {} to open space at {}", placeName, spaceName);
place.openSpace(spaceName);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inboundOpenWorkSpace
File: src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
inboundOpenWorkSpace
|
src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String formatNumber(Number numberIn) {
Context ctx = Context.getCurrentContext();
return formatNumber(numberIn, ctx.getLocale());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatNumber
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
formatNumber
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<IBinder> getAppTasks(String callingPackage) {
int callingUid = Binder.getCallingUid();
long ident = Binder.clearCallingIdentity();
try {
synchronized(this) {
return mRecentTasks.getAppTasksList(callingUid, callingPackage);
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppTasks
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
|
getAppTasks
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAttached(String attached) {
this.attached = attached;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttached
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-18927
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setAttached
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
|
2b411dc2821c69539138aaf7632b938b659a58fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private static List<String> getGeoToolsJars() {
final Pattern pattern = Pattern.compile(".*\\/" + getVersion() + "\\/(gt-.*jar$)");
final List<String> jarNames = new ArrayList<>();
String pathSep = System.getProperty("path.separator");
String classpath = System.getProperty("java.class.path");
StringTokenizer st = new StringTokenizer(classpath, pathSep);
while (st.hasMoreTokens()) {
String path = st.nextToken();
Matcher matcher = pattern.matcher(path);
if (matcher.find()) {
jarNames.add(matcher.group(1));
}
}
Collections.sort(jarNames);
return jarNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGeoToolsJars
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getGeoToolsJars
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
private void routeSocketDataToOutput(ParcelFileDescriptor inPipe, OutputStream out)
throws IOException {
FileInputStream raw = new FileInputStream(inPipe.getFileDescriptor());
DataInputStream in = new DataInputStream(raw);
byte[] buffer = new byte[32 * 1024];
int chunkTotal;
while ((chunkTotal = in.readInt()) > 0) {
while (chunkTotal > 0) {
int toRead = (chunkTotal > buffer.length) ? buffer.length : chunkTotal;
int nRead = in.read(buffer, 0, toRead);
out.write(buffer, 0, nRead);
chunkTotal -= nRead;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: routeSocketDataToOutput
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
|
routeSocketDataToOutput
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setBasePath(String basePath) {
this.basePath = basePath;
setOauthBasePath(basePath);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBasePath
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setBasePath
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int addressSize() {
return ADDRESS_SIZE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addressSize
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
addressSize
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ApplicationBasicInfo[] getAllPaginatedApplicationBasicInfo(String tenantDomain, String username, int
pageNumber) throws IdentityApplicationManagementException {
ApplicationBasicInfo[] applicationBasicInfoArray;
try {
startTenantFlow(tenantDomain, username);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
if (appDAO instanceof PaginatableFilterableApplicationDAO) {
// invoking pre listeners
Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners();
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && listener instanceof AbstractApplicationMgtListener &&
!((AbstractApplicationMgtListener) listener).doPreGetPaginatedApplicationBasicInfo
(tenantDomain, username, pageNumber)) {
return new ApplicationBasicInfo[0];
}
}
applicationBasicInfoArray = ((PaginatableFilterableApplicationDAO) appDAO)
.getAllPaginatedApplicationBasicInfo(pageNumber);
// invoking post listeners
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && listener instanceof AbstractApplicationMgtListener &&
!((AbstractApplicationMgtListener) listener).doPostGetPaginatedApplicationBasicInfo
(tenantDomain, username, pageNumber, applicationBasicInfoArray)) {
return new ApplicationBasicInfo[0];
}
}
} else {
throw new UnsupportedOperationException("Application pagination is not supported. Tenant domain: " +
tenantDomain);
}
} finally {
endTenantFlow();
}
return applicationBasicInfoArray;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllPaginatedApplicationBasicInfo
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
|
getAllPaginatedApplicationBasicInfo
|
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
|
protected static ParseContext getParseContext(Element topLevelElement, URL baseUrl) throws PolicyException {
ParseContext parseContext = new ParseContext();
/**
* Are there any included policies? These are parsed here first so that
* rules in _this_ policy file will override included rules.
*
* NOTE that by this being here we only support one level of includes.
* To support recursion, move this into the parsePolicy method.
*/
for (Element include : getByTagName(topLevelElement, "include")) {
String href = getAttributeValue(include, "href");
Element includedPolicy = getPolicy(href, baseUrl);
parsePolicy(includedPolicy, parseContext);
}
parsePolicy(topLevelElement, parseContext);
return parseContext;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParseContext
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
getParseContext
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateObject(
int columnIndex, @Nullable Object x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObject
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
|
updateObject
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
static float nextTab(CharSequence text, int start, int end,
float h, Object[] tabs) {
float nh = Float.MAX_VALUE;
boolean alltabs = false;
if (text instanceof Spanned) {
if (tabs == null) {
tabs = getParagraphSpans((Spanned) text, start, end, TabStopSpan.class);
alltabs = true;
}
for (int i = 0; i < tabs.length; i++) {
if (!alltabs) {
if (!(tabs[i] instanceof TabStopSpan))
continue;
}
int where = ((TabStopSpan) tabs[i]).getTabStop();
if (where < nh && where > h)
nh = where;
}
if (nh != Float.MAX_VALUE)
return nh;
}
return ((int) ((h + TAB_INCREMENT) / TAB_INCREMENT)) * TAB_INCREMENT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextTab
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
nextTab
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection patch(final String path1, final String path2,
final String path3, final Route.OneArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{patch(path1, handler), patch(path2, handler),
patch(path3, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
Size getEstimatedMinMenuSize() {
final int pipActionSize = getResources().getDimensionPixelSize(R.dimen.pip_action_size);
// the minimum width would be (2 * pipActionSize) since we have settings and dismiss button
// on the top action container.
final int width = Math.max(2, mActions.size()) * pipActionSize;
final int height = getResources().getDimensionPixelSize(R.dimen.pip_expand_action_size)
+ getResources().getDimensionPixelSize(R.dimen.pip_action_padding)
+ getResources().getDimensionPixelSize(R.dimen.pip_expand_container_edge_margin);
return new Size(width, height);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEstimatedMinMenuSize
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
getEstimatedMinMenuSize
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClientAuthenticationMethod getClientAuthenticationMethod() {
return clientAuthenticationMethod;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientAuthenticationMethod
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getClientAuthenticationMethod
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
IPackageManager getPackageManager() {
return AppGlobals.getPackageManager();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageManager
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
|
getPackageManager
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getMaxNumPictureInPictureActions(IBinder token) {
// Currently, this is a static constant, but later, we may change this to be dependent on
// the context of the activity
return 3;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxNumPictureInPictureActions
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
|
getMaxNumPictureInPictureActions
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pushScreenCapturePolicy(int adminUserId) {
if (isPolicyEngineForFinanceFlagEnabled()) {
return;
}
// Update screen capture device-wide if disabled by the DO or COPE PO on the parent profile.
// TODO(b/261999445): remove
ActiveAdmin admin;
if (isHeadlessFlagEnabled()) {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceParentLocked(
mUserManagerInternal.getProfileParentId(adminUserId));
} else {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceParentLocked(
UserHandle.USER_SYSTEM);
}
if (admin != null && admin.disableScreenCapture) {
setScreenCaptureDisabled(UserHandle.USER_ALL);
return;
}
// Otherwise, update screen capture only for the calling user.
admin = getProfileOwnerAdminLocked(adminUserId);
if (admin != null && admin.disableScreenCapture) {
setScreenCaptureDisabled(adminUserId);
return;
}
// If the admin is permission based, update only for the calling user.
admin = getUserData(adminUserId).createOrGetPermissionBasedAdmin(adminUserId);
if (admin != null && admin.disableScreenCapture) {
setScreenCaptureDisabled(adminUserId);
return;
}
setScreenCaptureDisabled(UserHandle.USER_NULL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushScreenCapturePolicy
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
pushScreenCapturePolicy
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onNewIntent(final Intent intent) {
if (xmppConnectionServiceBound) {
processViewIntent(intent);
} else {
pendingViewIntent.push(intent);
}
setIntent(createLauncherIntent(this));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNewIntent
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onNewIntent
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
void deleteBathRoleUserRelation(@Param("roleIdArray") String[] roleIdArray);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteBathRoleUserRelation
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
deleteBathRoleUserRelation
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 0
|
Analyze the following code function for security vulnerabilities
|
private String _getContactInfo(final User user, final ContactType contactType) {
return _getContactInfo(user, contactType.name());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _getContactInfo
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
_getContactInfo
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateForceBackgroundCheck(boolean enabled) {
synchronized (this) {
if (mForceBackgroundCheck != enabled) {
mForceBackgroundCheck = enabled;
if (DEBUG_BACKGROUND_CHECK) {
Slog.i(TAG, "Force background check " + (enabled ? "enabled" : "disabled"));
}
if (mForceBackgroundCheck) {
// Stop background services for idle UIDs.
doStopUidForIdleUidsLocked();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateForceBackgroundCheck
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
|
updateForceBackgroundCheck
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
CompressFormat getIconPersistFormatForTest() {
return mIconPersistFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIconPersistFormatForTest
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getIconPersistFormatForTest
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getAccountVisibility(Account account, String packageName) {
Objects.requireNonNull(account, "account cannot be null");
Objects.requireNonNull(packageName, "packageName cannot be null");
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)
&& !isSystemUid(callingUid)) {
String msg = String.format(
"uid %s cannot get secrets for accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
if (AccountManager.PACKAGE_NAME_KEY_LEGACY_VISIBLE.equals(packageName)) {
int visibility = getAccountVisibilityFromCache(account, packageName, accounts);
if (AccountManager.VISIBILITY_UNDEFINED != visibility) {
return visibility;
} else {
return AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
}
}
if (AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE.equals(packageName)) {
int visibility = getAccountVisibilityFromCache(account, packageName, accounts);
if (AccountManager.VISIBILITY_UNDEFINED != visibility) {
return visibility;
} else {
return AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE;
}
}
return resolveAccountVisibility(account, packageName, accounts);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountVisibility
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
|
getAccountVisibility
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getSessionAttributeName() {
return VaadinSession.class.getName() + "." + getServiceName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionAttributeName
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
|
getSessionAttributeName
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private Commandline newKubeCtl() {
String kubectl = getKubeCtlPath();
if (kubectl == null) {
if (SystemUtils.IS_OS_MAC_OSX && new File("/usr/local/bin/kubectl").exists())
kubectl = "/usr/local/bin/kubectl";
else
kubectl = "kubectl";
}
Commandline cmdline = new Commandline(kubectl);
if (getConfigFile() != null)
cmdline.addArgs("--kubeconfig", getConfigFile());
return cmdline;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newKubeCtl
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
newKubeCtl
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserStarting(@NonNull TargetUser user) {
if (user.isPreCreated()) return;
mService.handleStartUser(user.getUserIdentifier());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserStarting
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
|
onUserStarting
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateTimestamp(
String columnName, java.sql.@Nullable Timestamp x)
throws SQLException {
updateTimestamp(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTimestamp
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
|
updateTimestamp
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean handleApplicationWtf(final IBinder app, final String tag, boolean system,
final ApplicationErrorReport.ParcelableCrashInfo crashInfo) {
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
if (system) {
// If this is coming from the system, we could very well have low-level
// system locks held, so we want to do this all asynchronously. And we
// never want this to become fatal, so there is that too.
mHandler.post(new Runnable() {
@Override public void run() {
handleApplicationWtfInner(callingUid, callingPid, app, tag, crashInfo);
}
});
return false;
}
final ProcessRecord r = handleApplicationWtfInner(callingUid, callingPid, app, tag,
crashInfo);
final boolean isFatal = Build.IS_ENG || Settings.Global
.getInt(mContext.getContentResolver(), Settings.Global.WTF_IS_FATAL, 0) != 0;
final boolean isSystem = (r == null) || r.persistent;
if (isFatal && !isSystem) {
mAppErrors.crashApplication(r, crashInfo);
return true;
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationWtf
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
|
handleApplicationWtf
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable CharSequence getLongSupportMessage(@NonNull ComponentName admin) {
throwIfParentInstance("getLongSupportMessage");
if (mService != null) {
try {
return mService.getLongSupportMessage(admin);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLongSupportMessage
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getLongSupportMessage
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean fileNameExists(Host host, Folder folder, String fileName, String identifier) throws DotDataException{
return this.fileNameExists(host, folder, fileName, identifier, -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fileNameExists
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
fileNameExists
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
protected LocalTime checkoutTimeValue(Cell cell) {
try {
return RecordVisitor.tryParseTime(cell.asString());
} catch (FieldValueException ignored) {
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkoutTimeValue
File: src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
checkoutTimeValue
|
src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerHttpResponse addDrainHandler(Runnable onDrain) {
response.drainHandler(new Handler<Void>() {
@Override
public void handle(Void event) {
onDrain.run();
}
});
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDrainHandler
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
addDrainHandler
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setContentLength(int length)
{
this.response.setContentLength(length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentLength
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
setContentLength
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean handleRedirectObject(XWikiContext context) throws XWikiException
{
WikiReference wikiReference = context.getWikiReference();
// Look if the document has a redirect object
XWikiDocument doc = context.getDoc();
BaseObject redirectObj = doc.getXObject(RedirectClassDocumentInitializer.REFERENCE);
if (redirectObj == null) {
return false;
}
// Get the location
String location = redirectObj.getStringValue("location");
if (StringUtils.isBlank(location)) {
return false;
}
// Resolve the location to get a reference
DocumentReferenceResolver<String> resolver = Utils.getComponent(DocumentReferenceResolver.TYPE_STRING);
EntityReference locationReference = resolver.resolve(location, wikiReference);
// Get the type of the current target
ResourceReference resourceReference = Utils.getComponent(ResourceReferenceManager.class).getResourceReference();
EntityResourceReference entityResource = (EntityResourceReference) resourceReference;
EntityReference entityReference = entityResource.getEntityReference();
// If the entity is inside a document, compute the new entity with the new document part.
if (entityReference.getType().ordinal() > EntityType.DOCUMENT.ordinal()) {
EntityReference parentDocument = entityReference.extractReference(EntityType.DOCUMENT);
locationReference = entityReference.replaceParent(parentDocument, locationReference);
}
// Get the URL corresponding to the location
// Note: the anchor part is lost in the process, because it is not sent to the server
// (see: http://stackoverflow.com/a/4276491)
String url = context.getWiki().getURL(locationReference, context.getAction(),
context.getRequest().getQueryString(), null, context);
// Send the redirection
try {
context.getResponse().sendRedirect(url);
} catch (IOException e) {
throw new XWikiException("Failed to redirect.", e);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleRedirectObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
handleRedirectObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void fillUI(boolean firstTime) {
if (firstTime) {
// Fill in all the values from the db in both text editor and summary
mName.setText(mApnData.getString(NAME_INDEX));
mApn.setText(mApnData.getString(APN_INDEX));
mProxy.setText(mApnData.getString(PROXY_INDEX));
mPort.setText(mApnData.getString(PORT_INDEX));
mUser.setText(mApnData.getString(USER_INDEX));
mServer.setText(mApnData.getString(SERVER_INDEX));
mPassword.setText(mApnData.getString(PASSWORD_INDEX));
mMmsProxy.setText(mApnData.getString(MMSPROXY_INDEX));
mMmsPort.setText(mApnData.getString(MMSPORT_INDEX));
mMmsc.setText(mApnData.getString(MMSC_INDEX));
mMcc.setText(mApnData.getString(MCC_INDEX));
mMnc.setText(mApnData.getString(MNC_INDEX));
mApnType.setText(mApnData.getString(TYPE_INDEX));
if (mNewApn) {
final SubscriptionInfo subInfo =
mProxySubscriptionMgr.getAccessibleSubscriptionInfo(mSubId);
// Country code
final String mcc = (subInfo == null) ? null : subInfo.getMccString();
// Network code
final String mnc = (subInfo == null) ? null : subInfo.getMncString();
if ((!TextUtils.isEmpty(mcc)) && (!TextUtils.isEmpty(mcc))) {
// Auto populate MNC and MCC for new entries, based on what SIM reports
mMcc.setText(mcc);
mMnc.setText(mnc);
mCurMnc = mnc;
mCurMcc = mcc;
}
}
final int authVal = mApnData.getInteger(AUTH_TYPE_INDEX, -1);
if (authVal != -1) {
mAuthType.setValueIndex(authVal);
} else {
mAuthType.setValue(null);
}
mProtocol.setValue(mApnData.getString(PROTOCOL_INDEX));
mRoamingProtocol.setValue(mApnData.getString(ROAMING_PROTOCOL_INDEX));
mCarrierEnabled.setChecked(mApnData.getInteger(CARRIER_ENABLED_INDEX, 1) == 1);
mBearerInitialVal = mApnData.getInteger(BEARER_INDEX, 0);
final HashSet<String> bearers = new HashSet<String>();
int bearerBitmask = mApnData.getInteger(BEARER_BITMASK_INDEX, 0);
if (bearerBitmask == 0) {
if (mBearerInitialVal == 0) {
bearers.add("" + 0);
}
} else {
int i = 1;
while (bearerBitmask != 0) {
if ((bearerBitmask & 1) == 1) {
bearers.add("" + i);
}
bearerBitmask >>= 1;
i++;
}
}
if (mBearerInitialVal != 0 && !bearers.contains("" + mBearerInitialVal)) {
// add mBearerInitialVal to bearers
bearers.add("" + mBearerInitialVal);
}
mBearerMulti.setValues(bearers);
mMvnoType.setValue(mApnData.getString(MVNO_TYPE_INDEX));
mMvnoMatchData.setEnabled(false);
mMvnoMatchData.setText(mApnData.getString(MVNO_MATCH_DATA_INDEX));
if (mNewApn && mMvnoTypeStr != null && mMvnoMatchDataStr != null) {
mMvnoType.setValue(mMvnoTypeStr);
mMvnoMatchData.setText(mMvnoMatchDataStr);
}
}
mName.setSummary(checkNull(mName.getText()));
mApn.setSummary(checkNull(mApn.getText()));
mProxy.setSummary(checkNull(mProxy.getText()));
mPort.setSummary(checkNull(mPort.getText()));
mUser.setSummary(checkNull(mUser.getText()));
mServer.setSummary(checkNull(mServer.getText()));
mPassword.setSummary(starify(mPassword.getText()));
mMmsProxy.setSummary(checkNull(mMmsProxy.getText()));
mMmsPort.setSummary(checkNull(mMmsPort.getText()));
mMmsc.setSummary(checkNull(mMmsc.getText()));
mMcc.setSummary(formatInteger(checkNull(mMcc.getText())));
mMnc.setSummary(formatInteger(checkNull(mMnc.getText())));
mApnType.setSummary(checkNull(mApnType.getText()));
final String authVal = mAuthType.getValue();
if (authVal != null) {
final int authValIndex = Integer.parseInt(authVal);
mAuthType.setValueIndex(authValIndex);
final String[] values = getResources().getStringArray(R.array.apn_auth_entries);
mAuthType.setSummary(values[authValIndex]);
} else {
mAuthType.setSummary(sNotSet);
}
mProtocol.setSummary(checkNull(protocolDescription(mProtocol.getValue(), mProtocol)));
mRoamingProtocol.setSummary(
checkNull(protocolDescription(mRoamingProtocol.getValue(), mRoamingProtocol)));
mBearerMulti.setSummary(
checkNull(bearerMultiDescription(mBearerMulti.getValues())));
mMvnoType.setSummary(
checkNull(mvnoDescription(mMvnoType.getValue())));
mMvnoMatchData.setSummary(checkNullforMvnoValue(mMvnoMatchData.getText()));
// allow user to edit carrier_enabled for some APN
final boolean ceEditable = getResources().getBoolean(
R.bool.config_allow_edit_carrier_enabled);
if (ceEditable) {
mCarrierEnabled.setEnabled(true);
} else {
mCarrierEnabled.setEnabled(false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillUI
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
fillUI
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processConsumerControl(ConsumerControl control) throws Exception {
ConsumerBrokerExchange consumerExchange = getConsumerBrokerExchange(control.getConsumerId());
broker.processConsumerControl(consumerExchange, control);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processConsumerControl
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
|
processConsumerControl
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
pw.println("Permission Denial: can't dump nfc from from pid="
+ Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()
+ " without permission " + android.Manifest.permission.DUMP);
return;
}
synchronized (this) {
pw.println("mState=" + stateToString(mState));
pw.println("mIsZeroClickRequested=" + mIsNdefPushEnabled);
pw.println("mScreenState=" + ScreenStateHelper.screenStateToString(mScreenState));
pw.println("mIsAirplaneSensitive=" + mIsAirplaneSensitive);
pw.println("mIsAirplaneToggleable=" + mIsAirplaneToggleable);
pw.println(mCurrentDiscoveryParameters);
mP2pLinkManager.dump(fd, pw, args);
if (mIsHceCapable) {
mCardEmulationManager.dump(fd, pw, args);
}
mNfcDispatcher.dump(fd, pw, args);
pw.println(mDeviceHost.dump());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
dump
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
public static String convertCamelCasedToHumanForm(@Nonnull final String camelCasedString, final boolean capitalizeFirstChar) {
final StringBuilder result = new StringBuilder();
boolean notFirst = false;
for (final char c : camelCasedString.toCharArray()) {
if (notFirst) {
if (Character.isUpperCase(c)) {
result.append(' ');
result.append(Character.toLowerCase(c));
} else {
result.append(c);
}
} else {
notFirst = true;
if (capitalizeFirstChar) {
result.append(Character.toUpperCase(c));
} else {
result.append(c);
}
}
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertCamelCasedToHumanForm
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
convertCamelCasedToHumanForm
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setMaxCheckedPlatformVersion(int maxSdkVersion) {
mMaxSdkVersion = maxSdkVersion;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaxCheckedPlatformVersion
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
setMaxCheckedPlatformVersion
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean removeProcessLocked(ProcessRecord app,
boolean callerWillRestart, boolean allowRestart, String reason) {
final String name = app.processName;
final int uid = app.uid;
if (DEBUG_PROCESSES) Slog.d(
TAG, "Force removing proc " + app.toShortString() + " (" + name
+ "/" + uid + ")");
mProcessNames.remove(name, uid);
mIsolatedProcesses.remove(app.uid);
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
boolean needRestart = false;
if (app.pid > 0 && app.pid != MY_PID) {
int pid = app.pid;
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(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.kill(reason, true);
handleAppDiedLocked(app, true, allowRestart);
removeLruProcessLocked(app);
if (app.persistent && !app.isolated) {
if (!callerWillRestart) {
addAppLocked(app.info, false, null /* ABI override */);
} else {
needRestart = true;
}
}
} else {
mRemovedProcesses.add(app);
}
return needRestart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessLocked
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
|
removeProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void bakupFile(File src) throws IOException {
if (!BAKUP_FLAG) {
return;
}
String targetPath = FileManagerUtils.rebulid(src.getPath());
String rootPath = FileManagerUtils.rebulid(this.fileRoot);
if (!targetPath.startsWith(rootPath)) {
logger.warn("bakup dir error:" + src.getPath());
return;
}
// 备份目录下面文件不需要再进行备份
// String srcPath = FileManagerUtils.rebulid(src.getParent());
// if (srcPath.startsWith(rootPath + BAKUP)) {
// logger.debug("file is bakup:" + src.getPath());
// return;
// }
targetPath = rootPath + BAKUP //
+ targetPath.substring(targetPath.indexOf(this.fileRoot) + this.fileRoot.length());
File target = new File(targetPath);
// not exist dir, create it
if (!target.getParentFile().exists()) {
target.getParentFile().mkdirs();
}
// exist file, delete it
if (target.exists()) {
target.delete();
}
FileManagerUtils.copyFile(src, target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bakupFile
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
bakupFile
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.