instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private void hidePrepareFileToast(final Toast prepareFileToast) {
if (prepareFileToast != null && activity != null) {
activity.runOnUiThread(prepareFileToast::cancel);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hidePrepareFileToast
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
|
hidePrepareFileToast
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/verifyRegistrationCode", method = RequestMethod.POST,
consumes = APPLICATION_FORM_URLENCODED_VALUE)
public String verifyRegistrationCode(
@RequestParam Map<String, String> parameters, HttpSession session,
Model model)
{
try
{
String code = parameters.get("code");
String userDN = (String)session.getAttribute("userDN");
ExtendedResult result = pool.processExtendedOperation(new
ConsumeSingleUseTokenExtendedRequest(
userDN, TOKEN_ID, code));
if(result.getResultCode() != ResultCode.SUCCESS)
{
log.error("Verification code error.");
// add an error attribute to display an error
model.addAttribute("error", "Failed to verify code.");
// add the result attribute to obtain recipient ID and delivery
// mechanism
model.addAttribute("result", session.getAttribute("result"));
return "registration-verify";
}
// enable the account after verifying the Single-Use-Token
pool.modify(new ModifyRequest(userDN,
new Modification(ModificationType.DELETE,
"ds-pwp-account-disabled")));
//clean up the session
session.removeAttribute("result");
return "registration-success";
}
catch(LDAPException e)
{
log.error(e.getMessage(), e);
model.addAttribute("result", session.getAttribute("result"));
return "registration-verify";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyRegistrationCode
File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java
Repository: pingidentity/ssam
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25084
|
MEDIUM
| 4
|
pingidentity/ssam
|
verifyRegistrationCode
|
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
|
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toXML(XWikiContext context) throws XWikiException
{
return toXML(true, false, false, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toXML
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toXML
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTaskDescription(ActivityManager.TaskDescription taskDescription) {
final Bitmap icon = getBitmapFromXmlResource(R.drawable.ic_launcher_settings);
taskDescription.setIcon(icon);
super.setTaskDescription(taskDescription);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTaskDescription
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
setTaskDescription
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> List<T> searchGroup(List<String> searchBases, String filter, Mapper<T> mapper) {
final List<T> searchResults = new ArrayList<>();
for (String searchBase : searchBases) {
try {
final SearchRequest searchRequest = new SearchRequestImpl()
.setScope(SearchScope.SUBTREE)
.addAttributes("dn")
.setSizeLimit(0)
.setFilter(filter)
.setTimeLimit(ldapConfiguration.getSearchTimeout())
.setBase(new Dn(searchBase));
searchResults.addAll(ldapConnectionTemplate.search(searchRequest, mapper));
} catch (LdapException e) {
LOG.error(e.getMessage(), e);
}
}
return searchResults;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchGroup
File: src/main/java/cd/go/apacheds/ApacheDsLdapClient.java
Repository: gocd/gocd-ldap-authentication-plugin
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-24832
|
MEDIUM
| 4.9
|
gocd/gocd-ldap-authentication-plugin
|
searchGroup
|
src/main/java/cd/go/apacheds/ApacheDsLdapClient.java
|
87fa7dac5d899b3960ab48e151881da4793cfcc3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CertRevokeRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element requestElement = document.getDocumentElement();
return fromDOM(requestElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
Repository: dogtagpki/pki
Fixed Code:
public static CertRevokeRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element requestElement = document.getDocumentElement();
return fromDOM(requestElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private ModelAndView putArtifact(JobIdentifier jobIdentifier, String filePath,
InputStream inputStream) throws Exception {
File artifact = artifactsService.findArtifact(jobIdentifier, filePath);
if (artifactsService.saveOrAppendFile(artifact, inputStream)) {
return FileModelAndView.fileAppended(filePath);
} else {
return FileModelAndView.errorSavingFile(filePath);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putArtifact
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
|
putArtifact
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BeanDeserializer withObjectIdReader(ObjectIdReader oir) {
return new BeanDeserializer(this, oir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withObjectIdReader
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withObjectIdReader
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
private void invokeTextHandler(final BufferedTextMessage data, final HandlerWrapper handler, final boolean finalFragment) {
final String message = data.getData();
session.getContainer().invokeEndpointMethod(executor, new Runnable() {
@Override
public void run() {
MessageHandler mHandler = handler.getHandler();
try {
if (mHandler instanceof MessageHandler.Partial) {
if (handler.decodingNeeded) {
Object object = getSession().getEncoding().decodeText(handler.getMessageType(), message);
((MessageHandler.Partial) handler.getHandler()).onMessage(object, finalFragment);
} else if (handler.getMessageType() == String.class) {
((MessageHandler.Partial) handler.getHandler()).onMessage(message, finalFragment);
} else if (handler.getMessageType() == Reader.class) {
((MessageHandler.Partial) handler.getHandler()).onMessage(new StringReader(message), finalFragment);
}
} else {
if(handler.decodingNeeded) {
Object object = getSession().getEncoding().decodeText(handler.getMessageType(), message);
((MessageHandler.Whole) handler.getHandler()).onMessage(object);
} else if (handler.getMessageType() == String.class) {
((MessageHandler.Whole) handler.getHandler()).onMessage(message);
} else if (handler.getMessageType() == Reader.class) {
((MessageHandler.Whole) handler.getHandler()).onMessage(new StringReader(message));
}
}
} catch (Exception e) {
invokeOnError(e);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeTextHandler
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
invokeTextHandler
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getHyphen(int line) {
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHyphen
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getHyphen
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean requestAssistContextExtras(int requestType, IResultReceiver receiver,
IBinder activityToken) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(requestType);
data.writeStrongBinder(receiver.asBinder());
data.writeStrongBinder(activityToken);
mRemote.transact(REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestAssistContextExtras
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
requestAssistContextExtras
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getTaskOverlay() {
return mTaskOverlay;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskOverlay
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getTaskOverlay
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
// Rebuild HTTP Client according to the new "debugging" value.
this.httpClient = buildHttpClient();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDebugging
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setDebugging
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable List<ComponentName> getActiveAdmins() {
throwIfParentInstance("getActiveAdmins");
return getActiveAdminsAsUser(myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdmins
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
|
getActiveAdmins
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNewPostNotificationAllowed() {
return isNotificationsAllowed() && CONF.emailsForNewPostsAllowed();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNewPostNotificationAllowed
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
|
isNewPostNotificationAllowed
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private static List<Object> normalize(final List<Object> services, final Env env,
final RouteMetadata classInfo, final boolean caseSensitiveRouting) {
List<Object> result = new ArrayList<>();
List<Object> snapshot = services;
/** modules, routes, parsers, renderers and websockets */
snapshot.forEach(candidate -> {
if (candidate instanceof Route.Definition) {
result.add(candidate);
} else if (candidate instanceof MvcClass) {
MvcClass mvcRoute = ((MvcClass) candidate);
Class<?> mvcClass = mvcRoute.routeClass;
String path = ((MvcClass) candidate).path;
MvcRoutes.routes(env, classInfo, path, caseSensitiveRouting, mvcClass)
.forEach(route -> result.add(mvcRoute.apply(route)));
} else {
result.add(candidate);
}
});
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalize
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
normalize
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "Gets existing composite solution details for specified solutionId and version")
@RequestMapping(value = "/readCompositeSolutionGraph", method = RequestMethod.GET, produces = "text/plain")
@ResponseBody
public String readCompositeSolutionGraph(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionId", required = true) String solutionId,
@RequestParam(value = "version", required = true) String version) {
logger.debug(EELFLoggerDelegator.debugLogger, " fetchJsonTOSCA() : Begin");
String result;
try {
result = solutionService.readCompositeSolutionGraph(userId, solutionId, version);
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, "Failed to read the ComposietSolution", e);
result = "";
}
logger.debug(EELFLoggerDelegator.debugLogger, " fetchJsonTOSCA() : End");
return result;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2018-25097
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Senitization for CSS Vulnerability
Issue-Id : ACUMOS-1650
Description : Senitization for CSS Vulnerability - Design Studio
Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d
Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com>
Function: readCompositeSolutionGraph
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
Fixed Code:
@ApiOperation(value = "Gets existing composite solution details for specified solutionId and version")
@RequestMapping(value = "/readCompositeSolutionGraph", method = RequestMethod.GET, produces = "text/plain")
@ResponseBody
public String readCompositeSolutionGraph(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionId", required = true) String solutionId,
@RequestParam(value = "version", required = true) String version) {
logger.debug(EELFLoggerDelegator.debugLogger, " fetchJsonTOSCA() : Begin");
String result;
try {
result = solutionService.readCompositeSolutionGraph(userId, SanitizeUtils.sanitize(solutionId), version);
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, "Failed to read the ComposietSolution", e);
result = "";
}
logger.debug(EELFLoggerDelegator.debugLogger, " fetchJsonTOSCA() : End");
return result;
}
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
readCompositeSolutionGraph
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Experiment replace(K8sClient api) {
try {
// Using apply yaml patch, field manager must be set, and it must be forced.
// https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management
PatchOptions patchOptions = new PatchOptions();
patchOptions.setFieldManager(getExperimentId());
patchOptions.setForce(true);
if (LOG.isDebugEnabled()) {
LOG.debug("Patch XGBoostJob resource: \n{}", YamlUtils.toPrettyYaml(this));
}
XGBoostJob xgBoostJob = api.getXGBoostJobClient()
.patch(getMetadata().getNamespace(), getMetadata().getName(),
V1Patch.PATCH_FORMAT_APPLY_YAML,
new V1Patch(JsonUtils.toJson(this)),
patchOptions)
.throwsApiException().getObject();
return parseExperimentResponseObject(xgBoostJob, XGBoostJob.class);
} catch (ApiException e) {
throw new SubmarineRuntimeException(e.getCode(), e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replace
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
replace
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceConnectionServiceFeature() {
enforceFeature(PackageManager.FEATURE_CONNECTION_SERVICE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceConnectionServiceFeature
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
enforceConnectionServiceFeature
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
protected UserMentionSupport getUserMentionSupport() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserMentionSupport
File: server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21242
|
HIGH
| 7.5
|
theonedev/onedev
|
getUserMentionSupport
|
server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getCategoryLink(UserviewCategory category, Map<String, Object> data) {
UserviewMenu menu = category.getMenus().iterator().next();
if (menu.isHomePageSupported()) {
return menu.getUrl();
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCategoryLink
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
|
getCategoryLink
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String calculateBundledApkRoot(final String codePathString) {
final File codePath = new File(codePathString);
final File codeRoot;
if (FileUtils.contains(Environment.getRootDirectory(), codePath)) {
codeRoot = Environment.getRootDirectory();
} else if (FileUtils.contains(Environment.getOemDirectory(), codePath)) {
codeRoot = Environment.getOemDirectory();
} else if (FileUtils.contains(Environment.getVendorDirectory(), codePath)) {
codeRoot = Environment.getVendorDirectory();
} else {
// Unrecognized code path; take its top real segment as the apk root:
// e.g. /something/app/blah.apk => /something
try {
File f = codePath.getCanonicalFile();
File parent = f.getParentFile(); // non-null because codePath is a file
File tmp;
while ((tmp = parent.getParentFile()) != null) {
f = parent;
parent = tmp;
}
codeRoot = f;
Slog.w(TAG, "Unrecognized code path "
+ codePath + " - using " + codeRoot);
} catch (IOException e) {
// Can't canonicalize the code path -- shenanigans?
Slog.w(TAG, "Can't canonicalize code path " + codePath);
return Environment.getRootDirectory().getPath();
}
}
return codeRoot.getPath();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateBundledApkRoot
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
|
calculateBundledApkRoot
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
handleUiResult(resultCode, resultData);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceiveResult
File: services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40076
|
MEDIUM
| 5.5
|
android
|
onReceiveResult
|
services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
|
9b68987df85b681f9362a3cadca6496796d23bbc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<XWikiAttachment> searchAttachments(String parametrizedSqlClause, boolean checkRight, int nb, int start,
List<?> parameterValues, XWikiContext context) throws XWikiException
{
parametrizedSqlClause = parametrizedSqlClause.trim().replaceFirst("^and ", "").replaceFirst("^where ", "");
// Get the attachment filenames and document fullNames
List<java.lang.Object[]> results = this.getStore().search(
"select attach.filename, doc.fullName from XWikiAttachment attach, XWikiDocument doc where doc.id = attach.docId and "
+ parametrizedSqlClause,
nb, start, parameterValues, context);
HashMap<String, List<String>> filenamesByDocFullName = new HashMap<>();
// Put each attachment name with the document name it belongs to
for (int i = 0; i < results.size(); i++) {
String filename = (String) results.get(i)[0];
String docFullName = (String) results.get(i)[1];
if (!filenamesByDocFullName.containsKey(docFullName)) {
filenamesByDocFullName.put(docFullName, new ArrayList<String>());
}
filenamesByDocFullName.get(docFullName).add(filename);
}
List<XWikiAttachment> out = new ArrayList<>();
// Index through the document names, get relivent attachments
for (Map.Entry<String, List<String>> entry : filenamesByDocFullName.entrySet()) {
String fullName = entry.getKey();
XWikiDocument doc = getDocument(fullName, context);
if (checkRight) {
if (!context.getWiki().getRightService().hasAccessLevel("view", context.getUser(), doc.getFullName(),
context)) {
continue;
}
}
List<String> returnedAttachmentNames = entry.getValue();
for (XWikiAttachment attach : doc.getAttachmentList()) {
if (returnedAttachmentNames.contains(attach.getFilename())) {
out.add(attach);
}
}
}
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchAttachments
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
|
searchAttachments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isTransitionForward() {
return (mStartingData != null && mStartingData.mIsTransitionForward)
|| mDisplayContent.isNextTransitionForward();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTransitionForward
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isTransitionForward
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldEnableWakeGestureLp() {
return mWakeGestureEnabledSetting && !mAwake
&& (!mLidControlsSleep || mLidState != LID_CLOSED)
&& mWakeGestureListener.isSupported();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldEnableWakeGestureLp
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
|
shouldEnableWakeGestureLp
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private SSLException shutdownWithError(String operation, String err) {
if (logger.isDebugEnabled()) {
logger.debug("{} failed: OpenSSL error: {}", operation, err);
}
// There was an internal error -- shutdown
shutdown();
if (handshakeState == HandshakeState.FINISHED) {
return new SSLException(err);
}
return new SSLHandshakeException(err);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdownWithError
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
|
shutdownWithError
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPermissionsChanged(int uid) {
mHandler.obtainMessage(MSG_PERMISSIONS_CHANGED, uid, 0).sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPermissionsChanged
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
onPermissionsChanged
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onAddedTo(AbstractBuild build) {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAddedTo
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
|
onAddedTo
|
core/src/main/java/hudson/model/Cause.java
|
5d57c855f3147bfc5e7fda9252317b428a700014
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getRedirectParameters(String parent, String title, String template, ActionOnCreate actionOnCreate)
{
if (actionOnCreate == ActionOnCreate.SAVE_AND_EDIT) {
// We don't need to pass any parameters because the document is saved before the redirect using the
// parameter values.
return null;
}
String redirectParams = "template=" + Util.encodeURI(template, null);
if (parent != null) {
redirectParams += "&parent=" + Util.encodeURI(parent, null);
}
if (title != null) {
redirectParams += "&title=" + Util.encodeURI(title, null);
}
// Both the save and the edit action might require a CSRF token
CSRFToken csrf = Utils.getComponent(CSRFToken.class);
redirectParams += "&form_token=" + Util.encodeURI(csrf.getToken(), null);
return redirectParams;
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2023-40572
- Severity: HIGH
- CVSS Score: 8.0
Description: XWIKI-20849: Require a CSRF token in the create action
Function: getRedirectParameters
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
private String getRedirectParameters(String parent, String title, String template, ActionOnCreate actionOnCreate)
{
if (actionOnCreate == ActionOnCreate.SAVE_AND_EDIT) {
// We don't need to pass any parameters because the document is saved before the redirect using the
// parameter values.
return null;
}
String redirectParams = "template=" + Util.encodeURI(template, null);
if (parent != null) {
redirectParams += "&parent=" + Util.encodeURI(parent, null);
}
if (title != null) {
redirectParams += "&title=" + Util.encodeURI(title, null);
}
// Both the save and the edit action might require a CSRF token
redirectParams += "&form_token=" + Util.encodeURI(this.csrf.getToken(), null);
return redirectParams;
}
|
[
"CWE-352"
] |
CVE-2023-40572
|
HIGH
| 8
|
xwiki/xwiki-platform
|
getRedirectParameters
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
|
4b20528808d0c311290b0d9ab2cfc44063380ef7
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean canShowErrorDialogs() {
return mShowDialogs && !mSleeping && !mShuttingDown
&& !mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY)
&& !mUserController.hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS,
mUserController.getCurrentUserId())
&& !(UserManager.isDeviceInDemoMode(mContext)
&& mUserController.getCurrentUser().isDemo());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canShowErrorDialogs
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
canShowErrorDialogs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void registerTestSendOrSaveCallback(SendOrSaveCallback testCallback) {
if (sTestSendOrSaveCallback != null && testCallback != null) {
throw new IllegalStateException("Attempting to register more than one test callback");
}
sTestSendOrSaveCallback = testCallback;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerTestSendOrSaveCallback
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
|
registerTestSendOrSaveCallback
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams,
Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
continue;
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateParamsForAuth
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
updateParamsForAuth
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void parseStyleSheet(ApplContext ac, Reader reader, URL docref) {
parseStyleElement(ac, reader, null, null, (docref == null) ? ac.getFakeURL() : docref, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseStyleSheet
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
parseStyleSheet
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (obj instanceof JSONObject) {
return myHashMap.equals(((JSONObject)obj).myHashMap);
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
equals
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private RelationshipType getRelationshipType(XMLEventReader reader) throws XMLStreamException {
if (this.labels) {
XMLEvent peek = reader.peek();
boolean isChar = peek.isCharacters();
if (isChar && !(peek.asCharacters().isWhiteSpace())) {
String value = peek.asCharacters().getData();
String el = ":";
String typeRel = value.contains(el) ? value.replace(el, StringUtils.EMPTY) : value;
return RelationshipType.withName(typeRel.trim());
}
boolean notStartElementOrContainsKeyLabel = isChar
|| !peek.isStartElement()
|| containsLabelKey(peek);
if (!peek.isEndDocument() && notStartElementOrContainsKeyLabel) {
reader.nextEvent();
return getRelationshipType(reader);
}
}
reader.nextEvent(); // to prevent eventual wrong reader (f.e. self-closing tag)
return defaultRelType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelationshipType
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
getRelationshipType
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onLongClick(RssItemViewHolder vh, int position) {
RssItem rssItem = vh.getRssItem();
DialogFragment newFragment =
NewsDetailImageDialogFragment.newInstanceUrl(rssItem.getTitle(), rssItem.getLink());
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag("menu_fragment_dialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
newFragment.show(ft, "menu_fragment_dialog");
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLongClick
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onLongClick
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, XWikiContext context)
throws XWikiException
{
return addXObjectsFromRequest(classReference, "", context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addXObjectsFromRequest
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
addXObjectsFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
DisplayInfo getDisplayInfo() {
final DisplayInfo displayInfo = mToken.getFixedRotationTransformDisplayInfo();
if (displayInfo != null) {
return displayInfo;
}
return getDisplayContent().getDisplayInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDisplayInfo
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
getDisplayInfo
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ProcessStartResult zygoteSendArgsAndGetResult(
ZygoteState zygoteState, ArrayList<String> args)
throws ZygoteStartFailedEx {
try {
/**
* See com.android.internal.os.ZygoteInit.readArgumentList()
* Presently the wire format to the zygote process is:
* a) a count of arguments (argc, in essence)
* b) a number of newline-separated argument strings equal to count
*
* After the zygote process reads these it will write the pid of
* the child or -1 on failure, followed by boolean to
* indicate whether a wrapper process was used.
*/
final BufferedWriter writer = zygoteState.writer;
final DataInputStream inputStream = zygoteState.inputStream;
writer.write(Integer.toString(args.size()));
writer.newLine();
int sz = args.size();
for (int i = 0; i < sz; i++) {
String arg = args.get(i);
if (arg.indexOf('\n') >= 0) {
throw new ZygoteStartFailedEx(
"embedded newlines not allowed");
}
writer.write(arg);
writer.newLine();
}
writer.flush();
// Should there be a timeout on this?
ProcessStartResult result = new ProcessStartResult();
result.pid = inputStream.readInt();
if (result.pid < 0) {
throw new ZygoteStartFailedEx("fork() failed");
}
result.usingWrapper = inputStream.readBoolean();
return result;
} catch (IOException ex) {
zygoteState.close();
throw new ZygoteStartFailedEx(ex);
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3911
- Severity: HIGH
- CVSS Score: 9.3
Description: Process: Fix communication with zygote.
Don't write partial requests, and don't return (or throw) early after
partially reading a response.
bug: 30143607
Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1
(cherry picked from commit 448be0a62209c977593d81617853a8a428d013df)
Function: zygoteSendArgsAndGetResult
File: core/java/android/os/Process.java
Repository: android
Fixed Code:
private static ProcessStartResult zygoteSendArgsAndGetResult(
ZygoteState zygoteState, ArrayList<String> args)
throws ZygoteStartFailedEx {
try {
// Throw early if any of the arguments are malformed. This means we can
// avoid writing a partial response to the zygote.
int sz = args.size();
for (int i = 0; i < sz; i++) {
if (args.get(i).indexOf('\n') >= 0) {
throw new ZygoteStartFailedEx("embedded newlines not allowed");
}
}
/**
* See com.android.internal.os.ZygoteInit.readArgumentList()
* Presently the wire format to the zygote process is:
* a) a count of arguments (argc, in essence)
* b) a number of newline-separated argument strings equal to count
*
* After the zygote process reads these it will write the pid of
* the child or -1 on failure, followed by boolean to
* indicate whether a wrapper process was used.
*/
final BufferedWriter writer = zygoteState.writer;
final DataInputStream inputStream = zygoteState.inputStream;
writer.write(Integer.toString(args.size()));
writer.newLine();
for (int i = 0; i < sz; i++) {
String arg = args.get(i);
writer.write(arg);
writer.newLine();
}
writer.flush();
// Should there be a timeout on this?
ProcessStartResult result = new ProcessStartResult();
// Always read the entire result from the input stream to avoid leaving
// bytes in the stream for future process starts to accidentally stumble
// upon.
result.pid = inputStream.readInt();
result.usingWrapper = inputStream.readBoolean();
if (result.pid < 0) {
throw new ZygoteStartFailedEx("fork() failed");
}
return result;
} catch (IOException ex) {
zygoteState.close();
throw new ZygoteStartFailedEx(ex);
}
}
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
zygoteSendArgsAndGetResult
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 1
|
Analyze the following code function for security vulnerabilities
|
private void updateEffectsSuppressorLocked() {
final long updatedSuppressedEffects = calculateSuppressedEffects();
if (updatedSuppressedEffects == mZenModeHelper.getSuppressedEffects()) return;
final List<ComponentName> suppressors = getSuppressors();
ZenLog.traceEffectsSuppressorChanged(mEffectsSuppressors, suppressors, updatedSuppressedEffects);
mEffectsSuppressors = suppressors;
mZenModeHelper.setSuppressedEffects(updatedSuppressedEffects);
sendRegisteredOnlyBroadcast(NotificationManager.ACTION_EFFECTS_SUPPRESSOR_CHANGED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateEffectsSuppressorLocked
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
updateEffectsSuppressorLocked
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void update() {
String exemptions = Settings.Global.getString(mContext.getContentResolver(),
Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS);
if (!TextUtils.equals(exemptions, mExemptionsStr)) {
mExemptionsStr = exemptions;
if ("*".equals(exemptions)) {
mBlacklistDisabled = true;
mExemptions = Collections.emptyList();
} else {
mBlacklistDisabled = false;
mExemptions = TextUtils.isEmpty(exemptions)
? Collections.emptyList()
: Arrays.asList(exemptions.split(","));
}
if (!zygoteProcess.setApiBlacklistExemptions(mExemptions)) {
Slog.e(TAG, "Failed to set API blacklist exemptions!");
// leave mExemptionsStr as is, so we don't try to send the same list again.
mExemptions = Collections.emptyList();
}
}
int logSampleRate = Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.HIDDEN_API_ACCESS_LOG_SAMPLING_RATE, -1);
if (logSampleRate < 0 || logSampleRate > 0x10000) {
logSampleRate = -1;
}
if (logSampleRate != -1 && logSampleRate != mLogSampleRate) {
mLogSampleRate = logSampleRate;
zygoteProcess.setHiddenApiAccessLogSampleRate(mLogSampleRate);
}
mPolicyPreP = getValidEnforcementPolicy(Settings.Global.HIDDEN_API_POLICY_PRE_P_APPS);
mPolicyP = getValidEnforcementPolicy(Settings.Global.HIDDEN_API_POLICY_P_APPS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
update
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void endPrefixMapping(final String prefix) throws SAXException {
super.endPrefixMapping( prefix );
this.namespaces.remove( prefix );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endPrefixMapping
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
endPrefixMapping
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getLogoutUrl() {
return logoutUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLogoutUrl
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getLogoutUrl
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Node migrateValueMatcher(Element valueMatcherElement) {
List<NodeTuple> tuples = new ArrayList<>();
String classTag = getClassTag(valueMatcherElement.attributeValue("class"));
Element valuesElement = valueMatcherElement.element("values");
if (valuesElement != null) {
List<Node> valueNodes = new ArrayList<>();
for (Element valueElement: valuesElement.elements())
valueNodes.add(new ScalarNode(Tag.STR, valueElement.getText().trim()));
tuples.add(new NodeTuple(
new ScalarNode(Tag.STR, "values"),
new SequenceNode(Tag.SEQ, valueNodes, FlowStyle.BLOCK)));
}
return new MappingNode(new Tag(classTag), tuples, FlowStyle.BLOCK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrateValueMatcher
File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-538"
] |
CVE-2021-21250
|
MEDIUM
| 4
|
theonedev/onedev
|
migrateValueMatcher
|
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
|
9196fd795e87dab069b4260a3590a0ea886e770f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void verifyChannelPipeline(ChannelPipeline pipeline, String scheme) throws IOException, GeneralSecurityException {
boolean isSecure = isSecure(scheme);
if (pipeline.get(SSL_HANDLER) != null) {
if (!isSecure)
pipeline.remove(SSL_HANDLER);
} else if (isSecure)
pipeline.addFirst(SSL_HANDLER, new SslHandler(createSSLEngine()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyChannelPipeline
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
verifyChannelPipeline
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateRosterEntryInDB(final RosterEntry entry) {
upsertRoster(getContentValuesForRosterEntry(entry), entry.getUser());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateRosterEntryInDB
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
updateRosterEntryInDB
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getBigImageScaleParam() {
return IMAGE_SCALE_PARAM
+ ",w:"
+ I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().bigImageWidth()
+ ",h:"
+ I_CmsLayoutBundle.INSTANCE.galleryResultItemCss().bigImageHeight();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBigImageScaleParam
File: src-gwt/org/opencms/ade/galleries/client/ui/CmsResultItemWidget.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-31544
|
MEDIUM
| 5.4
|
alkacon/opencms-core
|
getBigImageScaleParam
|
src-gwt/org/opencms/ade/galleries/client/ui/CmsResultItemWidget.java
|
21bfbeaf6b038e2c03bb421ce7f0933dd7a7633e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public WorkflowInstance addZippedMediaPackage(InputStream zipStream, String wd, Map<String, String> workflowConfig)
throws MediaPackageException, IOException, IngestException, NotFoundException {
try {
return addZippedMediaPackage(zipStream, wd, workflowConfig, null);
} catch (UnauthorizedException e) {
throw new IllegalStateException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addZippedMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
addZippedMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enableVerboseLogging(boolean verbose) {
mVerboseLoggingEnabled = verbose;
mPasspointProvisioner.enableVerboseLogging(verbose);
for (PasspointProvider provider : mProviders.values()) {
provider.enableVerboseLogging(verbose);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableVerboseLogging
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
enableVerboseLogging
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeThisAtRule() {
style.removeThisAtRule();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeThisAtRule
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
removeThisAtRule
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getRatingType() {
return mRatingType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRatingType
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
getRatingType
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(FIELD_SERVER_IPS)
public abstract Builder serverIps(String serverIp);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serverIps
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
serverIps
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable WifiConfiguration getConfiguredNetworkWithPassword(int networkId) {
WifiConfiguration config = getInternalConfiguredNetwork(networkId);
if (config == null) {
return null;
}
// Create a new configuration object without the passwords masked to send out to the
// external world.
return createExternalWifiConfiguration(config, false, Process.WIFI_UID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguredNetworkWithPassword
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getConfiguredNetworkWithPassword
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
enforceNotIsolatedCaller("startActivityAndWait");
userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
false, ALLOW_FULL_ONLY, "startActivityAndWait", null);
WaitResult res = new WaitResult();
// TODO: Switch to user app stacks here.
mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent, resolvedType,
null, null, resultTo, resultWho, requestCode, startFlags, profilerInfo, res, null,
options, userId, null, null);
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAndWait
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
|
startActivityAndWait
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
if (changedView == this && visibility == VISIBLE) {
mLockIcon.update();
updateCameraVisibility();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onVisibilityChanged
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
|
onVisibilityChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Object[] vars(final Request req) {
Map<Object, String> vars = req.route().vars();
return vars.values().toArray(new Object[vars.size()]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vars
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
vars
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startLockTaskMode(int taskId) {
synchronized (this) {
final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId);
if (task != null) {
startLockTaskModeLocked(task);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskMode
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
startLockTaskMode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
private StreamCorruptedException corruptStream(byte tc) throws StreamCorruptedException {
throw new StreamCorruptedException("Wrong format: " + Integer.toHexString(tc & 0xff));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: corruptStream
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
corruptStream
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public ChannelFuture close(@SuppressWarnings("unused") Channel channel) {
return close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
close
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public void moveTaskBackwards(int task) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskBackwards
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
moveTaskBackwards
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCallerRecents(int callingUid) {
return ActivityTaskManagerService.this.isCallerRecents(callingUid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerRecents
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
|
isCallerRecents
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateCharacterStream(String columnName,
@Nullable Reader reader, long length)
throws SQLException {
updateCharacterStream(findColumn(columnName), reader, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCharacterStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean mayFreezeScreenLocked() {
return mayFreezeScreenLocked(app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mayFreezeScreenLocked
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
mayFreezeScreenLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isInCall(String callingPackage, String callingFeatureId) {
try {
Log.startSession("TSI.iIC");
if (!canReadPhoneState(callingPackage, callingFeatureId, "isInCall")) {
return false;
}
synchronized (mLock) {
return mCallsManager.hasOngoingCalls();
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInCall
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
isInCall
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toXML() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element rootElement = toDOM(document);
document.appendChild(rootElement);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
DOMSource domSource = new DOMSource(document);
StringWriter sw = new StringWriter();
StreamResult streamResult = new StreamResult(sw);
transformer.transform(domSource, streamResult);
return sw.toString();
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: toXML
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
Fixed Code:
public String toXML() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element rootElement = toDOM(document);
document.appendChild(rootElement);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
DOMSource domSource = new DOMSource(document);
StringWriter sw = new StringWriter();
StreamResult streamResult = new StreamResult(sw);
transformer.transform(domSource, streamResult);
return sw.toString();
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toXML
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean binderIsCallingUidMyUid() {
return getCallingUid() == Process.myUid();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderIsCallingUidMyUid
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
|
binderIsCallingUidMyUid
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<SemanticGraph> expandFromPatterns(List<SsurgeonPattern> patternList, SemanticGraph sg) throws Exception {
List<SemanticGraph> retList = new ArrayList<>();
for (SsurgeonPattern pattern :patternList) {
Collection<SemanticGraph> generated = pattern.execute(sg);
for (SemanticGraph orderedGraph : generated) {
//orderedGraph.vertexList(true);
//orderedGraph.edgeList(true);
retList.add(orderedGraph);
System.out.println("\ncompact = "+orderedGraph.toCompactString());
System.out.println("regular=" + orderedGraph);
}
if (generated.size() > 0) {
if (log != null) {
log.info("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *");
log.info("Pre remove duplicates, num="+generated.size());
}
SemanticGraphUtils.removeDuplicates(generated, sg);
if (log != null) {
log.info("Expand from patterns");
if (logPrefix != null) log.info(logPrefix);
log.info("Pattern = '"+pattern.getUID()+"' generated "+generated.size()+" matches");
log.info("= = = = = = = = = =\nSrc graph:\n" + sg + "\n= = = = = = = = = =\n");
int index=1;
for (SemanticGraph genSg : generated) {
log.info("REWRITE "+(index++));
log.info(genSg.toString());
log.info(". . . . .\n");
}
}
}
}
return retList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: expandFromPatterns
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
expandFromPatterns
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/forms/migrate/{filename}/downloadLogFile")
public void getLogFile(@PathVariable("filename") String fileName, HttpServletResponse response) throws Exception {
InputStream inputStream = null;
try {
//Validate/Sanitize user input filename using a standard library, prevent from path traversal
String logFileName = getFilePath() + File.separator + FilenameUtils.getName(fileName);
File fileToDownload = new File(logFileName);
inputStream = new FileInputStream(fileToDownload);
response.setContentType("application/force-download");
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
IOUtils.copy(inputStream, response.getOutputStream());
response.flushBuffer();
} catch (Exception e) {
logger.debug("Request could not be completed at this moment. Please try again.");
logger.debug(e.getStackTrace().toString());
throw e;
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
logger.debug(e.getStackTrace().toString());
throw e;
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-24830
- Severity: HIGH
- CVSS Score: 7.5
Description: OC-17139: code changes after code review
Function: getLogFile
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
Fixed Code:
@RequestMapping(value = "/forms/migrate/{filename}/downloadLogFile")
public void getLogFile(@PathVariable("filename") String fileName, HttpServletResponse response) throws Exception {
InputStream inputStream = null;
try {
//Validate/Sanitize user input filename using a standard library, prevent from path traversal
String logFilePath = getFilePath() + File.separator;
File fileToDownload = new File(logFilePath, fileName);
String canonicalPath= fileToDownload.getCanonicalPath();
if (canonicalPath.startsWith(logFilePath)) {
inputStream = new FileInputStream(fileToDownload);
response.setContentType("application/force-download");
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
IOUtils.copy(inputStream, response.getOutputStream());
response.flushBuffer();
}else {
throw new RuntimeException("Traversal attempt - file path not allowed " + fileName);
}
} catch (Exception e) {
logger.debug("Request could not be completed at this moment. Please try again.");
logger.debug(e.getStackTrace().toString());
throw e;
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
logger.debug(e.getStackTrace().toString());
throw e;
}
}
}
}
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
getLogFile
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 1
|
Analyze the following code function for security vulnerabilities
|
private XMLStreamReader getXMLStreamReaderFromUrl(String url) throws IOException, XMLStreamException {
FileUtils.checkReadAllowed(url);
URLConnection urlConnection = new URL(url).openConnection();
FACTORY.setProperty(XMLInputFactory.IS_COALESCING, true);
return FACTORY.createXMLStreamReader(urlConnection.getInputStream());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXMLStreamReaderFromUrl
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
getXMLStreamReaderFromUrl
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void disablePointerLocation() {
if (mPointerLocationView != null) {
mWindowManagerFuncs.unregisterPointerEventListener(mPointerLocationView);
WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
wm.removeView(mPointerLocationView);
mPointerLocationView = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disablePointerLocation
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
|
disablePointerLocation
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sessionCreated(HttpSession session) {
HttpConversationContext httpConversationContext = httpConversationContext();
if (httpConversationContext instanceof AbstractConversationContext) {
AbstractConversationContext<?, ?> abstractConversationContext = (AbstractConversationContext<?, ?>) httpConversationContext;
abstractConversationContext.sessionCreated();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sessionCreated
File: impl/src/main/java/org/jboss/weld/servlet/ConversationContextActivator.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
sessionCreated
|
impl/src/main/java/org/jboss/weld/servlet/ConversationContextActivator.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
protected KeyExchangeFuture checkRekey() throws Exception {
return isRekeyRequired() ? requestNewKeysExchange() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkRekey
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
|
checkRekey
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private File getDir() {
return mDir;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2024-21633
- Severity: HIGH
- CVSS Score: 7.8
Description: Prevent arbitrary file writes with malicious resource names. (#3484)
* refactor: rename sanitize function
* fix: expose getDir
* fix: safe handling of untrusted resource names
- fixes: GHSA-2hqv-2xv4-5h5w
* test: sample file for GHSA-2hqv-2xv4-5h5w
* refactor: avoid detection of absolute files for resource check
* chore: enable info mode on gradle
* test: skip test on windows
* chore: debug windows handling
* fix: normalize entry with file separators
* fix: normalize filepath after cleansing
* chore: Android paths are not OS specific
* refactor: use java.nio for path traversal checking
* chore: align path separator on Windows for Zip files
* chore: rework towards basic directory traversal
* chore: remove '--info' on build.yml
Function: getDir
File: brut.j.dir/src/main/java/brut/directory/FileDirectory.java
Repository: iBotPeaches/Apktool
Fixed Code:
public File getDir() {
return mDir;
}
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
getDir
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 1
|
Analyze the following code function for security vulnerabilities
|
public synchronized void load() {
XmlFile file = getConfigFile();
if(!file.exists())
return;
try {
file.unmarshal(this);
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to load "+file, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: load
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
load
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getNetworkRecoveryInterval() {
return networkRecoveryInterval;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNetworkRecoveryInterval
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
|
getNetworkRecoveryInterval
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setOverWriteExistingData(boolean overWriteExistingData) {
this.overWriteExistingData = overWriteExistingData;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOverWriteExistingData
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
setOverWriteExistingData
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityRecord resumedAppLocked() {
ActivityStack stack = mFocusedStack;
if (stack == null) {
return null;
}
ActivityRecord resumedActivity = stack.mResumedActivity;
if (resumedActivity == null || resumedActivity.app == null) {
resumedActivity = stack.mPausingActivity;
if (resumedActivity == null || resumedActivity.app == null) {
resumedActivity = stack.topRunningActivityLocked(null);
}
}
return resumedActivity;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumedAppLocked
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
|
resumedAppLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean approveCaCert(String alias, int userHandle, boolean approval) {
if (mService != null) {
try {
return mService.approveCaCert(alias, userHandle, approval);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: approveCaCert
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
|
approveCaCert
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Preference getPreferenceFromFieldName(String apnField) {
switch (apnField) {
case Telephony.Carriers.NAME:
return mName;
case Telephony.Carriers.APN:
return mApn;
case Telephony.Carriers.PROXY:
return mProxy;
case Telephony.Carriers.PORT:
return mPort;
case Telephony.Carriers.USER:
return mUser;
case Telephony.Carriers.SERVER:
return mServer;
case Telephony.Carriers.PASSWORD:
return mPassword;
case Telephony.Carriers.MMSPROXY:
return mMmsProxy;
case Telephony.Carriers.MMSPORT:
return mMmsPort;
case Telephony.Carriers.MMSC:
return mMmsc;
case Telephony.Carriers.MCC:
return mMcc;
case Telephony.Carriers.MNC:
return mMnc;
case Telephony.Carriers.TYPE:
return mApnType;
case Telephony.Carriers.AUTH_TYPE:
return mAuthType;
case Telephony.Carriers.PROTOCOL:
return mProtocol;
case Telephony.Carriers.ROAMING_PROTOCOL:
return mRoamingProtocol;
case Telephony.Carriers.CARRIER_ENABLED:
return mCarrierEnabled;
case Telephony.Carriers.BEARER:
case Telephony.Carriers.BEARER_BITMASK:
return mBearerMulti;
case Telephony.Carriers.MVNO_TYPE:
return mMvnoType;
case Telephony.Carriers.MVNO_MATCH_DATA:
return mMvnoMatchData;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreferenceFromFieldName
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
|
getPreferenceFromFieldName
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String jsFunction_getHTTPsURL(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws APIManagementException {
String hostName = null;
if (args != null && isStringArray(args)) {
hostName = (String) args[0];
URI uri;
try {
uri = new URI(hostName);
hostName = uri.getHost();
} catch (URISyntaxException e) {
//ignore
}
}
if (hostName == null) {
hostName = CarbonUtils.getServerConfiguration().getFirstProperty("HostName");
}
if (hostName == null) {
hostName = System.getProperty("carbon.local.ip");
}
String backendHttpsPort = HostObjectUtils.getBackendPort("https");
return "https://" + hostName + ":" + backendHttpsPort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getHTTPsURL
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getHTTPsURL
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getHeader(String name) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeader
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
|
getHeader
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
updateEmergencyCallButton();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onConfigurationChanged
File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
onConfigurationChanged
|
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private VisitDomainWrapper getVisitDomainWrapper(Visit visit, Encounter encounter, AdtService adtService) {
// if we don't have a visit, but the encounter has a visit, use that
if (visit == null && encounter != null) {
visit = encounter.getVisit();
}
if (visit == null) {
return null;
} else {
return adtService.wrap(visit);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVisitDomainWrapper
File: omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
Repository: openmrs/openmrs-module-htmlformentryui
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-4284
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-htmlformentryui
|
getVisitDomainWrapper
|
omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
|
811990972ea07649ae33c4b56c61c3b520895f07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeSyntaxError(TestContext context) {
postgresClient().execute("'", context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeSyntaxError
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
executeSyntaxError
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void decrement() {
decrementAndGet();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decrement
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
decrement
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static @AttributionFlags int resolveProxyAttributionFlags(
@NonNull AttributionSource attributionChain,
@NonNull AttributionSource current, boolean fromDatasource,
boolean startDataDelivery, boolean selfAccess, boolean isTrusted) {
return resolveAttributionFlags(attributionChain, current, fromDatasource,
startDataDelivery, selfAccess, isTrusted, /*flagsForProxy*/ true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveProxyAttributionFlags
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
resolveProxyAttributionFlags
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCaseId() {
return this.caseId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCaseId
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
getCaseId
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected MapType _mapAbstractMapType(JavaType type, DeserializationConfig config)
{
final Class<?> mapClass = ContainerDefaultMappings.findMapFallback(type);
if (mapClass != null) {
return (MapType) config.constructSpecializedType(type, mapClass);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _mapAbstractMapType
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_mapAbstractMapType
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long[] uncompressLongArray(byte[] input, int offset, int length)
throws IOException
{
int uncompressedLength = Snappy.uncompressedLength(input, offset, length);
long[] result = new long[uncompressedLength / 8];
impl.rawUncompress(input, offset, length, result, 0);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressLongArray
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressLongArray
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void stop() {
if (discoveryMulticastResponder != null) {
discoveryMulticastResponder.stop();
discoveryMulticastResponder = null;
}
backendManager.destroy();
backendManager = null;
requestHandler = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stop
File: agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
stop
|
agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setNotificationSnoozed(StatusBarNotification sbn, SnoozeOption snoozeOption) {
if (snoozeOption.criterion != null) {
mNotificationListener.snoozeNotification(sbn.getKey(), snoozeOption.criterion.getId());
} else {
mNotificationListener.snoozeNotification(sbn.getKey(),
snoozeOption.snoozeForMinutes * 60 * 1000);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNotificationSnoozed
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setNotificationSnoozed
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRevocationReasonInUse(boolean revocationReasonInUse) {
this.revocationReasonInUse = revocationReasonInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRevocationReasonInUse
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
|
setRevocationReasonInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private HashMap<String, IBinder> getCommonServicesLocked(boolean isolated) {
if (mAppBindArgs == null) {
mAppBindArgs = new HashMap<>();
// Isolated processes won't get this optimization, so that we don't
// violate the rules about which services they have access to.
if (!isolated) {
// Setup the application init args
mAppBindArgs.put("package", ServiceManager.getService("package"));
mAppBindArgs.put("window", ServiceManager.getService("window"));
mAppBindArgs.put(Context.ALARM_SERVICE,
ServiceManager.getService(Context.ALARM_SERVICE));
}
}
return mAppBindArgs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommonServicesLocked
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
|
getCommonServicesLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void processS3BucketFiles(File localFilePath, PackageType xmlPackage, PluginPackages pluginPackageEntity) {
ResourceDependenciesType xmlResourceDependenciesType = xmlPackage.getResourceDependencies();
if(xmlResourceDependenciesType == null) {
return;
}
List<S3Type> xmlS3List = xmlResourceDependenciesType.getS3();
if (xmlS3List != null) {
for (S3Type xmlS3 : xmlS3List) {
FileSetType xmlFileSet = xmlS3.getFileSet();
if(xmlFileSet == null) {
continue;
}
List<FileType> xmlFiles = xmlFileSet.getFile();
if(xmlFiles == null || xmlFiles.isEmpty()) {
continue;
}
for(FileType xmlFile : xmlFiles) {
//TODO to tidy source path
String sourcePath = xmlFile.getSource();
if(StringUtils.isBlank(sourcePath)) {
continue;
}
if(sourcePath.startsWith("/")) {
sourcePath = sourcePath.substring(1);
}
File s3File = new File(localFilePath, sourcePath);
log.debug("s3 file: {}", s3File.getAbsolutePath());
String keyName = xmlPackage.getName() + "/" + xmlPackage.getVersion() + "/" + sourcePath;
log.debug("keyName : {}", keyName);
String s3FileUrl = s3Client.uploadFile(pluginProperties.getPluginPackageBucketName(), keyName,
s3File);
log.debug("s3FileUrl : {}", s3FileUrl);
}
}
}
//1 try check bucket if exists
//2 try create or retrieve bucket
//3 upload declared files
//4 store in database
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processS3BucketFiles
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processS3BucketFiles
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
void scheduleAddStartingWindow() {
mAddStartingWindow.run();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleAddStartingWindow
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
scheduleAddStartingWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isHexAt(int i) {
char ch = jsonish.charAt(i);
if ('0' <= ch && ch <= '9') { return true; }
ch |= 32;
return 'a' <= ch && ch <= 'f';
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHexAt
File: src/main/java/com/google/json/JsonSanitizer.java
Repository: OWASP/json-sanitizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-13973
|
MEDIUM
| 4.3
|
OWASP/json-sanitizer
|
isHexAt
|
src/main/java/com/google/json/JsonSanitizer.java
|
53ceaac3e0a10e86d512ce96a0056578f2d1978f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalRemoveMaxConsumersPerSubscription() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
if (!op.isPresent()) {
return CompletableFuture.completedFuture(null);
}
op.get().setMaxConsumersPerSubscription(null);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, op.get());
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalRemoveMaxConsumersPerSubscription
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalRemoveMaxConsumersPerSubscription
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public IBinder getLaunchTaskFragmentToken() {
return mLaunchTaskFragmentToken;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchTaskFragmentToken
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchTaskFragmentToken
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void engineSetPadding(String padding)
throws NoSuchPaddingException
{
String paddingName = Strings.toUpperCase(padding);
// TDOD: make this meaningful...
if (paddingName.equals("NOPADDING"))
{
}
else if (paddingName.equals("PKCS5PADDING") || paddingName.equals("PKCS7PADDING"))
{
}
else
{
throw new NoSuchPaddingException("padding not available with IESCipher");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineSetPadding
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
engineSetPadding
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.