instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHomeSp
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setHomeSp
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClientConfig getClientConfig() {
return clientConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientConfig
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getClientConfig
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRenewal(boolean renewal) {
this.renewal = renewal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRenewal
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRenewal
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getFooterRowCount() {
return getFooter().getRowCount();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFooterRowCount
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getFooterRowCount
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getCsrfTokenAttributeName() {
return VaadinSession.class.getName() + "."
+ ApplicationConstants.CSRF_TOKEN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCsrfTokenAttributeName
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
|
getCsrfTokenAttributeName
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
<T> Map<String, Method> getExternalColumnSetters(List<String> columnNames, Class<T> clazz, boolean isAuditFlavored) {
Map<String, Method> externalColumnSettters = new HashMap<>();
for (String columnName : columnNames) {
if ((isAuditFlavored || !columnName.equals(DEFAULT_JSONB_FIELD_NAME)) && !columnName.equals(ID_FIELD)) {
String methodName = databaseFieldToPojoSetter(columnName);
for (Method method : clazz.getMethods()) {
if (method.getName().equals(methodName)) {
externalColumnSettters.put(columnName, method);
}
}
}
}
return externalColumnSettters;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExternalColumnSetters
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getExternalColumnSetters
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ProfileAttribute> getAttributes() {
return attributes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributes
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getAttributes
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getValidNotAfterInUse() {
return validNotAfterInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValidNotAfterInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getValidNotAfterInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void waitForJars(List<JARDesc> jars) {
URL urls[] = new URL[jars.size()];
for (int i = 0; i < jars.size(); i++) {
JARDesc jar = jars.get(i);
urls[i] = jar.getLocation();
}
CacheUtil.waitForResources(app, tracker, urls, file.getTitle());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForJars
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
waitForJars
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
void startProcessAsync(ActivityRecord activity, boolean knownToBeDead, boolean isTop,
String hostingType) {
try {
if (Trace.isTagEnabled(TRACE_TAG_WINDOW_MANAGER)) {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "dispatchingStartProcess:"
+ activity.processName);
}
// Post message to start process to avoid possible deadlock of calling into AMS with the
// ATMS lock held.
final Message m = PooledLambda.obtainMessage(ActivityManagerInternal::startProcess,
mAmInternal, activity.processName, activity.info.applicationInfo, knownToBeDead,
isTop, hostingType, activity.intent.getComponent());
mH.sendMessage(m);
} finally {
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startProcessAsync
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
|
startProcessAsync
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String self(String searchTerm) {
return StrSubstitutor.replace(BASE + "?q=${searchTerm}", of("searchTerm", UrlEscapers.urlFormParameterEscaper().escape(searchTerm)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: self
File: spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
self
|
spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void print(TaskListener listener, int depth) {
indent(listener, depth);
listener.getLogger().println(
Messages.Cause_UpstreamCause_ShortDescription(
ModelHyperlinkNote.encodeTo('/' + upstreamUrl, upstreamProject),
ModelHyperlinkNote.encodeTo('/'+upstreamUrl+upstreamBuild, Integer.toString(upstreamBuild)))
);
if (upstreamCauses != null && !upstreamCauses.isEmpty()) {
indent(listener, depth);
listener.getLogger().println(Messages.Cause_UpstreamCause_CausedBy());
for (Cause cause : upstreamCauses) {
if (cause instanceof UpstreamCause) {
((UpstreamCause) cause).print(listener, depth + 1);
} else {
indent(listener, depth + 1);
cause.print(listener);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: print
File: core/src/main/java/hudson/model/Cause.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2067
|
LOW
| 3.5
|
jenkinsci/jenkins
|
print
|
core/src/main/java/hudson/model/Cause.java
|
5d57c855f3147bfc5e7fda9252317b428a700014
| 0
|
Analyze the following code function for security vulnerabilities
|
public VFSContainer getWikiContainer(OLATResourceable ores, String folderName) {
VFSContainer wikiRootContainer = getWikiRootContainer(ores);
return (VFSContainer) wikiRootContainer.resolve(folderName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWikiContainer
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
getWikiContainer
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping
@ApiOperation("Lists journals")
public Page<JournalWithCmtCountDTO> pageBy(@PageableDefault(sort = "createTime", direction = DESC) Pageable pageable) {
Page<Journal> journals = journalService.pageBy(JournalType.PUBLIC, pageable);
return journalService.convertToCmtCountDto(journals);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageBy
File: src/main/java/run/halo/app/controller/content/api/JournalController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
pageBy
|
src/main/java/run/halo/app/controller/content/api/JournalController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void destroyModuleState() {
userTokenId = null;
userPrincipal = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroyModuleState
File: openam-authentication/openam-auth-nt/src/main/java/com/sun/identity/authentication/modules/nt/NT.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-34298
|
MEDIUM
| 5
|
OpenIdentityPlatform/OpenAM
|
destroyModuleState
|
openam-authentication/openam-auth-nt/src/main/java/com/sun/identity/authentication/modules/nt/NT.java
|
3b242fbd6bdc1e2fa2f07842213a6301a0a0b468
| 0
|
Analyze the following code function for security vulnerabilities
|
protected PutMethod executePutXml(String uri, Object object) throws Exception
{
HttpClient httpClient = new HttpClient();
PutMethod putMethod = new PutMethod(uri);
putMethod.addRequestHeader("Accept", MediaType.APPLICATION_XML.toString());
StringWriter writer = new StringWriter();
marshaller.marshal(object, writer);
RequestEntity entity =
new StringRequestEntity(writer.toString(), MediaType.APPLICATION_XML.toString(), "UTF-8");
putMethod.setRequestEntity(entity);
httpClient.executeMethod(putMethod);
return putMethod;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executePutXml
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-37277
|
CRITICAL
| 9.6
|
xwiki/xwiki-platform
|
executePutXml
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
|
4c175405faa0e62437df397811c7526dfc0fbae7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendSetConnectionCapabilities(String id) throws Exception {
for (IConnectionServiceAdapter a : mConnectionServiceAdapters) {
a.setConnectionCapabilities(id, mConnectionById.get(id).capabilities,
null /*Session.Info*/);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSetConnectionCapabilities
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
sendSetConnectionCapabilities
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient addDefaultCookie(String key, String value) {
defaultCookieMap.put(key, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultCookie
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
addDefaultCookie
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setErasedScoreItemDataValues(OdmClinicalDataBean data, String itemIds, String itemDataIds, HashMap<Integer,String> idataOidPoses, String odmVersion) {
this.setErasedScoreItemDataIdsTypesExpected();
ArrayList<Integer> rows = this.select(this.getErasedScoreItemDataIdsSql(itemIds, itemDataIds));
if(rows==null || rows.size()<1) {
logger.debug("OdmExtractDAO.getErasedScoreItemDataIdsSql return no erased score item_data_id" );
}else {
Iterator iter = rows.iterator();
while(iter.hasNext()) {
HashMap row = (HashMap) iter.next();
Integer idataId = (Integer) row.get("item_data_id");
if(idataOidPoses.containsKey(idataId)) {
String[] poses = idataOidPoses.get(idataId).split("---");
ImportItemDataBean idata =
data.getExportSubjectData().get(Integer.parseInt(poses[0])).getExportStudyEventData().get(Integer.parseInt(poses[1])).getExportFormData()
.get(Integer.parseInt(poses[2])).getItemGroupData().get(Integer.parseInt(poses[3])).getItemData().get(Integer.parseInt(poses[4]));
idata.setIsNull("Yes");
idata.setValue("");
idata.setReasonForNull("Erased");
} else {
logger.info("There is no erased score item data with item_data_id =" + idataId + " found in OdmClinicalData" );
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setErasedScoreItemDataValues
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setErasedScoreItemDataValues
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
@Override
public <T extends Result> T setResult(Class<T> resultClass) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode(
"getSource(" + (resultClass != null ? resultClass.getSimpleName() + ".class" : "null") + ')');
}
checkEditable();
if (resultClass == null || resultClass == DOMResult.class) {
domResult = new DOMResult();
state = State.SET_CALLED;
return (T) domResult;
} else if (resultClass == SAXResult.class) {
SAXTransformerFactory transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
TransformerHandler transformerHandler = transformerFactory.newTransformerHandler();
Writer writer = setCharacterStreamImpl();
transformerHandler.setResult(new StreamResult(writer));
SAXResult saxResult = new SAXResult(transformerHandler);
closable = writer;
state = State.SET_CALLED;
return (T) saxResult;
} else if (resultClass == StAXResult.class) {
XMLOutputFactory xof = XMLOutputFactory.newInstance();
Writer writer = setCharacterStreamImpl();
StAXResult staxResult = new StAXResult(xof.createXMLStreamWriter(writer));
closable = writer;
state = State.SET_CALLED;
return (T) staxResult;
} else if (StreamResult.class.equals(resultClass)) {
Writer writer = setCharacterStreamImpl();
StreamResult streamResult = new StreamResult(writer);
closable = writer;
state = State.SET_CALLED;
return (T) streamResult;
}
throw unsupported(resultClass.getName());
} catch (Exception e) {
throw logAndConvert(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-23463
- Severity: MEDIUM
- CVSS Score: 6.4
Description: fix for #3195 CQLXML XXE vulnerability
Function: setResult
File: h2/src/main/org/h2/jdbc/JdbcSQLXML.java
Repository: h2database
Fixed Code:
@SuppressWarnings("unchecked")
@Override
public <T extends Result> T setResult(Class<T> resultClass) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode(
"setResult(" + (resultClass != null ? resultClass.getSimpleName() + ".class" : "null") + ')');
}
checkEditable();
if (resultClass == null || resultClass == DOMResult.class) {
domResult = new DOMResult();
state = State.SET_CALLED;
return (T) domResult;
} else if (resultClass == SAXResult.class) {
SAXTransformerFactory transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance();
TransformerHandler transformerHandler = transformerFactory.newTransformerHandler();
Writer writer = setCharacterStreamImpl();
transformerHandler.setResult(new StreamResult(writer));
SAXResult saxResult = new SAXResult(transformerHandler);
closable = writer;
state = State.SET_CALLED;
return (T) saxResult;
} else if (resultClass == StAXResult.class) {
XMLOutputFactory xof = XMLOutputFactory.newInstance();
Writer writer = setCharacterStreamImpl();
StAXResult staxResult = new StAXResult(xof.createXMLStreamWriter(writer));
closable = writer;
state = State.SET_CALLED;
return (T) staxResult;
} else if (StreamResult.class.equals(resultClass)) {
Writer writer = setCharacterStreamImpl();
StreamResult streamResult = new StreamResult(writer);
closable = writer;
state = State.SET_CALLED;
return (T) streamResult;
}
throw unsupported(resultClass.getName());
} catch (Exception e) {
throw logAndConvert(e);
}
}
|
[
"CWE-611"
] |
CVE-2021-23463
|
MEDIUM
| 6.4
|
h2database
|
setResult
|
h2/src/main/org/h2/jdbc/JdbcSQLXML.java
|
d83285fd2e48fb075780ee95badee6f5a15ea7f8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public long[] getProcessPss(int[] pids) {
enforceNotIsolatedCaller("getProcessPss");
final int callingPid = Binder.getCallingPid();
final int callingUid = Binder.getCallingUid();
final int userId = UserHandle.getUserId(callingUid);
final boolean allUsers = ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL,
callingUid) == PackageManager.PERMISSION_GRANTED;
// Check REAL_GET_TASKS to see if they are allowed to access other uids
final boolean allUids = mAtmInternal.isGetTasksAllowed(
"getProcessPss", callingPid, callingUid);
final long[] pss = new long[pids.length];
for (int i=pids.length-1; i>=0; i--) {
ProcessRecord proc;
int oomAdj;
synchronized (mProcLock) {
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(pids[i]);
oomAdj = proc != null ? proc.mState.getSetAdj() : 0;
}
}
if (!allUids || (!allUsers && UserHandle.getUserId(proc.uid) != userId)) {
// The caller is not allow to get information about this other process...
// just leave it empty.
continue;
}
final long[] tmpUss = new long[3];
final long startTime = SystemClock.currentThreadTimeMillis();
final long pi = pss[i] = Debug.getPss(pids[i], tmpUss, null);
final long duration = SystemClock.currentThreadTimeMillis() - startTime;
if (proc != null) {
final ProcessProfileRecord profile = proc.mProfile;
synchronized (mAppProfiler.mProfilerLock) {
if (profile.getThread() != null && profile.getSetAdj() == oomAdj) {
// Record this for posterity if the process has been stable.
profile.addPss(pi, tmpUss[0], tmpUss[2], false,
ProcessStats.ADD_PSS_EXTERNAL, duration);
proc.getPkgList().forEachPackageProcessStats(holder -> {
FrameworkStatsLog.write(FrameworkStatsLog.PROCESS_MEMORY_STAT_REPORTED,
proc.info.uid,
holder.state.getName(),
holder.state.getPackage(),
pi,
tmpUss[0],
tmpUss[2],
ProcessStats.ADD_PSS_EXTERNAL,
duration,
holder.appVersion,
profile.getCurrentHostingComponentTypes(),
profile.getHistoricalHostingComponentTypes());
});
}
}
}
}
return pss;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessPss
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getProcessPss
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected KeyExchangeMessageHandler initializeKeyExchangeMessageHandler() {
return new KeyExchangeMessageHandler(this, log);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeKeyExchangeMessageHandler
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
initializeKeyExchangeMessageHandler
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected BigInteger chooseRandomPrime(int bitlength, BigInteger e, BigInteger sqrdBound)
{
for (int i = 0; i != 5 * bitlength; i++)
{
BigInteger p = new BigInteger(bitlength, 1, param.getRandom());
if (p.mod(e).equals(ONE))
{
continue;
}
if (p.multiply(p).compareTo(sqrdBound) < 0)
{
continue;
}
if (!isProbablePrime(p))
{
continue;
}
if (!e.gcd(p.subtract(ONE)).equals(ONE))
{
continue;
}
return p;
}
throw new IllegalStateException("unable to generate prime number for RSA key");
}
|
Vulnerability Classification:
- CWE: CWE-327
- CVE: CVE-2018-1000180
- Severity: MEDIUM
- CVSS Score: 5.0
Description: BJA-694 cleaned up primality test
Function: chooseRandomPrime
File: core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
Repository: bcgit/bc-java
Fixed Code:
protected BigInteger chooseRandomPrime(int bitlength, BigInteger e, BigInteger sqrdBound)
{
int iterations = getNumberOfIterations(bitlength, param.getCertainty());
for (int i = 0; i != 5 * bitlength; i++)
{
BigInteger p = new BigInteger(bitlength, 1, param.getRandom());
if (p.mod(e).equals(ONE))
{
continue;
}
if (p.multiply(p).compareTo(sqrdBound) < 0)
{
continue;
}
if (!isProbablePrime(p, iterations))
{
continue;
}
if (!e.gcd(p.subtract(ONE)).equals(ONE))
{
continue;
}
return p;
}
throw new IllegalStateException("unable to generate prime number for RSA key");
}
|
[
"CWE-327"
] |
CVE-2018-1000180
|
MEDIUM
| 5
|
bcgit/bc-java
|
chooseRandomPrime
|
core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
|
73780ac522b7795fc165630aba8d5f5729acc839
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object getAttribute(String name) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttribute
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
|
getAttribute
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean awaitShutdown() {
return mWaitForStopCv.block(IPCLIENT_SHUTDOWN_TIMEOUT_MS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: awaitShutdown
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
|
awaitShutdown
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
static String fullTemplateInfo(Controller controller, boolean reload) {
if (controller instanceof BaseController) {
BaseController baseController = (BaseController) controller;
String basePath = baseController.getTemplatePath();
controller.getRequest().setAttribute("template", basePath);
I18nUtil.addToRequest(PathKit.getWebRootPath() + basePath + "/language/", controller.getRequest(), JFinal.me().getConstants().getDevMode(), reload);
baseController.fullTemplateSetting();
TemplateHelper.fullInfo(controller.getRequest(), Constants.isStaticHtmlStatus());
return basePath;
}
return Constants.DEFAULT_TEMPLATE_PATH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fullTemplateInfo
File: web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
fullTemplateInfo
|
web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final String msg = ((ApnEditor) getTargetFragment()).validateApnData();
return new AlertDialog.Builder(getContext())
.setTitle(R.string.error_title)
.setPositiveButton(android.R.string.ok, null)
.setMessage(msg)
.create();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateDialog
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
|
onCreateDialog
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean select(final Object... itemIds)
throws IllegalArgumentException {
if (itemIds != null) {
// select will fire the event
return select(Arrays.asList(itemIds));
} else {
throw new IllegalArgumentException(
"Vararg array of itemIds may not be null");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: select
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
select
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getInitialReceiveWindowSize() {
return initialReceiveWindowSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInitialReceiveWindowSize
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getInitialReceiveWindowSize
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static EntityReferenceResolver<org.xwiki.rendering.listener.reference.ResourceReference>
getResourceReferenceEntityReferenceResolver()
{
return Utils
.getComponent(new DefaultParameterizedType(null, EntityReferenceResolver.class,
org.xwiki.rendering.listener.reference.ResourceReference.class));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceReferenceEntityReferenceResolver
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getResourceReferenceEntityReferenceResolver
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateRightAffordanceIcon() {
IconState state = mRightButton.getIcon();
mRightAffordanceView.setVisibility(!mDozing && state.isVisible ? View.VISIBLE : View.GONE);
mRightAffordanceView.setImageDrawable(state.drawable, state.tint);
mRightAffordanceView.setContentDescription(state.contentDescription);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateRightAffordanceIcon
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
updateRightAffordanceIcon
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ResourceTracker getTracker() {
return tracker;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTracker
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getTracker
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
private native String nativeGetOriginalUrlForActiveNavigationEntry(
long nativeContentViewCoreImpl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetOriginalUrlForActiveNavigationEntry
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeGetOriginalUrlForActiveNavigationEntry
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, String> getParamMap(){
return request.getQueryParams().toSingleValueMap();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamMap
File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParamMap
|
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Object> getHelperUtilities(
ClassLoader classLoader, boolean restricted) {
Map<String, Object>[] helperUtilitiesArray = _helperUtilitiesMaps.get(
classLoader);
if (helperUtilitiesArray == null) {
helperUtilitiesArray = (Map<String, Object>[])new Map<?, ?>[2];
_helperUtilitiesMaps.put(classLoader, helperUtilitiesArray);
}
else {
Map<String, Object> helperUtilities = null;
if (restricted) {
helperUtilities = helperUtilitiesArray[1];
}
else {
helperUtilities = helperUtilitiesArray[0];
}
if (helperUtilities != null) {
return helperUtilities;
}
}
Map<String, Object> helperUtilities = new HashMap<String, Object>();
populateCommonHelperUtilities(helperUtilities);
populateExtraHelperUtilities(helperUtilities);
if (restricted) {
Set<String> restrictedVariables = getRestrictedVariables();
for (String restrictedVariable : restrictedVariables) {
helperUtilities.remove(restrictedVariable);
}
helperUtilitiesArray[1] = helperUtilities;
}
else {
helperUtilitiesArray[0] = helperUtilities;
}
return helperUtilities;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHelperUtilities
File: portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
Repository: samuelkong/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2963
|
MEDIUM
| 4.3
|
samuelkong/liferay-portal
|
getHelperUtilities
|
portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
|
5db1f7622e8e2c9a559ef0145a0f04c5854a1e8b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isUserUnlockedL(@UserIdInt int userId) {
// First, check the local copy.
synchronized (mUnlockedUsers) {
if (mUnlockedUsers.get(userId)) {
return true;
}
}
// If the local copy says the user is locked, check with AM for the actual state, since
// the user might just have been unlocked.
// Note we just don't use isUserUnlockingOrUnlocked() here, because it'll return false
// when the user is STOPPING, which we still want to consider as "unlocked".
return mUserManagerInternal.isUserUnlockingOrUnlocked(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserUnlockedL
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
|
isUserUnlockedL
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setErrorHandler(final ErrorHandler errorHandler) {
saxErrorHandler = errorHandler;
engine = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setErrorHandler
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
setErrorHandler
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getHandshakeTimeout() {
return handshakeTimeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHandshakeTimeout
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getHandshakeTimeout
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isProtectedResource(HttpServletRequest request) {
return tokenService.isAProtectedResource(request) && !isFileDragAndDrop(request) &&
!isCredentialManagement(request) && !isSsoAuthentication(request) &&
!isWebServiceRequested(request) &&
!isWebBrowserEditionResource(request) && !isCMISResource(request) &&
!isDragAndDropWebEditionResource(request);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-47324
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Bug #13811: fixing stored XSS leading to full account takeover
* making HTML sanitize processing accessible for JSTL instructions
* sanitizing user notification title and contents on registering
* sanitizing user notification title and contents on rendering
* sanitizing browse bar parts
* modifying the user and group saving action names in order to get the user token verifications
* applying the token validation from component request router abstraction
Function: isProtectedResource
File: core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
Repository: Silverpeas/Silverpeas-Core
Fixed Code:
private boolean isProtectedResource(HttpServletRequest request) {
return tokenService.isAProtectedResource(request, false) && !isFileDragAndDrop(request) &&
!isCredentialManagement(request) && !isSsoAuthentication(request) &&
!isWebServiceRequested(request) &&
!isWebBrowserEditionResource(request) && !isCMISResource(request) &&
!isDragAndDropWebEditionResource(request);
}
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
isProtectedResource
|
core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 1
|
Analyze the following code function for security vulnerabilities
|
public static boolean getIsUnitTest() {
return Main.isUnitTest;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIsUnitTest
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getIsUnitTest
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateUiForPipMode() {
Log.d(TAG, "updateUiForPipMode");
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(0, 0, 0, 0);
binding.gridview.setLayoutParams(params);
binding.callControls.setVisibility(View.GONE);
binding.callInfosLinearLayout.setVisibility(View.GONE);
binding.selfVideoViewWrapper.setVisibility(View.GONE);
binding.callStates.callStateRelativeLayout.setVisibility(View.GONE);
if (participantDisplayItems.size() > 1) {
binding.pipCallConversationNameTextView.setText(conversationName);
binding.pipGroupCallOverlay.setVisibility(View.VISIBLE);
} else {
binding.pipGroupCallOverlay.setVisibility(View.GONE);
}
binding.selfVideoRenderer.release();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateUiForPipMode
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
updateUiForPipMode
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String substitute(String source, Map<String, String> substitions) {
String result = source;
Iterator<Map.Entry<String, String>> it = substitions.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, String> entry = it.next();
result = substitute(result, entry.getKey(), entry.getValue().toString());
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: substitute
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
substitute
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getText() throws IOException
{
JsonToken t = _currToken;
if (_tokenIncomplete) {
if (t == JsonToken.VALUE_STRING) {
return _finishTextToken(_typeByte);
}
}
if (t == JsonToken.VALUE_STRING) {
return _textBuffer.contentsAsString();
}
if (t == null) { // null only before/after document
return null;
}
if (t == JsonToken.FIELD_NAME) {
return _parsingContext.getCurrentName();
}
if (t.isNumeric()) {
return getNumberValue().toString();
}
return _currToken.asString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getText
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
|
getText
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeAsyncStanzaListener(StanzaListener packetListener) {
synchronized (asyncRecvListeners) {
return asyncRecvListeners.remove(packetListener) != null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAsyncStanzaListener
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
removeAsyncStanzaListener
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getJs(Map<String, Object> data) {
return getPropertyString("js");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJs
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
|
getJs
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasPeople() {
return View.People.isApplicable(items.values());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasPeople
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
hasPeople
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
ShortcutLauncher getLauncherShortcutForTest(String packageName, int userId) {
synchronized (mLock) {
final ShortcutUser user = mUsers.get(userId);
if (user == null) return null;
return user.getAllLaunchersForTest().get(PackageWithUser.of(userId, packageName));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLauncherShortcutForTest
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
getLauncherShortcutForTest
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Select("select ${key} as \"label\",${value} as \"value\" from ${table}")
public List<Map<String,String>> getDictByTableNgAlain(@Param("table") String table, @Param("key") String key, @Param("value") String value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDictByTableNgAlain
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45207
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
getDictByTableNgAlain
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
|
8632a835c23f558dfee3584d7658cc6a13ccec6f
| 0
|
Analyze the following code function for security vulnerabilities
|
byte[] getFile(String file) throws IOException {
trace("getFile <" + file + ">");
byte[] data = Utils.getResource("/org/h2/server/web/res/" + file);
if (data == null) {
trace(" null");
} else {
trace(" size=" + data.length);
}
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFile
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getFile
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private Properties loadProperties() {
try {
if ("null".equals(serverPropertiesDir)) {
return new Properties();
}
return SortedProperties.loadProperties(
serverPropertiesDir + "/" + Constants.SERVER_PROPERTIES_NAME);
} catch (Exception e) {
DbException.traceThrowable(e);
return new Properties();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadProperties
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
loadProperties
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getPreviewDiffs(String projectName, String repositoryName, Revision baseRevision,
List<Change> changes, AsyncMethodCallback resultHandler) {
handle(projectManager.get(projectName).repos().get(repositoryName)
.previewDiff(convert(baseRevision), convert(changes, Converter::convert))
.thenApply(diffs -> convert(diffs.values(), Converter::convert)),
resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreviewDiffs
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
getPreviewDiffs
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean addBadgeAndUpdate(Profile authUser, Profile.Badge b, boolean condition) {
return addBadge(authUser, b, condition, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addBadgeAndUpdate
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
addBadgeAndUpdate
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public CharSequence getUserDisplayName() {
return mUser.getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserDisplayName
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getUserDisplayName
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<PeriodicSync> getPeriodicSyncs(Account account, String providerName,
ComponentName cname) {
if (account == null) {
throw new IllegalArgumentException("Account must not be null");
}
if (TextUtils.isEmpty(providerName)) {
throw new IllegalArgumentException("Authority must not be empty");
}
mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS,
"no permission to read the sync settings");
int userId = UserHandle.getCallingUserId();
long identityToken = clearCallingIdentity();
try {
return getSyncManager().getSyncStorageEngine().getPeriodicSyncs(
new SyncStorageEngine.EndPoint(account, providerName, userId));
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPeriodicSyncs
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
getPeriodicSyncs
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean startViewCalendarEventInManagedProfile(long eventId, long start, long end,
boolean allDay, int flags) {
throwIfParentInstance("startViewCalendarEventInManagedProfile");
if (mService != null) {
try {
return mService.startViewCalendarEventInManagedProfile(mContext.getPackageName(),
eventId, start, end, allDay, flags);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startViewCalendarEventInManagedProfile
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
|
startViewCalendarEventInManagedProfile
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
public int checkDeviceIdentifierAccess(@Nullable String packageName, @Nullable String message,
@Nullable String callingFeatureId, int pid, int uid) {
return mLegacyPermissionManager.checkDeviceIdentifierAccess(packageName, message,
callingFeatureId, pid, uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkDeviceIdentifierAccess
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
checkDeviceIdentifierAccess
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getEnableSessionCreation() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnableSessionCreation
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
|
getEnableSessionCreation
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeInitWebContents(long nativeTabAndroid, boolean incognito,
ContentViewCore contentViewCore, ChromeWebContentsDelegateAndroid delegate,
ContextMenuPopulator contextMenuPopulator);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeInitWebContents
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
|
nativeInitWebContents
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void generateComponentInterface(Set<Component> components, OutputStream out, Set<Type> types)
throws IOException
{
for (Component c : components)
{
if (c != null)
{
if (!interfaceCache.containsKey(c.getName()))
{
synchronized (interfaceCache)
{
if (!interfaceCache.containsKey(c.getName()))
{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
appendComponentSource(bOut, c, types);
interfaceCache.put(c.getName(), bOut.toByteArray());
}
}
}
out.write(interfaceCache.get(c.getName()));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateComponentInterface
File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
Repository: seam2/jboss-seam
The code follows secure coding practices.
|
[
"CWE-264",
"CWE-200"
] |
CVE-2013-6447
|
MEDIUM
| 5
|
seam2/jboss-seam
|
generateComponentInterface
|
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
|
090aa6252affc978a96c388e3fc2c1c2688d9bb5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeOverrideApn(@NonNull ComponentName who, int apnId) {
if (!mHasFeature || !mHasTelephonyFeature) {
return false;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
ApnSetting apn = getApnSetting(apnId);
if (apn != null && apn.getApnTypeBitmask() == ApnSetting.TYPE_ENTERPRISE) {
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| isManagedProfileOwner(caller));
} else {
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller));
}
return removeOverrideApnUnchecked(apnId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeOverrideApn
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
|
removeOverrideApn
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static RecipientErrorDialogFragment newInstance(final String message) {
final RecipientErrorDialogFragment frag = new RecipientErrorDialogFragment();
final Bundle args = new Bundle(1);
args.putString("message", message);
frag.setArguments(args);
return frag;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newInstance
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
|
newInstance
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
static void appendBasicMemEntry(StringBuilder sb, int oomAdj, int procState, long pss,
long memtrack, String name) {
sb.append(" ");
sb.append(ProcessList.makeOomAdjString(oomAdj, false));
sb.append(' ');
sb.append(ProcessList.makeProcStateString(procState));
sb.append(' ');
ProcessList.appendRamKb(sb, pss);
sb.append(": ");
sb.append(name);
if (memtrack > 0) {
sb.append(" (");
sb.append(stringifyKBSize(memtrack));
sb.append(" memtrack)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendBasicMemEntry
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
appendBasicMemEntry
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
void moveTaskToFrontLocked(int taskId, int flags, Bundle bOptions) {
ActivityOptions options = ActivityOptions.fromBundle(bOptions);
if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),
Binder.getCallingUid(), -1, -1, "Task to front")) {
ActivityOptions.abort(options);
return;
}
final long origId = Binder.clearCallingIdentity();
try {
final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId);
if (task == null) {
Slog.d(TAG, "Could not find task for id: "+ taskId);
return;
}
if (mStackSupervisor.isLockTaskModeViolation(task)) {
mStackSupervisor.showLockTaskToast();
Slog.e(TAG, "moveTaskToFront: Attempt to violate Lock Task Mode");
return;
}
final ActivityRecord prev = mStackSupervisor.topRunningActivityLocked();
if (prev != null && prev.isRecentsActivity()) {
task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
}
mStackSupervisor.findTaskToMoveToFrontLocked(task, flags, options, "moveTaskToFront",
false /* forceNonResizable */);
} finally {
Binder.restoreCallingIdentity(origId);
}
ActivityOptions.abort(options);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToFrontLocked
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
|
moveTaskToFrontLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] getStreamBytes(PRStream stream, RandomAccessFileOrArray file) throws IOException {
PdfObject filter = getPdfObjectRelease(stream.get(PdfName.FILTER));
byte[] b = getStreamBytesRaw(stream, file);
ArrayList filters = new ArrayList();
if (filter != null) {
if (filter.isName())
filters.add(filter);
else if (filter.isArray())
filters = ((PdfArray)filter).getArrayList();
}
ArrayList dp = new ArrayList();
PdfObject dpo = getPdfObjectRelease(stream.get(PdfName.DECODEPARMS));
if (dpo == null || (!dpo.isDictionary() && !dpo.isArray()))
dpo = getPdfObjectRelease(stream.get(PdfName.DP));
if (dpo != null) {
if (dpo.isDictionary())
dp.add(dpo);
else if (dpo.isArray())
dp = ((PdfArray)dpo).getArrayList();
}
String name;
for (int j = 0; j < filters.size(); ++j) {
name = ((PdfName)getPdfObjectRelease((PdfObject)filters.get(j))).toString();
if (name.equals("/FlateDecode") || name.equals("/Fl")) {
b = FlateDecode(b);
PdfObject dicParam = null;
if (j < dp.size()) {
dicParam = (PdfObject)dp.get(j);
b = decodePredictor(b, dicParam);
}
}
else if (name.equals("/ASCIIHexDecode") || name.equals("/AHx"))
b = ASCIIHexDecode(b);
else if (name.equals("/ASCII85Decode") || name.equals("/A85"))
b = ASCII85Decode(b);
else if (name.equals("/LZWDecode")) {
b = LZWDecode(b);
PdfObject dicParam = null;
if (j < dp.size()) {
dicParam = (PdfObject)dp.get(j);
b = decodePredictor(b, dicParam);
}
}
else if (name.equals("/Crypt")) {
}
else
throw new UnsupportedPdfException("The filter " + name + " is not supported.");
}
return b;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStreamBytes
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getStreamBytes
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isDeviceProvisioned() {
return Settings.Global.getInt(
mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceProvisioned
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
isDeviceProvisioned
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSystemProcess() {
try {
ServiceManager.addService(Context.ACTIVITY_SERVICE, this, /* allowIsolated= */ true,
DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_NORMAL | DUMP_FLAG_PROTO);
ServiceManager.addService(ProcessStats.SERVICE_NAME, mProcessStats);
ServiceManager.addService("meminfo", new MemBinder(this), /* allowIsolated= */ false,
DUMP_FLAG_PRIORITY_HIGH);
ServiceManager.addService("gfxinfo", new GraphicsBinder(this));
ServiceManager.addService("dbinfo", new DbBinder(this));
mAppProfiler.setCpuInfoService();
ServiceManager.addService("permission", new PermissionController(this));
ServiceManager.addService("processinfo", new ProcessInfoService(this));
ServiceManager.addService("cacheinfo", new CacheBinder(this));
ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
"android", STOCK_PM_FLAGS | MATCH_SYSTEM_ONLY);
mSystemThread.installSystemApplicationInfo(info, getClass().getClassLoader());
synchronized (this) {
ProcessRecord app = mProcessList.newProcessRecordLocked(info, info.processName,
false,
0,
false,
0,
null,
new HostingRecord(HostingRecord.HOSTING_TYPE_SYSTEM));
app.setPersistent(true);
app.setPid(MY_PID);
app.mState.setMaxAdj(ProcessList.SYSTEM_ADJ);
app.makeActive(mSystemThread.getApplicationThread(), mProcessStats);
app.mProfile.addHostingComponentType(HOSTING_COMPONENT_TYPE_SYSTEM);
addPidLocked(app);
updateLruProcessLocked(app, false, null);
updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
}
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(
"Unable to find android system package", e);
}
// Start watching app ops after we and the package manager are up and running.
mAppOpsService.startWatchingMode(AppOpsManager.OP_RUN_IN_BACKGROUND, null,
new IAppOpsCallback.Stub() {
@Override public void opChanged(int op, int uid, String packageName) {
if (op == AppOpsManager.OP_RUN_IN_BACKGROUND && packageName != null) {
if (getAppOpsManager().checkOpNoThrow(op, uid, packageName)
!= AppOpsManager.MODE_ALLOWED) {
runInBackgroundDisabled(uid);
}
}
}
});
final int[] cameraOp = {AppOpsManager.OP_CAMERA};
mAppOpsService.startWatchingActive(cameraOp, new IAppOpsActiveCallback.Stub() {
@Override
public void opActiveChanged(int op, int uid, String packageName, String attributionTag,
boolean active, @AttributionFlags int attributionFlags,
int attributionChainId) {
cameraActiveChanged(uid, active);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemProcess
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
setSystemProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_SYSTEM_INSTALL_CODE) {
if (resultCode == RESULT_OK) {
Log.d(TAG, "credential is added: " + mCredentials.getName());
Toast.makeText(this, getString(R.string.cert_is_added,
mCredentials.getName()), Toast.LENGTH_LONG).show();
if (mCredentials.hasCaCerts()) {
// more work to do, don't finish just yet
new InstallCaCertsToKeyChainTask().execute();
return;
}
setResult(RESULT_OK);
} else {
Log.d(TAG, "credential not saved, err: " + resultCode);
toastErrorAndFinish(R.string.cert_not_saved);
}
} else {
Log.w(TAG, "unknown request code: " + requestCode);
}
finish();
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-2422
- Severity: HIGH
- CVSS Score: 9.3
Description: Trust CA certificates added for the whole OS only
Excludes any CA certificates installed for wifi-only from being used for
anything else. Does not take effect retroactively against certs which
were already installed.
The CAs will continue to be saved to a part of the keystore accessible
by services running under WIFI_UID.
Bug: 26324357
Bug: 25780055
Change-Id: Ifeb9daf24c9f9a22b2b2daf247d5622c707c9885
Function: onActivityResult
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
Fixed Code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_SYSTEM_INSTALL_CODE) {
if (resultCode == RESULT_OK) {
Log.d(TAG, "credential is added: " + mCredentials.getName());
Toast.makeText(this, getString(R.string.cert_is_added,
mCredentials.getName()), Toast.LENGTH_LONG).show();
if (mCredentials.hasCaCerts()
&& mCredentials.getInstallAsUid() == KeyStore.UID_SELF) {
// more work to do, don't finish just yet
new InstallCaCertsToKeyChainTask().execute();
return;
}
setResult(RESULT_OK);
} else {
Log.d(TAG, "credential not saved, err: " + resultCode);
toastErrorAndFinish(R.string.cert_not_saved);
}
} else {
Log.w(TAG, "unknown request code: " + requestCode);
}
finish();
}
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
onActivityResult
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 1
|
Analyze the following code function for security vulnerabilities
|
private void validateUnsupportedTemplateConfigs(ServiceProvider serviceProvider)
throws IdentityApplicationManagementException {
List<String> validationMsg = new ArrayList<>();
if (serviceProvider.getInboundAuthenticationConfig() != null) {
validationMsg.add("Inbound configurations are not supported.");
}
if (serviceProvider.getApplicationID() != 0) {
validationMsg.add("Application ID is not supported.");
}
if (serviceProvider.getApplicationName() != null) {
validationMsg.add("Application name is not supported.");
}
if (serviceProvider.getDescription() != null) {
validationMsg.add("Application description is not supported.");
}
if (serviceProvider.getCertificateContent() != null) {
validationMsg.add("Application certificate is not supported.");
}
if (!validationMsg.isEmpty()) {
throw new IdentityApplicationManagementValidationException(validationMsg.toArray(new String[0]));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateUnsupportedTemplateConfigs
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
|
validateUnsupportedTemplateConfigs
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loadPrivatePackages(final VolumeInfo vol) {
mHandler.post(new Runnable() {
@Override
public void run() {
loadPrivatePackagesInner(vol);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadPrivatePackages
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
loadPrivatePackages
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDarkmodeEnabled(Boolean darkmodeEnabled) {
this.darkmodeEnabled = darkmodeEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDarkmodeEnabled
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
setDarkmodeEnabled
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectInputStream createObjectInputStream(final HierarchicalStreamReader reader, final DataHolder dataHolder)
throws IOException {
return new CustomObjectInputStream(new CustomObjectInputStream.StreamCallback() {
public Object readFromStream() throws EOFException {
if (!reader.hasMoreChildren()) {
throw new EOFException();
}
reader.moveDown();
final Object result = unmarshal(reader, null, dataHolder);
reader.moveUp();
return result;
}
public Map readFieldsFromStream() throws IOException {
throw new NotActiveException("not in call to readObject");
}
public void defaultReadObject() throws NotActiveException {
throw new NotActiveException("not in call to readObject");
}
public void registerValidation(ObjectInputValidation validation, int priority) throws NotActiveException {
throw new NotActiveException("stream inactive");
}
public void close() {
reader.close();
}
}, classLoaderReference);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-43859
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Describe and fix CVE-2021-43859.
Function: createObjectInputStream
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
Fixed Code:
public ObjectInputStream createObjectInputStream(final HierarchicalStreamReader reader, DataHolder dataHolder)
throws IOException {
if (collectionUpdateLimit >= 0) {
if (dataHolder == null) {
dataHolder = new MapBackedDataHolder();
}
dataHolder.put(COLLECTION_UPDATE_LIMIT, new Integer(collectionUpdateLimit));
dataHolder.put(COLLECTION_UPDATE_SECONDS, new Integer(0));
}
final DataHolder dh = dataHolder;
return new CustomObjectInputStream(new CustomObjectInputStream.StreamCallback() {
public Object readFromStream() throws EOFException {
if (!reader.hasMoreChildren()) {
throw new EOFException();
}
reader.moveDown();
final Object result = unmarshal(reader, null, dh);
reader.moveUp();
return result;
}
public Map readFieldsFromStream() throws IOException {
throw new NotActiveException("not in call to readObject");
}
public void defaultReadObject() throws NotActiveException {
throw new NotActiveException("not in call to readObject");
}
public void registerValidation(ObjectInputValidation validation, int priority) throws NotActiveException {
throw new NotActiveException("stream inactive");
}
public void close() {
reader.close();
}
}, classLoaderReference);
}
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
createObjectInputStream
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 1
|
Analyze the following code function for security vulnerabilities
|
public void savePage(EntityReference reference) throws Exception
{
savePage(reference, null, null, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: savePage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
savePage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void release() {
deinitialize();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: release
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
|
release
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void startLaunchPowerMode(@PowerModeReason int reason) {
if (mPowerManagerInternal != null) {
mPowerManagerInternal.setPowerMode(Mode.LAUNCH, true);
}
mLaunchPowerModeReasons |= reason;
if ((reason & POWER_MODE_REASON_UNKNOWN_VISIBILITY) != 0) {
if (mRetainPowerModeAndTopProcessState) {
mH.removeMessages(H.END_POWER_MODE_UNKNOWN_VISIBILITY_MSG);
}
mRetainPowerModeAndTopProcessState = true;
mH.sendEmptyMessageDelayed(H.END_POWER_MODE_UNKNOWN_VISIBILITY_MSG,
POWER_MODE_UNKNOWN_VISIBILITY_TIMEOUT_MS);
Slog.d(TAG, "Temporarily retain top process state for launching app");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLaunchPowerMode
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
|
startLaunchPowerMode
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEmpty() {
return headers.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEmpty
File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
isEmpty
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void internalError(final Exception cause) {
logError("Internal Server Error on " + request().getUri(), cause);
if (this.api_version > 0) {
// always default to the latest version of the error formatter since we
// need to return something
switch (this.api_version) {
case 1:
default:
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR,
serializer.formatErrorV1(cause));
}
return;
}
ThrowableProxy tp = new ThrowableProxy(cause);
tp.calculatePackagingData();
final String pretty_exc = ThrowableProxyUtil.asString(tp);
tp = null;
if (hasQueryStringParam("json")) {
// 32 = 10 + some extra space as exceptions always have \t's to escape.
final StringBuilder buf = new StringBuilder(32 + pretty_exc.length());
buf.append("{\"err\":\"");
HttpQuery.escapeJson(pretty_exc, buf);
buf.append("\"}");
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR, buf);
} else {
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR,
makePage("Internal Server Error", "Houston, we have a problem",
"<blockquote>"
+ "<h1>Internal Server Error</h1>"
+ "Oops, sorry but your request failed due to a"
+ " server error.<br/><br/>"
+ "Please try again in 30 seconds.<pre>"
+ pretty_exc
+ "</pre></blockquote>"));
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-25827
- Severity: MEDIUM
- CVSS Score: 6.1
Description: Fix for #2269 and #2267 XSS vulnerability.
Escaping the user supplied input when outputing the HTML for the old BadRequest
HTML handlers should help. Thanks to the reporters.
Fixes CVE-2018-13003.
Function: internalError
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
Fixed Code:
@Override
public void internalError(final Exception cause) {
logError("Internal Server Error on " + request().getUri(), cause);
if (this.api_version > 0) {
// always default to the latest version of the error formatter since we
// need to return something
switch (this.api_version) {
case 1:
default:
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR,
serializer.formatErrorV1(cause));
}
return;
}
ThrowableProxy tp = new ThrowableProxy(cause);
tp.calculatePackagingData();
final String pretty_exc = ThrowableProxyUtil.asString(tp);
tp = null;
if (hasQueryStringParam("json")) {
// 32 = 10 + some extra space as exceptions always have \t's to escape.
final StringBuilder buf = new StringBuilder(32 + pretty_exc.length());
buf.append("{\"err\":\"");
HttpQuery.escapeJson(pretty_exc, buf);
buf.append("\"}");
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR, buf);
} else {
String response = "";
if (pretty_exc != null) {
response = HtmlEscapers.htmlEscaper().escape(pretty_exc);
}
sendReply(HttpResponseStatus.INTERNAL_SERVER_ERROR,
makePage("Internal Server Error", "Houston, we have a problem",
"<blockquote>"
+ "<h1>Internal Server Error</h1>"
+ "Oops, sorry but your request failed due to a"
+ " server error.<br/><br/>"
+ "Please try again in 30 seconds.<pre>"
+ response
+ "</pre></blockquote>"));
}
}
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
internalError
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Mono<ActionExecutionResult> executeParameterized(APIConnection connection,
ExecuteActionDTO executeActionDTO,
DatasourceConfiguration datasourceConfiguration,
ActionConfiguration actionConfiguration) {
final List<Property> properties = actionConfiguration.getPluginSpecifiedTemplates();
List<Map.Entry<String, String>> parameters = new ArrayList<>();
String variables = getValueSafelyFromPropertyList(properties, QUERY_VARIABLES_INDEX, String.class);
Boolean smartSubstitution = this.smartSubstitutionUtils.isSmartSubstitutionEnabled(properties);
if (TRUE.equals(smartSubstitution)) {
/* Apply smart JSON substitution logic to mustache binding values in query variables */
if (!isBlank(variables)) {
List<String> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(variables);
// Replace all the bindings with a ? as expected in a prepared statement.
String updatedVariables = MustacheHelper.replaceMustacheWithPlaceholder(variables, mustacheKeysInOrder);
try {
updatedVariables = (String) smartSubstitutionOfBindings(updatedVariables,
mustacheKeysInOrder,
executeActionDTO.getParams(),
parameters,
false);
setValueSafelyInPropertyList(properties, QUERY_VARIABLES_INDEX, updatedVariables);
} catch (AppsmithPluginException e) {
ActionExecutionResult errorResult = new ActionExecutionResult();
errorResult.setIsExecutionSuccess(false);
errorResult.setErrorInfo(e);
errorResult.setStatusCode(AppsmithPluginError.PLUGIN_ERROR.getAppErrorCode().toString());
return Mono.just(errorResult);
}
}
/* Apply smart substitution logic to query body */
String query = actionConfiguration.getBody();
if (!isBlank(query)) {
List<String> mustacheKeysInOrder = MustacheHelper.extractMustacheKeysInOrder(query);
// Replace all the bindings with a ? as expected in a prepared statement.
String updatedQuery = MustacheHelper.replaceMustacheWithPlaceholder(query, mustacheKeysInOrder);
try {
updatedQuery = (String) smartSubstitutionOfBindings(updatedQuery,
mustacheKeysInOrder,
executeActionDTO.getParams(),
parameters,
true);
actionConfiguration.setBody(updatedQuery);
} catch (AppsmithPluginException e) {
ActionExecutionResult errorResult = new ActionExecutionResult();
errorResult.setIsExecutionSuccess(false);
errorResult.setErrorInfo(e);
errorResult.setStatusCode(AppsmithPluginError.PLUGIN_ERROR.getAppErrorCode().toString());
return Mono.just(errorResult);
}
}
}
prepareConfigurationsForExecution(executeActionDTO, actionConfiguration, datasourceConfiguration);
if (isBlank(variables)) {
setValueSafelyInPropertyList(properties, QUERY_VARIABLES_INDEX, "{}");
}
/* Check if the query body and query variables have the correct GraphQL syntax. */
try {
validateBodyAndVariablesSyntax(actionConfiguration);
} catch (AppsmithPluginException e) {
return Mono.error(e);
}
if (actionConfiguration.getPaginationType() != null && !PaginationType.NONE.equals(actionConfiguration.getPaginationType())) {
updateVariablesWithPaginationValues(actionConfiguration, executeActionDTO);
}
// Filter out any empty headers
headerUtils.removeEmptyHeaders(actionConfiguration);
return this.executeCommon(connection, datasourceConfiguration, actionConfiguration, parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeParameterized
File: app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java
Repository: appsmithorg/appsmith
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-4096
|
MEDIUM
| 6.5
|
appsmithorg/appsmith
|
executeParameterized
|
app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java
|
769719ccfe667f059fe0b107a19ec9feb90f2e40
| 0
|
Analyze the following code function for security vulnerabilities
|
@SupportsCoexistence
@RequiresPermission(value = MANAGE_DEVICE_POLICY_INPUT_METHODS, conditional = true)
public boolean setPermittedInputMethods(
@Nullable ComponentName admin, List<String> packageNames) {
if (mService != null) {
try {
return mService.setPermittedInputMethods(
admin, mContext.getPackageName(), packageNames, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPermittedInputMethods
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
|
setPermittedInputMethods
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void goToOffset(int offset) {
if (mWebContents != null) mWebContents.getNavigationController().goToOffset(offset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: goToOffset
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
goToOffset
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private ModelAndView buildNotFound(String pipelineName, String counterOrLabel, String stageName,
String stageCounter,
String buildName) {
return ResponseCodeView.create(SC_NOT_FOUND, String.format("Job %s/%s/%s/%s/%s not found.", pipelineName,
counterOrLabel, stageName, stageCounter, buildName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildNotFound
File: server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-43289
|
MEDIUM
| 5
|
gocd
|
buildNotFound
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onHide() {
assert mNativeContentViewCore != 0;
hidePopups();
setInjectedAccessibility(false);
nativeOnHide(mNativeContentViewCore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHide
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onHide
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setPasswordMinimumLowerCase(@NonNull ComponentName admin, int length) {
if (mService != null) {
try {
mService.setPasswordMinimumLowerCase(admin, length, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordMinimumLowerCase
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
|
setPasswordMinimumLowerCase
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static DocumentBuilderFactory safeDocumentBuilderFactory() {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
try {
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
dbf.setFeature("http://apache.org/xml/features/dom/create-entity-ref-nodes", false);
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
} catch (ParserConfigurationException e) {
log.warn(e);
}
return dbf;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: safeDocumentBuilderFactory
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
safeDocumentBuilderFactory
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String[] setPackagesSuspended(ComponentName who, String callerPackage,
String[] packageNames, boolean suspended) {
final CallerIdentity caller = getCallerIdentity(who, callerPackage);
ActiveAdmin admin;
if (isUnicornFlagEnabled()) {
EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin(
who,
MANAGE_DEVICE_POLICY_PACKAGE_STATE,
caller.getPackageName(),
caller.getUserId());
admin = enforcingAdmin.getActiveAdmin();
} else {
Preconditions.checkCallAuthorization((caller.hasAdminComponent()
&& (isProfileOwner(caller) || isDefaultDeviceOwner(caller)))
|| (caller.hasPackage() && isCallerDelegate(caller,
DELEGATION_PACKAGE_ACCESS)));
synchronized (getLockObject()) {
admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
}
}
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_PACKAGES_SUSPENDED);
// Must remove the exempt apps from the input before calling PM, then add them back to
// the array returned to the caller
Set<String> exemptApps = new HashSet<>();
packageNames = populateNonExemptAndExemptFromPolicyApps(packageNames, exemptApps);
String[] nonSuspendedPackages = null;
synchronized (getLockObject()) {
long id = mInjector.binderClearCallingIdentity();
try {
nonSuspendedPackages = mInjector.getPackageManagerInternal()
.setPackagesSuspendedByAdmin(caller.getUserId(), packageNames, suspended);
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PACKAGES_SUSPENDED)
.setAdmin(caller.getPackageName())
.setBoolean(/* isDelegate */ who == null)
.setStrings(packageNames)
.write();
if (nonSuspendedPackages == null) {
Slogf.w(LOG_TAG, "PM failed to suspend packages (%s)", Arrays.toString(packageNames));
return packageNames;
}
ArraySet<String> changed = new ArraySet<>(packageNames);
if (suspended) {
// Only save those packages that are actually suspended. If a package is exempt or is
// unsuspendable, it is skipped.
changed.removeAll(List.of(nonSuspendedPackages));
} else {
// If an admin tries to unsuspend a package that is either exempt or is not
// suspendable, drop it from the stored list assuming it must be already unsuspended.
changed.addAll(exemptApps);
}
synchronized (getLockObject()) {
ArraySet<String> current = new ArraySet<>(admin.suspendedPackages);
if (suspended) {
current.addAll(changed);
} else {
current.removeAll(changed);
}
admin.suspendedPackages = current.isEmpty() ? null : new ArrayList<>(current);
saveSettingsLocked(caller.getUserId());
}
if (exemptApps.isEmpty()) {
return nonSuspendedPackages;
}
String[] result = buildNonSuspendedPackagesUnionArray(nonSuspendedPackages, exemptApps);
if (VERBOSE_LOG) Slogf.v(LOG_TAG, "Returning %s", Arrays.toString(result));
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPackagesSuspended
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
|
setPackagesSuspended
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean writeGranted(int[] grantResults, String[] permission) {
for (int i = 0; i < grantResults.length; ++i) {
if (Manifest.permission.WRITE_EXTERNAL_STORAGE.equals(permission[i])) {
return grantResults[i] == PackageManager.PERMISSION_GRANTED;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeGranted
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
writeGranted
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void verifyPendingInstall(int id, int verificationCode) throws RemoteException {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.PACKAGE_VERIFICATION_AGENT,
"Only package verification agents can verify applications");
final Message msg = mHandler.obtainMessage(PACKAGE_VERIFIED);
final PackageVerificationResponse response = new PackageVerificationResponse(
verificationCode, Binder.getCallingUid());
msg.arg1 = id;
msg.obj = response;
mHandler.sendMessage(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyPendingInstall
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
verifyPendingInstall
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public long insertOrThrow(String table, String nullColumnHack, ContentValues values)
throws SQLException {
return insertWithOnConflict(table, nullColumnHack, values, CONFLICT_NONE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertOrThrow
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
insertOrThrow
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseRepairResults(final RepairRule rule, final List<Element> elements) throws GameParseException {
if (elements.size() == 0) {
throw newGameParseException("no results for rule:" + rule.getName());
}
for (final Element current : elements) {
// must find either a resource or a unit with the given name
NamedAttachable result = getResource(current, "resourceOrUnit", false);
if (result == null) {
result = getUnitType(current, "resourceOrUnit", false);
}
if (result == null) {
throw newGameParseException("Could not find resource or unit" + current.getAttribute("resourceOrUnit"));
}
final int quantity = Integer.parseInt(current.getAttribute("quantity"));
rule.addResult(result, quantity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRepairResults
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseRepairResults
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
public CauseOfBlockage getCauseOfBlockage() {
// Block builds until they are done with post-production
if (isLogUpdated() && !isConcurrentBuild())
return new BecauseOfBuildInProgress(getLastBuild());
if (blockBuildWhenDownstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingDownstream();
if (bup!=null)
return new BecauseOfDownstreamBuildInProgress(bup);
}
if (blockBuildWhenUpstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingUpstream();
if (bup!=null)
return new BecauseOfUpstreamBuildInProgress(bup);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCauseOfBlockage
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getCauseOfBlockage
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static HttpRequest put(final String destination) {
return new HttpRequest()
.method(HttpMethod.PUT)
.set(destination);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
put
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPasswordHistoryLength(ComponentName who, int length, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final int userId = mInjector.userHandleGetCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent);
if (ap.passwordHistoryLength != length) {
ap.passwordHistoryLength = length;
updatePasswordValidityCheckpointLocked(userId, parent);
saveSettingsLocked(userId);
}
}
if (SecurityLog.isLoggingEnabled()) {
final int affectedUserId = parent ? getProfileParentId(userId) : userId;
SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_HISTORY_LENGTH_SET,
who.getPackageName(), userId, affectedUserId, length);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordHistoryLength
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
|
setPasswordHistoryLength
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
static public AsymmetricKeyParameter generatePrivateKeyParameter(
PrivateKey key)
throws InvalidKeyException
{
if (key instanceof DHPrivateKey)
{
DHPrivateKey k = (DHPrivateKey)key;
return new DHPrivateKeyParameters(k.getX(),
new DHParameters(k.getParams().getP(), k.getParams().getG(), null, k.getParams().getL()));
}
throw new InvalidKeyException("can't identify DH private key.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generatePrivateKeyParameter
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/DHUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
generatePrivateKeyParameter
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/DHUtil.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean checkHoldingPermissionsLocked(
IPackageManager pm, ProviderInfo pi, GrantUri grantUri, int uid, final int modeFlags) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG,
"checkHoldingPermissionsLocked: uri=" + grantUri + " uid=" + uid);
if (UserHandle.getUserId(uid) != grantUri.sourceUserId) {
if (ActivityManager.checkComponentPermission(INTERACT_ACROSS_USERS, uid, -1, true)
!= PERMISSION_GRANTED) {
return false;
}
}
return checkHoldingPermissionsInternalLocked(pm, pi, grantUri, uid, modeFlags, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkHoldingPermissionsLocked
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
|
checkHoldingPermissionsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String buildCustomPlanSql(String planKey, ID projectId) {
if (ID.isId(planKey)) {
return "projectPlanId = '" + planKey + "'";
}
String planValue = planKey.split("-")[1];
String baseSql = "projectId = '" + projectId + "' and ";
if (planKey.startsWith(ProjectController.GROUP_PRIORITY)) {
return baseSql + "priority = " + planValue;
}
final DateFormat dtf = CalendarUtils.getUTCDateTimeFormat();
final String today = dtf.format(CalendarUtils.now());
if (planKey.startsWith(ProjectController.GROUP_DEADLINE)) {
if ("1".equals(planValue)) {
return baseSql + String.format("status = 0 and deadline <= '%s'", today);
} else if ("2".equals(planValue)) {
return baseSql + String.format("status = 0 and (deadline > '%s' and deadline <= '%s 23:59:59')",
today, today.split(" ")[0]);
} else if ("3".equals(planValue)) {
return baseSql + String.format("status = 0 and (deadline > '%s 23:59:59' and deadline <= '%s')",
today.split(" ")[0], dtf.format(CalendarUtils.addDay(7)));
} else if ("4".equals(planValue)) {
return baseSql + String.format("status = 0 and (deadline is null or deadline > '%s')",
dtf.format(CalendarUtils.addDay(7)));
}
}
else if (planKey.startsWith(ProjectController.GROUP_MODIFIED)) {
if ("1".equals(planValue)) {
return baseSql + MessageFormat.format("modifiedOn >= ''{0} 00:00:00'' and modifiedOn <= ''{0} 23:59:59''",
today.split(" ")[0]);
} else if ("2".equals(planValue)) {
return baseSql + String.format("modifiedOn >= '%s' and modifiedOn < '%s 00:00:00'",
dtf.format(CalendarUtils.addDay(-7)), today.split(" ")[0]);
} else if ("3".equals(planValue)) {
return baseSql + String.format("modifiedOn > '%s' and modifiedOn < '%s'",
dtf.format(CalendarUtils.addDay(-14)), dtf.format(CalendarUtils.addDay(-7)));
} else if ("4".equals(planValue)) {
return baseSql + String.format("modifiedOn < '%s'", dtf.format(CalendarUtils.addDay(-14)));
}
}
throw new InvalidParameterException(Language.L("无效请求参数 (%s=%s)", "id", planKey));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildCustomPlanSql
File: src/main/java/com/rebuild/web/project/ProjectTaskController.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
buildCustomPlanSql
|
src/main/java/com/rebuild/web/project/ProjectTaskController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static DefaultSVNOptions createDefaultSVNOptions() {
DefaultSVNOptions defaultOptions = SVNWCUtil.createDefaultOptions(true);
DescriptorImpl descriptor = Hudson.getInstance() == null ? null : Hudson.getInstance().getDescriptorByType(DescriptorImpl.class);
if (defaultOptions != null && descriptor != null) {
defaultOptions.setAuthStorageEnabled(descriptor.isStoreAuthToDisk());
}
return defaultOptions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createDefaultSVNOptions
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
createDefaultSVNOptions
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onQsExpansionStarted() {
onQsExpansionStarted(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onQsExpansionStarted
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onQsExpansionStarted
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
void findTaskToMoveToFrontLocked(TaskRecord task, int flags, Bundle options, String reason) {
if ((flags & ActivityManager.MOVE_TASK_NO_USER_ACTION) == 0) {
mUserLeaving = true;
}
if ((flags & ActivityManager.MOVE_TASK_WITH_HOME) != 0) {
// Caller wants the home activity moved with it. To accomplish this,
// we'll just indicate that this task returns to the home task.
task.setTaskToReturnTo(HOME_ACTIVITY_TYPE);
}
if (task.stack == null) {
Slog.e(TAG, "findTaskToMoveToFrontLocked: can't move task="
+ task + " to front. Stack is null");
return;
}
task.stack.moveTaskToFrontLocked(task, false /* noAnimation */, options,
task.getTopActivity() == null ? null : task.getTopActivity().appTimeTracker,
reason);
if (DEBUG_STACK) Slog.d(TAG_STACK,
"findTaskToMoveToFront: moved to front of stack=" + task.stack);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findTaskToMoveToFrontLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
findTaskToMoveToFrontLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onResult(IAccountManagerResponse response, Bundle result) {
if (result == null) {
Log.e(TAG, "the result is unexpectedly null", new Exception());
}
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, getClass().getSimpleName() + " calling onResult() on response "
+ response);
}
try {
response.onResult(result);
} catch (RemoteException e) {
// if the caller is dead then there is no one to care about remote
// exceptions
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "failure while notifying response", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResult
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
|
onResult
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private Document parseAndroidManifest(ResourceFile androidManifest) {
String content = androidManifest.loadContent().getText().getCodeStr();
return parseXml(content);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseAndroidManifest
File: jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
Repository: skylot/jadx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0219
|
MEDIUM
| 4.3
|
skylot/jadx
|
parseAndroidManifest
|
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
|
d22db30166e7cb369d72be41382bb63ac8b81c52
| 0
|
Analyze the following code function for security vulnerabilities
|
Class<? extends Fragment> getFragmentClass() {
return ChooseLockPasswordFragment.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFragmentClass
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
|
getFragmentClass
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.