instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public Notification buildStyled(Notification wip) { wip = super.buildStyled(wip); // ensure that the actions in the builder and notification are corrected. mBuilder.mActions = getActionsListWithSystemActions(); wip.actions = new Action[mBuilder.mActions.size()]; mBuilder.mActions.toArray(wip.actions); return wip; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildStyled File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
buildStyled
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public void handle() throws MasterTaskExecuteException { DependResult conditionResult = calculateConditionResult(); TaskExecutionStatus status = (conditionResult == DependResult.SUCCESS) ? TaskExecutionStatus.SUCCESS : TaskExecutionStatus.FAILURE; log.info("Switch task execute finished, condition result is: {}, task status is: {}", conditionResult, status.name()); taskExecutionContext.setCurrentExecutionStatus(status); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handle File: dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/switchtask/SwitchLogicTask.java Repository: apache/dolphinscheduler The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-49299
HIGH
8.8
apache/dolphinscheduler
handle
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/switchtask/SwitchLogicTask.java
d1ef54f6a851e64525f1078887520394e553b6e8
0
Analyze the following code function for security vulnerabilities
public String nextTo(char delimiter) throws JSONException { StringBuilder sb = new StringBuilder(); for (;;) { char c = this.next(); if (c == delimiter || c == 0 || c == '\n' || c == '\r') { if (c != 0) { this.back(); } return sb.toString().trim(); } sb.append(c); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nextTo File: src/main/java/org/json/JSONTokener.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2022-45690
HIGH
7.5
stleary/JSON-java
nextTo
src/main/java/org/json/JSONTokener.java
7a124d857dc8da1165c87fa788e53359a317d0f7
0
Analyze the following code function for security vulnerabilities
public String getSessionCookieName() { return sessionCookieName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSessionCookieName File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java Repository: ratpack The code follows secure coding practices.
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
getSessionCookieName
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
60302fae7ef26897b9a0ec0def6281a9425344cf
0
Analyze the following code function for security vulnerabilities
public synchronized byte[] getResponseBytes() { return this.responseBytes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResponseBytes File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java Repository: LoboEvolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000540
MEDIUM
6.8
LoboEvolution
getResponseBytes
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
protected String getEventGroupItemSql(String studyIds, String sedIds, String itemIds, String dateConstraint, int datasetItemStatusId) { String ecStatusConstraint = this.getECStatusConstraint(datasetItemStatusId); String itStatusConstraint = this.getItemDataStatusConstraint(datasetItemStatusId); return "select cvidata.event_crf_id, ig.item_group_id, ig.oc_oid as item_group_oid, ig.name as item_group_name," + " cvidata.item_id, cvidata.item_oid, cvidata.item_data_ordinal, cvidata.value, cvidata.item_data_type_id, cvidata.item_data_id" + " from (select ec.event_crf_id, ec.crf_version_id, item.item_id, item.oc_oid as item_oid," + " idata.ordinal as item_data_ordinal, idata.value as value, item.item_data_type_id, idata.item_data_id from item," + " (select event_crf_id, item_id, ordinal, item_data_id, value from item_data where (status_id " + itStatusConstraint + ")" + " and event_crf_id in (select distinct event_crf_id from event_crf where study_subject_id in (select distinct" + " ss.study_subject_id from study_subject ss where ss.study_id in (" + studyIds + ") " + dateConstraint + ") and study_event_id" + " in (select distinct study_event_id from study_event" + " where study_event_definition_id in " + sedIds + " and study_subject_id in (" + " select distinct ss.study_subject_id from study_subject ss where ss.study_id in (" + studyIds + ") " + dateConstraint + "))))idata," + " (select event_crf_id, crf_version_id from event_crf where status_id " + ecStatusConstraint + ")ec" + " where item.item_id in " + itemIds + " and length(idata.value) > 0 and item.item_id = idata.item_id and idata.event_crf_id = ec.event_crf_id" + " order by ec.event_crf_id, ec.crf_version_id, item.item_id, idata.ordinal) cvidata, item_group_metadata igm," + " item_group ig where cvidata.crf_version_id = igm.crf_version_id and cvidata.item_id = igm.item_id" + " and igm.item_group_id = ig.item_group_id order by cvidata.event_crf_id, ig.item_group_id, cvidata.item_id, cvidata.item_data_ordinal"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEventGroupItemSql File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
getEventGroupItemSql
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
@Override public boolean isCacheAllowed() { return this.asyncProperties.isCacheAllowed(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCacheAllowed File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
isCacheAllowed
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
@Override public int getOrganizationColor(@NonNull ComponentName who) { if (!mHasFeature) { return ActiveAdmin.DEF_ORGANIZATION_COLOR; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallingUser(isManagedProfile(caller.getUserId())); Preconditions.checkCallAuthorization(isProfileOwner(caller)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); return admin.organizationColor; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationColor File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getOrganizationColor
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public static Structure getStructureByType(String type) { Structure structure = null; String condition = " name = '" + type + "'"; List list = InodeFactory.getInodesOfClassByCondition(Structure.class,condition); if (list.size() > 0) { structure = (Structure) list.get(0); } else { structure = new Structure(); } return structure; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2016-2355 - Severity: HIGH - CVSS Score: 7.5 Description: fixes #8848 Function: getStructureByType File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java Repository: dotCMS/core Fixed Code: public static Structure getStructureByType(String type) { type = SQLUtil.sanitizeParameter(type); Structure structure = null; String condition = " name = '" + type + "'"; List list = InodeFactory.getInodesOfClassByCondition(Structure.class,condition); if (list.size() > 0) { structure = (Structure) list.get(0); } else { structure = new Structure(); } return structure; }
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
getStructureByType
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
1
Analyze the following code function for security vulnerabilities
void attach() { if (DEBUG) Slog.v(TAG, "Attaching " + this + " token=" + mToken); mSession.windowAddedLocked(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attach 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
attach
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public void onDestroy() { super.onDestroy(); if (!mUserCaps.mEnabled) return; getActivity().unregisterReceiver(mUserChangeReceiver); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDestroy File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
onDestroy
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // File.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return File.createTempFile(prefix, suffix); else return File.createTempFile(prefix, suffix, new File(tempFolderPath)); }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2021-21430 - Severity: LOW - CVSS Score: 2.1 Description: use Files.createTempFile Function: prepareDownloadFile File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator Fixed Code: public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); }
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
prepareDownloadFile
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
1
Analyze the following code function for security vulnerabilities
public static String uncompressString(byte[] input, Charset encoding) throws IOException, UnsupportedEncodingException { byte[] uncompressed = uncompress(input); return new String(uncompressed, encoding); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: uncompressString 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
uncompressString
src/main/java/org/xerial/snappy/Snappy.java
d0042551e4a3509a725038eb9b2ad1f683674d94
0
Analyze the following code function for security vulnerabilities
public float getLineRight(int line) { int dir = getParagraphDirection(line); Alignment align = getParagraphAlignment(line); if (align == Alignment.ALIGN_LEFT) { return getParagraphLeft(line) + getLineMax(line); } else if (align == Alignment.ALIGN_NORMAL) { if (dir == DIR_RIGHT_TO_LEFT) return mWidth; else return getParagraphLeft(line) + getLineMax(line); } else if (align == Alignment.ALIGN_RIGHT) { return mWidth; } else if (align == Alignment.ALIGN_OPPOSITE) { if (dir == DIR_RIGHT_TO_LEFT) return getLineMax(line); else return mWidth; } else { /* align == Alignment.ALIGN_CENTER */ int left = getParagraphLeft(line); int right = getParagraphRight(line); int max = ((int) getLineMax(line)) & ~1; return right - ((right - left) - max) / 2; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLineRight File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getLineRight
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
void waitForDone() throws TransportException { done.await(transport.getTimeoutMs(), TimeUnit.MILLISECONDS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: waitForDone File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
waitForDone
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
@Override public void postNavNode(StringBuffer sb, int depth) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postNavNode File: java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java Repository: spacewalkproject/spacewalk The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
postNavNode
java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
7b9ff9ad
0
Analyze the following code function for security vulnerabilities
private static String getStderrOutput(Process process) { try (InputStreamReader stderr = new InputStreamReader(process.getErrorStream(), StandardCharsets.UTF_8)) { return CharStreams.toString(stderr); } catch (IOException ex) { return "unknown (failed to read error message from stderr due to " + ex.getMessage() + ")"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStderrOutput File: jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java Repository: GoogleContainerTools/jib The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-25914
CRITICAL
9.8
GoogleContainerTools/jib
getStderrOutput
jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
67fa40bc2c484da0546333914ea07a89fe44eaaf
0
Analyze the following code function for security vulnerabilities
@JsonIgnore public File getProjectDir(long projectID) { return getProjectDir(_workspaceDir, projectID); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProjectDir File: main/src/com/google/refine/io/FileProjectManager.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-37476
HIGH
7.8
OpenRefine
getProjectDir
main/src/com/google/refine/io/FileProjectManager.java
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
0
Analyze the following code function for security vulnerabilities
@LargeTest @Test public void testIsOutgoingCallPermitted() throws Exception { assertTrue(mTelecomSystem.getTelecomServiceImpl().getBinder() .isOutgoingCallPermitted(mPhoneAccountSelfManaged.getAccountHandle(), mPhoneAccountSelfManaged.getAccountHandle().getComponentName() .getPackageName())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testIsOutgoingCallPermitted File: tests/src/com/android/server/telecom/tests/BasicCallTests.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testIsOutgoingCallPermitted
tests/src/com/android/server/telecom/tests/BasicCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { super.submit(req,rsp); JSONObject json = req.getSubmittedForm(); makeDisabled(req.getParameter("disable")!=null); jdk = req.getParameter("jdk"); if(req.getParameter("hasCustomQuietPeriod")!=null) { quietPeriod = Integer.parseInt(req.getParameter("quiet_period")); } else { quietPeriod = null; } if(req.getParameter("hasCustomScmCheckoutRetryCount")!=null) { scmCheckoutRetryCount = Integer.parseInt(req.getParameter("scmCheckoutRetryCount")); } else { scmCheckoutRetryCount = null; } blockBuildWhenDownstreamBuilding = req.getParameter("blockBuildWhenDownstreamBuilding")!=null; blockBuildWhenUpstreamBuilding = req.getParameter("blockBuildWhenUpstreamBuilding")!=null; if(req.hasParameter("customWorkspace")) { customWorkspace = Util.fixEmptyAndTrim(req.getParameter("customWorkspace.directory")); } else { customWorkspace = null; } if (json.has("scmCheckoutStrategy")) scmCheckoutStrategy = req.bindJSON(SCMCheckoutStrategy.class, json.getJSONObject("scmCheckoutStrategy")); else scmCheckoutStrategy = null; if(req.getParameter("hasSlaveAffinity")!=null) { assignedNode = Util.fixEmptyAndTrim(req.getParameter("_.assignedLabelString")); } else { assignedNode = null; } canRoam = assignedNode==null; concurrentBuild = req.getSubmittedForm().has("concurrentBuild"); authToken = BuildAuthorizationToken.create(req); setScm(SCMS.parseSCM(req,this)); for (Trigger t : triggers()) t.stop(); triggers = buildDescribable(req, Trigger.for_(this)); for (Trigger t : triggers) t.start(this,true); }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2013-7330 - Severity: MEDIUM - CVSS Score: 4.0 Description: [SECURITY-55] This patch makes standard post-build action refuse to let you configure a downstream project you cannot currently build. The one from parameterized-trigger will show an error in the configure screen but still lets you save the configuration; needs an analogous patch to that plugin. Does not yet protect against POSTing config.xml with the trigger. (cherry picked from commit 757bc8a53956e6fbab267214e6e0896f03c3c262) Conflicts: core/src/main/java/hudson/model/Descriptor.java Function: submit File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins Fixed Code: @Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { super.submit(req,rsp); JSONObject json = req.getSubmittedForm(); makeDisabled(req.getParameter("disable")!=null); jdk = req.getParameter("jdk"); if(req.getParameter("hasCustomQuietPeriod")!=null) { quietPeriod = Integer.parseInt(req.getParameter("quiet_period")); } else { quietPeriod = null; } if(req.getParameter("hasCustomScmCheckoutRetryCount")!=null) { scmCheckoutRetryCount = Integer.parseInt(req.getParameter("scmCheckoutRetryCount")); } else { scmCheckoutRetryCount = null; } blockBuildWhenDownstreamBuilding = req.getParameter("blockBuildWhenDownstreamBuilding")!=null; blockBuildWhenUpstreamBuilding = req.getParameter("blockBuildWhenUpstreamBuilding")!=null; if(req.hasParameter("customWorkspace")) { customWorkspace = Util.fixEmptyAndTrim(req.getParameter("customWorkspace.directory")); } else { customWorkspace = null; } if (json.has("scmCheckoutStrategy")) scmCheckoutStrategy = req.bindJSON(SCMCheckoutStrategy.class, json.getJSONObject("scmCheckoutStrategy")); else scmCheckoutStrategy = null; if(req.getParameter("hasSlaveAffinity")!=null) { assignedNode = Util.fixEmptyAndTrim(req.getParameter("_.assignedLabelString")); } else { assignedNode = null; } canRoam = assignedNode==null; concurrentBuild = req.getSubmittedForm().has("concurrentBuild"); authToken = BuildAuthorizationToken.create(req); setScm(SCMS.parseSCM(req,this)); for (Trigger t : triggers()) t.stop(); triggers = buildDescribable(req, Trigger.for_(this)); for (Trigger t : triggers) t.start(this,true); for (Publisher _t : Descriptor.newInstancesFromHeteroList(req, json, "publisher", Jenkins.getInstance().getExtensionList(BuildTrigger.DescriptorImpl.class))) { BuildTrigger t = (BuildTrigger) _t; for (AbstractProject downstream : t.getChildProjects(this)) { downstream.checkPermission(BUILD); } } }
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
submit
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
1
Analyze the following code function for security vulnerabilities
@Override public SaServletFilter setAuth(SaFilterAuthStrategy auth) { this.auth = auth; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAuth File: sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
setAuth
sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
private String prefixUpgradeTargetLog(String line) { return ">>> " + line; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prefixUpgradeTargetLog File: server-core/src/main/java/io/onedev/server/maintenance/Upgrade.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-552" ]
CVE-2022-39208
HIGH
7.5
theonedev/onedev
prefixUpgradeTargetLog
server-core/src/main/java/io/onedev/server/maintenance/Upgrade.java
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
0
Analyze the following code function for security vulnerabilities
protected void onExit(int exitValue, @Nullable String errorMessage) { if (errorMessage != null) new PrintStream(err).println("ERROR: " + errorMessage); callback.onExit(exitValue); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onExit File: server-core/src/main/java/io/onedev/server/git/GitSshCommand.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
onExit
server-core/src/main/java/io/onedev/server/git/GitSshCommand.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
private void auditTeav( TrackedEntityAttributeValue av, TrackedEntityAttributeValue createOrUpdateTeav, org.hisp.dhis.common.AuditType auditType ) { String currentUsername = currentUserService.getCurrentUsername(); TrackedEntityAttributeValueAudit deleteTeavAudit = new TrackedEntityAttributeValueAudit( av, av.getAuditValue(), currentUsername, DELETE ); TrackedEntityAttributeValueAudit updatedTeavAudit = new TrackedEntityAttributeValueAudit( createOrUpdateTeav, createOrUpdateTeav.getValue(), currentUsername, auditType ); if ( config.isEnabled( CHANGELOG_TRACKER ) ) { trackedEntityAttributeValueAuditService.addTrackedEntityAttributeValueAudit( deleteTeavAudit ); trackedEntityAttributeValueAuditService.addTrackedEntityAttributeValueAudit( updatedTeavAudit ); } }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2022-24848 - Severity: MEDIUM - CVSS Score: 6.5 Description: Merge pull request from GHSA-52vp-f7hj-cj92 * fix: Add validation for programs org unit associations [DHIS2-13056] * fix compilation failure in test class * Fix one more compilation failure in another test class Co-authored-by: Lars Helge Øverland <lars@dhis2.org> Co-authored-by: Ameen <ameen@dhis2.org> Function: auditTeav File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java Repository: dhis2/dhis2-core Fixed Code: private void auditTeav( TrackedEntityAttributeValue av, TrackedEntityAttributeValue createOrUpdateTeav, org.hisp.dhis.common.AuditType auditType ) { String currentUsername = currentUserService.getCurrentUsername(); TrackedEntityAttributeValueAudit deleteTeavAudit = new TrackedEntityAttributeValueAudit( av, av.getAuditValue(), currentUsername, DELETE ); TrackedEntityAttributeValueAudit updatedTeavAudit = new TrackedEntityAttributeValueAudit( createOrUpdateTeav, createOrUpdateTeav.getValue(), currentUsername, auditType ); if ( config.isEnabled( CHANGELOG_TRACKER ) ) { trackedEntityAttributeValueAuditStore.addTrackedEntityAttributeValueAudit( deleteTeavAudit ); trackedEntityAttributeValueAuditStore.addTrackedEntityAttributeValueAudit( updatedTeavAudit ); } }
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
auditTeav
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
1
Analyze the following code function for security vulnerabilities
@Override public final V setValue(V value) { checkNotNull(value, "value"); V oldValue = this.value; this.value = value; return oldValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setValue File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
setValue
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } P4MaterialConfig that = (P4MaterialConfig) o; if (serverAndPort != null ? !serverAndPort.equals(that.serverAndPort) : that.serverAndPort != null) { return false; } if (useTickets != null ? !useTickets.equals(that.useTickets) : that.useTickets != null) { return false; } if (view != null ? !view.equals(that.view) : that.view != null) { return false; } if (userName != null ? !userName.equals(that.userName) : that.userName != null) { return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
equals
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private static void warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk( int targetSdkVersion, String name) { // If the app targets Lollipop MR1 or older SDK we warn, otherwise crash. if (targetSdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1) { if (Settings.System.PRIVATE_SETTINGS.contains(name)) { Slog.w(LOG_TAG, "You shouldn't not change private system settings." + " This will soon become an error."); } else { Slog.w(LOG_TAG, "You shouldn't keep your settings in the secure settings." + " This will soon become an error."); } } else { if (Settings.System.PRIVATE_SETTINGS.contains(name)) { throw new IllegalArgumentException("You cannot change private secure settings."); } else { throw new IllegalArgumentException("You cannot keep your settings in" + " the secure settings."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
@Override public JournaledFile makePoliciesVersionJournaledFile(int userId) { return DevicePolicyManagerService.this.makeJournaledFile(userId, POLICIES_VERSION_XML); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makePoliciesVersionJournaledFile 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
makePoliciesVersionJournaledFile
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static void initializeSystem() throws Exception { ComponentManager componentManager = new EmbeddableComponentManager(); // Only load the minimal number of components required for the test framework, for both performance reasons // and for avoiding having to declare dependencies such as HttpServletRequest. ComponentAnnotationLoader loader = new ComponentAnnotationLoader(); List<ComponentDeclaration> componentDeclarations = new ArrayList<>(); componentDeclarations.add(new ComponentDeclaration(DefaultStringEntityReferenceResolver.class.getName())); componentDeclarations.add(new ComponentDeclaration(DefaultStringEntityReferenceSerializer.class.getName())); componentDeclarations.add(new ComponentDeclaration(RelativeStringEntityReferenceResolver.class.getName())); componentDeclarations.add(new ComponentDeclaration(DefaultEntityReferenceProvider.class.getName())); componentDeclarations.add(new ComponentDeclaration(DefaultModelConfiguration.class.getName())); componentDeclarations.add(new ComponentDeclaration(DefaultSymbolScheme.class.getName())); loader.initialize(componentManager, AbstractTest.class.getClassLoader(), componentDeclarations); TestUtils.initializeComponent(componentManager); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeSystem File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
initializeSystem
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
public HTTPRequest.Method getLogoutEndPointMethod() { return getProperty(PROP_ENDPOINT_LOGOUT_METHOD, HTTPRequest.Method.GET); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLogoutEndPointMethod File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getLogoutEndPointMethod
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
@Override public PacketCollector createPacketCollectorAndSend(IQ packet) throws NotConnectedException, InterruptedException { StanzaFilter packetFilter = new IQReplyFilter(packet, this); // Create the packet collector before sending the packet PacketCollector packetCollector = createPacketCollectorAndSend(packetFilter, packet); return packetCollector; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createPacketCollectorAndSend File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
createPacketCollectorAndSend
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
private Set<Cookie> getCookies() { return this.cookies; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCookies File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getCookies
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
Call startOutgoingCall(Uri handle, PhoneAccountHandle phoneAccountHandle, Bundle extras) { Call call = getNewOutgoingCall(handle); List<PhoneAccountHandle> accounts = mPhoneAccountRegistrar.getCallCapablePhoneAccounts(handle.getScheme()); Log.v(this, "startOutgoingCall found accounts = " + accounts); if (mForegroundCall != null && mForegroundCall.getTargetPhoneAccount() != null) { // If there is an ongoing call, use the same phone account to place this new call. phoneAccountHandle = mForegroundCall.getTargetPhoneAccount(); } // Only dial with the requested phoneAccount if it is still valid. Otherwise treat this call // as if a phoneAccount was not specified (does the default behavior instead). // Note: We will not attempt to dial with a requested phoneAccount if it is disabled. if (phoneAccountHandle != null) { if (!accounts.contains(phoneAccountHandle)) { phoneAccountHandle = null; } } if (phoneAccountHandle == null) { // No preset account, check if default exists that supports the URI scheme for the // handle. PhoneAccountHandle defaultAccountHandle = mPhoneAccountRegistrar.getDefaultOutgoingPhoneAccount( handle.getScheme()); if (defaultAccountHandle != null) { phoneAccountHandle = defaultAccountHandle; } } call.setTargetPhoneAccount(phoneAccountHandle); boolean isEmergencyCall = TelephonyUtil.shouldProcessAsEmergency(mContext, call.getHandle()); boolean isPotentialInCallMMICode = isPotentialInCallMMICode(handle); // Do not support any more live calls. Our options are to move a call to hold, disconnect // a call, or cancel this call altogether. if (!isPotentialInCallMMICode && !makeRoomForOutgoingCall(call, isEmergencyCall)) { // just cancel at this point. Log.i(this, "No remaining room for outgoing call: %s", call); if (mCalls.contains(call)) { // This call can already exist if it is a reused call, // See {@link #getNewOutgoingCall}. call.disconnect(); } return null; } boolean needsAccountSelection = phoneAccountHandle == null && accounts.size() > 1 && !isEmergencyCall; if (needsAccountSelection) { // This is the state where the user is expected to select an account call.setState(CallState.PRE_DIAL_WAIT); extras.putParcelableList(android.telecom.Call.AVAILABLE_PHONE_ACCOUNTS, accounts); } else { call.setState(CallState.CONNECTING); } call.setExtras(extras); // Do not add the call if it is a potential MMI code. if ((isPotentialMMICode(handle) || isPotentialInCallMMICode) && !needsAccountSelection) { call.addListener(this); } else if (!mCalls.contains(call)) { // We check if mCalls already contains the call because we could potentially be reusing // a call which was previously added (See {@link #getNewOutgoingCall}). addCall(call); } return call; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startOutgoingCall File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
startOutgoingCall
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
public void setBackupProvisioned(boolean available) { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "setBackupProvisioned"); /* * This is now a no-op; provisioning is simply the device's own setup state. */ }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBackupProvisioned File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
setBackupProvisioned
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public int getRemotePort() { return connInfo.port; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemotePort File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
getRemotePort
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
@Override public Collection<LBVip> listVip(String vipId) { Collection<LBVip> result = new HashSet<LBVip>(); result.add(vips.get(vipId)); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listVip File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java Repository: floodlight The code follows secure coding practices.
[ "CWE-362", "CWE-476" ]
CVE-2015-6569
MEDIUM
4.3
floodlight
listVip
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
7f5bedb625eec3ff4d29987c31cef2553a962b36
0
Analyze the following code function for security vulnerabilities
private void selectPages(List pagesToKeep) { IntHashtable pg = new IntHashtable(); ArrayList finalPages = new ArrayList(); int psize = size(); for (Iterator it = pagesToKeep.iterator(); it.hasNext();) { Integer pi = (Integer)it.next(); int p = pi.intValue(); if (p >= 1 && p <= psize && pg.put(p, 1) == 0) finalPages.add(pi); } if (reader.partial) { for (int k = 1; k <= psize; ++k) { getPageOrigRef(k); resetReleasePage(); } } PRIndirectReference parent = (PRIndirectReference)reader.catalog.get(PdfName.PAGES); PdfDictionary topPages = (PdfDictionary)PdfReader.getPdfObject(parent); ArrayList newPageRefs = new ArrayList(finalPages.size()); PdfArray kids = new PdfArray(); for (int k = 0; k < finalPages.size(); ++k) { int p = ((Integer)finalPages.get(k)).intValue(); PRIndirectReference pref = getPageOrigRef(p); resetReleasePage(); kids.add(pref); newPageRefs.add(pref); getPageN(p).put(PdfName.PARENT, parent); } AcroFields af = reader.getAcroFields(); boolean removeFields = (af.getFields().size() > 0); for (int k = 1; k <= psize; ++k) { if (!pg.containsKey(k)) { if (removeFields) af.removeFieldsFromPage(k); PRIndirectReference pref = getPageOrigRef(k); int nref = pref.getNumber(); reader.xrefObj.set(nref, null); if (reader.partial) { reader.xref[nref * 2] = -1; reader.xref[nref * 2 + 1] = 0; } } } topPages.put(PdfName.COUNT, new PdfNumber(finalPages.size())); topPages.put(PdfName.KIDS, kids); refsp = null; refsn = newPageRefs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectPages File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
selectPages
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasPermission(Permission permission) { // no one should be allowed to delete the master. // this hides the "delete" link from the /computer/(master) page. if(permission==Computer.DELETE) return false; // Configuration of master node requires ADMINISTER permission return super.hasPermission(permission==Computer.CONFIGURE ? Jenkins.ADMINISTER : permission); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasPermission File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
hasPermission
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void setScrollingEnabled(final boolean enabled){ this.scrollingEnabled = enabled; act.runOnUiThread(new Runnable() { public void run() { web.setHorizontalScrollBarEnabled(enabled); web.setVerticalScrollBarEnabled(enabled); if ( !enabled ){ web.setOnTouchListener(new View.OnTouchListener(){ @Override public boolean onTouch(View view, MotionEvent me) { return (me.getAction() == MotionEvent.ACTION_MOVE); } }); } else { web.setOnTouchListener(null); } } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setScrollingEnabled File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
setScrollingEnabled
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public boolean installCaCert(ComponentName admin, String callerPackage, byte[] certBuffer) { if (!mHasFeature) { return false; } final CallerIdentity caller = getCallerIdentity(admin, callerPackage); Preconditions.checkCallAuthorization(canManageCaCerts(caller)); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_INSTALL_CA_CERT); final String alias = mInjector.binderWithCleanCallingIdentity(() -> { String installedAlias = mCertificateMonitor.installCaCert( caller.getUserHandle(), certBuffer); DevicePolicyEventLogger .createEvent(DevicePolicyEnums.INSTALL_CA_CERT) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ admin == null) .write(); return installedAlias; }); if (alias == null) { Slogf.w(LOG_TAG, "Problem installing cert"); return false; } synchronized (getLockObject()) { getUserData(caller.getUserId()).mOwnerInstalledCaCerts.add(alias); saveSettingsLocked(caller.getUserId()); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: installCaCert 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
installCaCert
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Test public void save4doNotReturnId(TestContext context) { createFoo(context).save(FOO, xPojo, /* returnId */ false, context.asyncAssertSuccess(save -> { context.assertEquals("", save); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save4doNotReturnId 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
save4doNotReturnId
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
void setLastExclusionHeights(int side, int requested, int granted) { boolean changed = mLastGrantedExclusionHeight[side] != granted || mLastRequestedExclusionHeight[side] != requested; if (changed) { if (mLastShownChangedReported) { logExclusionRestrictions(side); } mLastGrantedExclusionHeight[side] = granted; mLastRequestedExclusionHeight[side] = requested; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLastExclusionHeights 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
setLastExclusionHeights
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public ServerBuilder verboseResponses(boolean verboseResponses) { virtualHostTemplate.verboseResponses(verboseResponses); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verboseResponses File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
verboseResponses
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
public boolean isDebugging() { return debugging; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDebugging 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
isDebugging
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 String getLine1NumberForSubscriber(int subId) { PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId); if (phoneSubInfoProxy != null) { return phoneSubInfoProxy.getLine1Number(); } else { Rlog.e(TAG,"getLine1Number phoneSubInfoProxy is" + " null for Subscription:" + subId); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLine1NumberForSubscriber File: src/java/com/android/internal/telephony/PhoneSubInfoController.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-0831
MEDIUM
4.3
android
getLine1NumberForSubscriber
src/java/com/android/internal/telephony/PhoneSubInfoController.java
79eecef63f3ea99688333c19e22813f54d4a31b1
0
Analyze the following code function for security vulnerabilities
@Override public SaReactorFilter setIncludeList(List<String> pathList) { includeList = pathList; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIncludeList File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
setIncludeList
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
public void addViolation(String message) { violationOccurred = true; String messageTemplate = escapeEl(message); context.buildConstraintViolationWithTemplate(messageTemplate) .addConstraintViolation(); }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2020-11002 - Severity: HIGH - CVSS Score: 9.0 Description: Disable message interpolation in ConstraintViolations by default (#3208) Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`. Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation. The message parameters will be escaped by default. Refs #3153 Refs #3157 Function: addViolation File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java Repository: dropwizard Fixed Code: public void addViolation(String message) { addViolation(message, Collections.emptyMap()); }
[ "CWE-74" ]
CVE-2020-11002
HIGH
9
dropwizard
addViolation
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
d5a512f7abf965275f2a6b913ac4fe778e424242
1
Analyze the following code function for security vulnerabilities
@Override public void setAccessibilityServiceUids(IntArray uids) { synchronized (mGlobalLock) { mAccessibilityServiceUids = uids.toArray(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAccessibilityServiceUids 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
setAccessibilityServiceUids
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public int startActivityWithConfig(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, Configuration newConfig, Bundle options, int userId) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityWithConfig File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
startActivityWithConfig
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void handleGetAccountsResult( IAccountManagerResponse response, Account[] accounts, String callingPackage) { if (needToStartChooseAccountActivity(accounts, callingPackage)) { startChooseAccountActivityWithAccounts(response, accounts, callingPackage); return; } if (accounts.length == 1) { Bundle bundle = new Bundle(); bundle.putString(AccountManager.KEY_ACCOUNT_NAME, accounts[0].name); bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, accounts[0].type); onResult(response, bundle); return; } // No qualified account exists, return an empty Bundle. onResult(response, new Bundle()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleGetAccountsResult File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
handleGetAccountsResult
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
void setDrawnStateEvaluated(boolean evaluated) { mDrawnStateEvaluated = evaluated; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDrawnStateEvaluated 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
setDrawnStateEvaluated
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@CriticalNative private static final native int nativeGetSourceResId(long state);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetSourceResId File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeGetSourceResId
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
protected Map<String, List<String>> buildResponseHeaders(Response response) { Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>(); for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) { List<Object> values = entry.getValue(); List<String> headers = new ArrayList<String>(); for (Object o : values) { headers.add(String.valueOf(o)); } responseHeaders.put(entry.getKey(), headers); } return responseHeaders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildResponseHeaders File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/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
buildResponseHeaders
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override public void beginWikiDocumentLocale(Locale locale, FilterEventParameters parameters) throws FilterException { this.currentLocale = locale; this.currentLocaleParameters = parameters; begin(parameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginWikiDocumentLocale File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
beginWikiDocumentLocale
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
void startRemove(IBinder token, int fingerId, int groupId, int userId, IFingerprintServiceReceiver receiver, boolean restricted) { IFingerprintDaemon daemon = getFingerprintDaemon(); if (daemon == null) { Slog.w(TAG, "startRemove: no fingeprintd!"); return; } RemovalClient client = new RemovalClient(getContext(), mHalDeviceId, token, receiver, fingerId, groupId, userId, restricted, token.toString()) { @Override public void notifyUserActivity() { FingerprintService.this.userActivity(); } @Override public IFingerprintDaemon getFingerprintDaemon() { return FingerprintService.this.getFingerprintDaemon(); } }; startClient(client, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startRemove File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
startRemove
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public final int startActivity(IApplicationThread caller, String callingPackage, String callingFeatureId, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions) { return startActivityAsUser(caller, callingPackage, callingFeatureId, intent, resolvedType, resultTo, resultWho, requestCode, startFlags, profilerInfo, bOptions, UserHandle.getCallingUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivity 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
startActivity
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private static void checkDowngrade(PackageParser.Package before, PackageInfoLite after) throws PackageManagerException { if (after.versionCode < before.mVersionCode) { throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE, "Update version code " + after.versionCode + " is older than current " + before.mVersionCode); } else if (after.versionCode == before.mVersionCode) { if (after.baseRevisionCode < before.baseRevisionCode) { throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE, "Update base revision code " + after.baseRevisionCode + " is older than current " + before.baseRevisionCode); } if (!ArrayUtils.isEmpty(after.splitNames)) { for (int i = 0; i < after.splitNames.length; i++) { final String splitName = after.splitNames[i]; final int j = ArrayUtils.indexOf(before.splitNames, splitName); if (j != -1) { if (after.splitRevisionCodes[i] < before.splitRevisionCodes[j]) { throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE, "Update split " + splitName + " revision code " + after.splitRevisionCodes[i] + " is older than current " + before.splitRevisionCodes[j]); } } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkDowngrade 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
checkDowngrade
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void setEnabled(boolean enabled) { this.enabled = enabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEnabled File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-18213
MEDIUM
6.5
eclipse/lemminx
setEnabled
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java
c8bf3245a72cace50ee2aae5eee69538c58ce056
0
Analyze the following code function for security vulnerabilities
@Override public T setByte(K name, byte value) { return set(name, fromByte(name, value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setByte File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
setByte
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public static PSystemVersion createKeyDistributor(UmlSource source) throws IOException { final LicenseInfo license = LicenseInfo.retrieveDistributor(); BufferedImage im = null; final List<String> strings = new ArrayList<>(); if (license == null) { strings.add("No license found"); } else { strings.add(license.getOwner()); strings.add(license.getContext()); strings.add(license.getGenerationDate().toString()); strings.add(license.getExpirationDate().toString()); im = LicenseInfo.retrieveDistributorImage(license); } return new PSystemVersion(source, strings, im); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createKeyDistributor File: src/net/sourceforge/plantuml/version/PSystemVersion.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
createKeyDistributor
src/net/sourceforge/plantuml/version/PSystemVersion.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
final void dumpApplicationMemoryUsage(FileDescriptor fd, PrintWriter pw, String prefix, String[] args, boolean brief, PrintWriter categoryPw, boolean asProto) { MemoryUsageDumpOptions opts = new MemoryUsageDumpOptions(); opts.dumpDetails = false; opts.dumpFullDetails = false; opts.dumpDalvik = false; opts.dumpSummaryOnly = false; opts.dumpUnreachable = false; opts.oomOnly = false; opts.isCompact = false; opts.localOnly = false; opts.packages = false; opts.isCheckinRequest = false; opts.dumpSwapPss = false; opts.dumpProto = asProto; int opti = 0; while (opti < args.length) { String opt = args[opti]; if (opt == null || opt.length() <= 0 || opt.charAt(0) != '-') { break; } opti++; if ("-a".equals(opt)) { opts.dumpDetails = true; opts.dumpFullDetails = true; opts.dumpDalvik = true; opts.dumpSwapPss = true; } else if ("-d".equals(opt)) { opts.dumpDalvik = true; } else if ("-c".equals(opt)) { opts.isCompact = true; } else if ("-s".equals(opt)) { opts.dumpDetails = true; opts.dumpSummaryOnly = true; } else if ("-S".equals(opt)) { opts.dumpSwapPss = true; } else if ("--unreachable".equals(opt)) { opts.dumpUnreachable = true; } else if ("--oom".equals(opt)) { opts.oomOnly = true; } else if ("--local".equals(opt)) { opts.localOnly = true; } else if ("--package".equals(opt)) { opts.packages = true; } else if ("--checkin".equals(opt)) { opts.isCheckinRequest = true; } else if ("--proto".equals(opt)) { opts.dumpProto = true; } else if ("-h".equals(opt)) { pw.println("meminfo dump options: [-a] [-d] [-c] [-s] [--oom] [process]"); pw.println(" -a: include all available information for each process."); pw.println(" -d: include dalvik details."); pw.println(" -c: dump in a compact machine-parseable representation."); pw.println(" -s: dump only summary of application memory usage."); pw.println(" -S: dump also SwapPss."); pw.println(" --oom: only show processes organized by oom adj."); pw.println(" --local: only collect details locally, don't call process."); pw.println(" --package: interpret process arg as package, dumping all"); pw.println(" processes that have loaded that package."); pw.println(" --checkin: dump data for a checkin"); pw.println(" --proto: dump data to proto"); pw.println("If [process] is specified it can be the name or "); pw.println("pid of a specific process to dump."); return; } else { pw.println("Unknown argument: " + opt + "; use -h for help"); } } String[] innerArgs = new String[args.length-opti]; System.arraycopy(args, opti, innerArgs, 0, args.length-opti); ArrayList<ProcessRecord> procs = collectProcesses(pw, opti, opts.packages, args); if (opts.dumpProto) { dumpApplicationMemoryUsage(fd, opts, innerArgs, brief, procs); } else { dumpApplicationMemoryUsage(fd, pw, prefix, opts, innerArgs, brief, procs, categoryPw); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpApplicationMemoryUsage 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
dumpApplicationMemoryUsage
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private void wtfIfInLock() { if (Thread.holdsLock(mLockDoNoUseDirectly)) { Slogf.wtfStack(LOG_TAG, "Shouldn't be called with DPMS lock held"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wtfIfInLock 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
wtfIfInLock
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static void importFile(FF4j ff4j, FF4jConfiguration config) throws IOException { if (config.isAutoCreate()) { ff4j.setAutocreate(true); LOGGER.info("Autocreate is now enabled."); } if (config.isAudit()) { ff4j.setEnableAudit(true); LOGGER.info("Audit is now enabled."); } FeatureStore store = ff4j.getFeatureStore(); Map<String, Feature> mapsOfFeat = config.getFeatures(); for (Entry<String, Feature> feature : mapsOfFeat.entrySet()) { if (store.exist(feature.getKey())) { store.update(feature.getValue()); } else { store.create(feature.getValue()); } } LOGGER.info(mapsOfFeat.size() + " features have been imported."); PropertyStore pstore = ff4j.getPropertiesStore(); Map<String, Property<?>> mapsOfProperties = config.getProperties(); for (Entry<String, Property<?>> p : mapsOfProperties.entrySet()) { if (pstore.existProperty(p.getKey())) { pstore.updateProperty(p.getValue()); } else { pstore.createProperty(p.getValue()); } } LOGGER.info(mapsOfProperties.size() + " features have been imported."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: importFile File: ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java Repository: ff4j The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-44262
CRITICAL
9.8
ff4j
importFile
ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
991df72725f78adbc413d9b0fbb676201f1882e0
0
Analyze the following code function for security vulnerabilities
void setHasSurface(boolean hasSurface) { mHasSurface = hasSurface; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHasSurface 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
setHasSurface
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public void deleteObject(String space, String page, String className, int objectNumber) throws Exception { TestUtils.assertStatusCodes( rest().executeDelete(ObjectResource.class, getCurrentWiki(), space, page, className, objectNumber), true, STATUS_NO_CONTENT_NOT_FOUND); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteObject File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
deleteObject
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public @Nullable LabelAtom getLabelAtom(@CheckForNull String name) { if (name==null) return null; while(true) { Label l = labels.get(name); if(l!=null) return (LabelAtom)l; // non-existent LabelAtom la = new LabelAtom(name); if (labels.putIfAbsent(name, la)==null) la.load(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLabelAtom File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getLabelAtom
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public boolean fullySupports3DBiomes() { // Supports if API does and we're not in the overworld return HAS_3D_BIOMES && getWorld().getEnvironment() != World.Environment.NORMAL || PaperLib.isVersion(18); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fullySupports3DBiomes File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
fullySupports3DBiomes
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
public static String changesetUrl(Modification modification, String baseUrl, final long id) { return baseUrl + "/api/materials/" + id + "/changeset/" + modification.getRevision() + ".xml"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: changesetUrl File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
changesetUrl
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
private TableRows optionRowHighlight(Object value) { if (value instanceof TableRows || value == null) { return (TableRows) value; } else if (value instanceof String) { String val = ((String) value).trim().toUpperCase(); if (!val.isEmpty() && !val.equals("NULL")) { return TableRows.valueOf(val); } else { return null; } } throw new IllegalArgumentException("rowHighlight has a bad option value type: " + value.getClass()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optionRowHighlight File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
optionRowHighlight
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
public String getProperty(String key, String def) { return prop.getProperty(key, def); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProperty File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getProperty
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Override public boolean isPermissionRevokedByPolicy(String permission, String packageName, int userId) { if (UserHandle.getCallingUserId() != userId) { mContext.enforceCallingPermission( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, "isPermissionRevokedByPolicy for user " + userId); } if (checkPermission(permission, packageName, userId) == PackageManager.PERMISSION_GRANTED) { return false; } final long identity = Binder.clearCallingIdentity(); try { final int flags = getPermissionFlags(permission, packageName, userId); return (flags & PackageManager.FLAG_PERMISSION_POLICY_FIXED) != 0; } finally { Binder.restoreCallingIdentity(identity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPermissionRevokedByPolicy 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
isPermissionRevokedByPolicy
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private Integer[] getCategoryIds(Boolean containChild, Integer categoryId, Integer[] categoryIds) { if (CommonUtils.empty(categoryId)) { return categoryIds; } else if (null != containChild && containChild) { CmsCategory category = categoryDao.getEntity(categoryId); if (null != category && CommonUtils.notEmpty(category.getChildIds())) { String[] categoryStringIds = ArrayUtils.add( StringUtils.splitByWholeSeparator(category.getChildIds(), CommonConstants.COMMA_DELIMITED), String.valueOf(categoryId)); categoryIds = new Integer[categoryStringIds.length + 1]; for (int i = 0; i < categoryStringIds.length; i++) { categoryIds[i] = Integer.parseInt(categoryStringIds[i]); } categoryIds[categoryStringIds.length] = categoryId; } } else { categoryIds = new Integer[] { categoryId }; } return categoryIds; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCategoryIds File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getCategoryIds
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override public void setLong(String key, long value, int userId) throws RemoteException { checkWritePermission(userId); setStringUnchecked(key, userId, Long.toString(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLong File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-255" ]
CVE-2016-3749
MEDIUM
4.6
android
setLong
services/core/java/com/android/server/LockSettingsService.java
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsFloat03() throws Exception { Duration value = READER.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS) .readValue("13498.000008374"); assertNotNull("The value should not be null.", value); assertEquals("The value is not correct.", Duration.ofSeconds(13498L, 8374), value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationAsFloat03 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsFloat03
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
@Override public void disable(int state1, int state2, boolean animate) { animate &= mStatusBarWindowState != WINDOW_STATE_HIDDEN; mDisabledUnmodified1 = state1; mDisabledUnmodified2 = state2; final int old1 = mDisabled1; final int diff1 = state1 ^ old1; mDisabled1 = state1; final int old2 = mDisabled2; final int diff2 = state2 ^ old2; mDisabled2 = state2; if (DEBUG) { Log.d(TAG, String.format("disable1: 0x%08x -> 0x%08x (diff1: 0x%08x)", old1, state1, diff1)); Log.d(TAG, String.format("disable2: 0x%08x -> 0x%08x (diff2: 0x%08x)", old2, state2, diff2)); } StringBuilder flagdbg = new StringBuilder(); flagdbg.append("disable<"); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_EXPAND)) ? 'E' : 'e'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_EXPAND)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS)) ? 'I' : 'i'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ICONS)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS)) ? 'A' : 'a'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_SYSTEM_INFO)) ? 'S' : 's'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_SYSTEM_INFO)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_BACK)) ? 'B' : 'b'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_BACK)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_HOME)) ? 'H' : 'h'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_HOME)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_RECENT)) ? 'R' : 'r'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_RECENT)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_CLOCK)) ? 'C' : 'c'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_CLOCK)) ? '!' : ' '); flagdbg.append(0 != ((state1 & StatusBarManager.DISABLE_SEARCH)) ? 'S' : 's'); flagdbg.append(0 != ((diff1 & StatusBarManager.DISABLE_SEARCH)) ? '!' : ' '); flagdbg.append(0 != ((state2 & StatusBarManager.DISABLE2_QUICK_SETTINGS)) ? 'Q' : 'q'); flagdbg.append(0 != ((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS)) ? '!' : ' '); flagdbg.append('>'); Log.d(TAG, flagdbg.toString()); if ((diff1 & StatusBarManager.DISABLE_EXPAND) != 0) { if ((state1 & StatusBarManager.DISABLE_EXPAND) != 0) { animateCollapsePanels(); } } if ((diff1 & StatusBarManager.DISABLE_RECENT) != 0) { if ((state1 & StatusBarManager.DISABLE_RECENT) != 0) { // close recents if it's visible mHandler.removeMessages(MSG_HIDE_RECENT_APPS); mHandler.sendEmptyMessage(MSG_HIDE_RECENT_APPS); } } if ((diff1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0) { mDisableNotificationAlerts = (state1 & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) != 0; mHeadsUpObserver.onChange(true); } if ((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) { updateQsExpansionEnabled(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disable 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
disable
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static Resource createNewResource(URI uri) { // This will return an ArchimateResource as registered in plugin.xml ResourceSet resourceSet = createResourceSet(); return resourceSet.createResource(uri); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createNewResource File: com.archimatetool.model/src/com/archimatetool/model/util/ArchimateResourceFactory.java Repository: archimatetool/archi The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40235
MEDIUM
6.5
archimatetool/archi
createNewResource
com.archimatetool.model/src/com/archimatetool/model/util/ArchimateResourceFactory.java
bcab676beddfbeddffecacf755b6692f0b0151f1
0
Analyze the following code function for security vulnerabilities
public String dialogButtonRow(int segment) { if (segment == HTML_START) { return "<!-- button row start -->\n<div class=\"dialogbuttons\" unselectable=\"on\">\n"; } else { return "</div>\n<!-- button row end -->\n"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dialogButtonRow File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
dialogButtonRow
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public boolean hasErrors() { return !errors.isEmpty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasErrors File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
hasErrors
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
@Override public void setSystemUpdatePolicy( ComponentName who, String callerPackageName, SystemUpdatePolicy policy) { if (policy != null) { // throws exception if policy type is invalid policy.validateType(); // throws exception if freeze period is invalid policy.validateFreezePeriods(); Pair<LocalDate, LocalDate> record = mOwners.getSystemUpdateFreezePeriodRecord(); // throws exception if freeze period is incompatible with previous freeze period record policy.validateAgainstPreviousFreezePeriod(record.first, record.second, LocalDate.now()); } CallerIdentity caller; synchronized (getLockObject()) { if (isPermissionCheckFlagEnabled()) { caller = getCallerIdentity(who, callerPackageName); enforcePermission(MANAGE_DEVICE_POLICY_SYSTEM_UPDATES, caller.getPackageName(), UserHandle.USER_ALL); } else { caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isProfileOwnerOfOrganizationOwnedDevice(caller) || isDefaultDeviceOwner(caller)); } checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_SYSTEM_UPDATE_POLICY); if (policy == null) { mOwners.clearSystemUpdatePolicy(); } else { mOwners.setSystemUpdatePolicy(policy); updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ false); } mOwners.writeDeviceOwner(); } mInjector.binderWithCleanCallingIdentity(() -> mContext.sendBroadcastAsUser( new Intent(ACTION_SYSTEM_UPDATE_POLICY_CHANGED), UserHandle.SYSTEM)); DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_SYSTEM_UPDATE_POLICY) .setAdmin(caller.getPackageName()) .setInt(policy != null ? policy.getPolicyType() : 0) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSystemUpdatePolicy File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setSystemUpdatePolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
protected void _skipIncomplete() throws IOException { _tokenIncomplete = false; final int type = ((_typeByte >> 5) & 0x7); // Either String or byte[] if (type != CBORConstants.MAJOR_TYPE_TEXT && type == CBORConstants.MAJOR_TYPE_TEXT) { _throwInternal(); } final int lowBits = _typeByte & 0x1F; if (lowBits <= 23) { if (lowBits > 0) { _skipBytes(lowBits); } return; } switch (lowBits) { case 24: _skipBytes(_decode8Bits()); break; case 25: _skipBytes(_decode16Bits()); break; case 26: _skipBytes(_decode32Bits()); break; case 27: // seriously? _skipBytesL(_decode64Bits()); break; case 31: _skipChunked(type); break; default: _invalidToken(_typeByte); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _skipIncomplete File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_skipIncomplete
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
public static File writeStreamToTempFile(InputStream inputStream, String tempFileSuffix) throws IOException { FileOutputStream outputStream = null; try { File file = File.createTempFile("mpxj", tempFileSuffix); outputStream = new FileOutputStream(file); byte[] buffer = new byte[1024]; while (true) { int bytesRead = inputStream.read(buffer); if (bytesRead == -1) { break; } outputStream.write(buffer, 0, bytesRead); } return file; } finally { if (outputStream != null) { outputStream.close(); } } }
Vulnerability Classification: - CWE: CWE-377, CWE-200 - CVE: CVE-2022-41954 - Severity: LOW - CVSS Score: 3.3 Description: vuln-fix: Temporary File Information Disclosure This fixes temporary file information disclosure vulnerability due to the use of the vulnerable `File.createTempFile()` method. The vulnerability is fixed by using the `Files.createTempFile()` method which sets the correct posix permissions. Weakness: CWE-377: Insecure Temporary File Severity: Medium CVSSS: 5.5 Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.SecureTempFileCreation) Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/18 Co-authored-by: Moderne <team@moderne.io> Function: writeStreamToTempFile File: src/main/java/net/sf/mpxj/common/InputStreamHelper.java Repository: joniles/mpxj Fixed Code: public static File writeStreamToTempFile(InputStream inputStream, String tempFileSuffix) throws IOException { FileOutputStream outputStream = null; try { File file = Files.createTempFile("mpxj", tempFileSuffix).toFile(); outputStream = new FileOutputStream(file); byte[] buffer = new byte[1024]; while (true) { int bytesRead = inputStream.read(buffer); if (bytesRead == -1) { break; } outputStream.write(buffer, 0, bytesRead); } return file; } finally { if (outputStream != null) { outputStream.close(); } } }
[ "CWE-377", "CWE-200" ]
CVE-2022-41954
LOW
3.3
joniles/mpxj
writeStreamToTempFile
src/main/java/net/sf/mpxj/common/InputStreamHelper.java
ae0af24345d79ad45705265d9927fe55e94a5721
1
Analyze the following code function for security vulnerabilities
@NonNull public Builder setAllowGeneratedReplies(boolean allowGeneratedReplies) { mAllowGeneratedReplies = allowGeneratedReplies; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowGeneratedReplies File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setAllowGeneratedReplies
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String getGroupIdLevel1() { return getGroupIdLevel1ForSubscriber(getDefaultSubscription()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGroupIdLevel1 File: src/java/com/android/internal/telephony/PhoneSubInfoController.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-0831
MEDIUM
4.3
android
getGroupIdLevel1
src/java/com/android/internal/telephony/PhoneSubInfoController.java
79eecef63f3ea99688333c19e22813f54d4a31b1
0
Analyze the following code function for security vulnerabilities
@Test public void deleteByIdNullConnection(TestContext context) { createFoo(context).delete(null, FOO, randomUuid(), context.asyncAssertFailure(fail -> { context.assertTrue(fail instanceof NullPointerException); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteByIdNullConnection 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
deleteByIdNullConnection
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public DisplayContent getDefaultDisplayContentLocked() { return getDisplayContentLocked(Display.DEFAULT_DISPLAY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultDisplayContentLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
getDefaultDisplayContentLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public boolean removeOverrideApn(@NonNull ComponentName admin, int apnId) { throwIfParentInstance("removeOverrideApn"); if (mService != null) { try { return mService.removeOverrideApn(admin, apnId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeOverrideApn 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
removeOverrideApn
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private String getWikiProtocol(WikiDescriptor wikiDescriptor) { // Try wiki descriptor Boolean secure = wikiDescriptor.isSecure(); if (secure != null) { return wikiDescriptor.isSecure() == Boolean.TRUE ? "https" : "http"; } // Try configuration String protocol = getConfiguration().getProperty("xwiki.url.protocol"); if (protocol != null) { return protocol; } // Try main wiki try { secure = getWikiDescriptorManager().getMainWikiDescriptor().isSecure(); if (secure != null) { return secure ? "https" : "http"; } } catch (WikiManagerException e) { LOGGER.error("Failed to get main wiki descriptor", e); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWikiProtocol 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
getWikiProtocol
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public Path getManifestPath() { return manifestPath; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getManifestPath File: src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
getManifestPath
src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java
699490be8e931af0ef1f135c55384db1f4232637
0
Analyze the following code function for security vulnerabilities
@Override protected final void validateConcreteMaterial(ValidationContext validationContext) { validateNotOutsideSandbox(); validateDestFolderPath(); validateConcreteScmMaterial(validationContext); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateConcreteMaterial File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
validateConcreteMaterial
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override void onCancelFixedRotationTransform(int originalDisplayRotation) { if (this != mDisplayContent.getLastOrientationSource()) { // This activity doesn't affect display rotation. return; } final int requestedOrientation = getRequestedConfigurationOrientation(); if (requestedOrientation != ORIENTATION_UNDEFINED && requestedOrientation != mDisplayContent.getConfiguration().orientation) { // Only need to handle the activity that can be rotated with display or the activity // has requested the same orientation. return; } mDisplayContent.mPinnedTaskController.onCancelFixedRotationTransform(); // Perform rotation animation according to the rotation of this activity. startFreezingScreen(originalDisplayRotation); // This activity may relaunch or perform configuration change so once it has reported drawn, // the screen can be unfrozen. ensureActivityConfiguration(0 /* globalChanges */, !PRESERVE_WINDOWS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCancelFixedRotationTransform 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
onCancelFixedRotationTransform
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public static int getBitModel() { String prop = System.getProperty("sun.arch.data.model"); if (prop == null) { prop = System.getProperty("com.ibm.vm.bitmode"); } if( prop!=null ) { return Integer.parseInt(prop); } return -1; // we don't know.. }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBitModel File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java Repository: fusesource/hawtjni The code follows secure coding practices.
[ "CWE-94" ]
CVE-2013-2035
MEDIUM
4.4
fusesource/hawtjni
getBitModel
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
92c266170ce98edc200c656bd034a237098b8aa5
0
Analyze the following code function for security vulnerabilities
private void blockUnLoginRequestHandler(Invocation ai) { if (ai.getActionKey().startsWith("/api")) { ExceptionResponse exceptionResponse = new ExceptionResponse(); exceptionResponse.setError(1); exceptionResponse.setMessage(I18nUtil.getStringFromRes("admin.session.timeout")); ai.getController().renderJson(exceptionResponse); } else { try { loginRender(ai.getController()); } catch (Exception e) { LOGGER.error("", e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: blockUnLoginRequestHandler File: web/src/main/java/com/zrlog/web/interceptor/AdminInterceptor.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
blockUnLoginRequestHandler
web/src/main/java/com/zrlog/web/interceptor/AdminInterceptor.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
private static void onRestoreComplete(int returnCode, Context context, IntentSender target) { Intent fillIn = new Intent(); fillIn.putExtra(PackageInstaller.EXTRA_STATUS, PackageManager.installStatusToPublicStatus(returnCode)); try { final BroadcastOptions options = BroadcastOptions.makeBasic(); options.setPendingIntentBackgroundActivityLaunchAllowed(false); target.sendIntent(context, 0, fillIn, null /* onFinished*/, null /* handler */, null /* requiredPermission */, options.toBundle()); } catch (IntentSender.SendIntentException ignored) { } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRestoreComplete File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
onRestoreComplete
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
default void onNetworkPermanentlyDisabled(@NonNull WifiConfiguration config, int disableReason) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNetworkPermanentlyDisabled 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
onNetworkPermanentlyDisabled
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
void updateGestureStateListener(int gestureType) { for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIterator.hasNext();) { GestureStateListener listener = mGestureStateListenersIterator.next(); switch (gestureType) { case GestureEventType.PINCH_BEGIN: listener.onPinchStarted(); break; case GestureEventType.PINCH_END: listener.onPinchEnded(); break; case GestureEventType.FLING_END: listener.onFlingEndGesture( computeVerticalScrollOffset(), computeVerticalScrollExtent()); break; case GestureEventType.FLING_CANCEL: listener.onFlingCancelGesture(); break; case GestureEventType.SCROLL_START: listener.onScrollStarted( computeVerticalScrollOffset(), computeVerticalScrollExtent()); break; case GestureEventType.SCROLL_END: listener.onScrollEnded( computeVerticalScrollOffset(), computeVerticalScrollExtent()); break; default: break; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateGestureStateListener File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
updateGestureStateListener
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private CallerIdentity getCallerIdentity(@Nullable String callerPackage) { return getCallerIdentity(null, callerPackage); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallerIdentity File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getCallerIdentity
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void forceStopPackageLocked(final String packageName, int uid, String reason) { forceStopPackageLocked(packageName, UserHandle.getAppId(uid), false, false, true, false, false, UserHandle.getUserId(uid), reason); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forceStopPackageLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
forceStopPackageLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@POST @Produces(MediaType.TEXT_HTML) @Path("ingest") @RestQuery(name = "ingest", description = "Ingest the completed media package into the system, retrieving all URL-referenced files", restParameters = { @RestParameter(description = "The media package", isRequired = true, name = "mediaPackage", type = RestParameter.Type.TEXT), @RestParameter(description = "Workflow definition id", isRequired = false, name = WORKFLOW_DEFINITION_ID_PARAM, type = RestParameter.Type.STRING), @RestParameter(description = "The workflow instance ID to associate with this zipped mediapackage", isRequired = false, name = WORKFLOW_INSTANCE_ID_PARAM, type = RestParameter.Type.STRING) }, reponses = { @RestResponse(description = "Returns the media package", responseCode = HttpServletResponse.SC_OK), @RestResponse(description = "Media package not valid", responseCode = HttpServletResponse.SC_BAD_REQUEST) }, returnDescription = "") public Response ingest(@Context HttpServletRequest request) { return ingest(null, request); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ingest File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java Repository: opencast The code follows secure coding practices.
[ "CWE-74" ]
CVE-2020-5230
MEDIUM
5
opencast
ingest
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
bbb473f34ab95497d6c432c81285efb0c739f317
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationFromStringAsNumber() throws Exception { // First, baseline test with floating-point numbers Instant inst = Instant.now(); String json = MAPPER.writer() .with(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .with(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS) .writeValueAsString(inst); Instant result = MAPPER.readValue(json, Instant.class); assertNotNull(result); assertEquals(result, inst); // but then quoted as JSON String result = MAPPER.readValue(String.format("\"%s\"", json), Instant.class); assertNotNull(result); assertEquals(result, inst); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationFromStringAsNumber File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationFromStringAsNumber
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
private static native void nativeSetConfiguration(long ptr, int mcc, int mnc, @Nullable String locale, int orientation, int touchscreen, int density, int keyboard, int keyboardHidden, int navigation, int screenWidth, int screenHeight, int smallestScreenWidthDp, int screenWidthDp, int screenHeightDp, int screenLayout, int uiMode, int colorMode, int grammaticalGender, int majorVersion);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeSetConfiguration File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeSetConfiguration
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0