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 String elementAsString() { try { return super.elementAsString(); } catch (TransformerException e) { throw wrapExceptionAsRuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: elementAsString File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
elementAsString
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Deprecated public BaseObject getxWikiObject() { return getXObject(getDocumentReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getxWikiObject File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
getxWikiObject
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public abstract Directions getLineDirections(int line);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLineDirections File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getLineDirections
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
private void writeMetadata(PackageInfo pkg, File destination, byte[] widgetData) throws IOException { StringBuilder b = new StringBuilder(512); StringBuilderPrinter printer = new StringBuilderPrinter(b); printer.println(Integer.toString(BACKUP_METADATA_VERSION)); printer.println(pkg.packageName); FileOutputStream fout = new FileOutputStream(destination); BufferedOutputStream bout = new BufferedOutputStream(fout); DataOutputStream out = new DataOutputStream(bout); bout.write(b.toString().getBytes()); // bypassing DataOutputStream if (widgetData != null && widgetData.length > 0) { out.writeInt(BACKUP_WIDGET_METADATA_TOKEN); out.writeInt(widgetData.length); out.write(widgetData); } bout.flush(); out.close(); // As with the manifest file, guarantee idempotence of the archive metadata // for the widget block by using a fixed mtime on the transient file. destination.setLastModified(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeMetadata 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
writeMetadata
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public void stopFreezingScreen() { if (!checkCallingPermission(android.Manifest.permission.FREEZE_SCREEN, "stopFreezingScreen()")) { throw new SecurityException("Requires FREEZE_SCREEN permission"); } synchronized(mWindowMap) { if (mClientFreezingScreen) { mClientFreezingScreen = false; mLastFinishedFreezeSource = "client"; final long origId = Binder.clearCallingIdentity(); try { stopFreezingDisplayLocked(); } finally { Binder.restoreCallingIdentity(origId); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopFreezingScreen 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
stopFreezingScreen
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public Pipeline save(Pipeline pipeline) { return pipelineDao.saveWithStages(pipeline); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
save
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
private static VerifiedSigner verify(RandomAccessFile apk, boolean verifyIntegrity) throws SignatureNotFoundException, SecurityException, IOException { SignatureInfo signatureInfo = findSignature(apk); return verify(apk, signatureInfo, verifyIntegrity); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verify File: core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
verify
core/java/android/util/apk/ApkSignatureSchemeV2Verifier.java
84df68840b6f2407146e722ebd95a7d8bc6e3529
0
Analyze the following code function for security vulnerabilities
private static boolean hasEditRights(SecurityContext securityContext) { if (securityContext.isUserInRole(Authentication.ROLE_ADMIN) || securityContext.isUserInRole(Authentication.ROLE_REST)) { return true; } else { return false; } }
Vulnerability Classification: - CWE: CWE-269 - CVE: CVE-2023-0872 - Severity: HIGH - CVSS Score: 8.0 Description: NMS-15703: Do not allow ROLE_REST to modify users Function: hasEditRights File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java Repository: OpenNMS/opennms Fixed Code: private static boolean hasEditRights(SecurityContext securityContext) { if (securityContext.isUserInRole(Authentication.ROLE_ADMIN)) { return true; } else { return false; } }
[ "CWE-269" ]
CVE-2023-0872
HIGH
8
OpenNMS/opennms
hasEditRights
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
1
Analyze the following code function for security vulnerabilities
public String findAuthType(SSLFDProxy ssl_fd, PK11Cert[] chain) throws Exception { // Java's CryptoManager is supposed to validate that the auth type // chosen by the underlying protocol is compatible with the // certificates in the channel. With TLSv1.3, this is less of a // concern. However, NSS doesn't directly expose an authType // compatible with Java; we're left inquiring for similar // information from the channel info. SSLPreliminaryChannelInfo info = SSL.GetPreliminaryChannelInfo(ssl_fd); if (info == null) { String msg = "Expected non-null result from GetPreliminaryChannelInfo!"; throw new RuntimeException(msg); } if (!info.haveProtocolVersion()) { String msg = "Expected SSLPreliminaryChannelInfo ("; msg += info + ") to have protocol information."; throw new RuntimeException(msg); } if (!info.haveCipherSuite()) { String msg = "Expected SSLPreliminaryChannelInfo ("; msg += info + ") to have cipher suite information."; throw new RuntimeException(msg); } SSLVersion version = info.getProtocolVersion(); SSLCipher suite = info.getCipherSuite(); if (version.value() < SSLVersion.TLS_1_3.value()) { // When we're doing a TLSv1.2 or earlier protocol exchange, // we can simply check the cipher suite value for the // authentication type. if (suite.requiresRSACert()) { // Java expects RSA_EXPORT to be handled properly. // However, rather than checking the actual bits in // the RSA certificate, return it purely based on // cipher suite name. In modern reality, these ciphers // should _NEVER_ be negotiated! if (suite.name().contains("RSA_EXPORT")) { return "RSA_EXPORT"; } return "RSA"; } else if (suite.requiresECDSACert()) { return "ECDSA"; } else if (suite.requiresDSSCert()) { // Notably, DSS is the same as DSA, but the suite names // all use DSS while the JDK uses DSA. return "DSA"; } // Implicit else: authType == null, causing TrustManager // check to fail. } else { // For TLSv1.3 and any later protocols, we can't rely on // the above requires() checks, because the actual // signature type depends on the type of the certificate // provided. This makes the TrustManager field redundant, // but yet we still have to provide it. if (chain != null && chain.length > 0 && chain[0] != null) { PK11Cert cert = chain[0]; PublicKey key = cert.getPublicKey(); return key.getAlgorithm(); } // Implicit else here and above: authType == null, which // will cause the TrustManager check to fail. } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findAuthType File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
findAuthType
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
public String extractText(InputStream stream, String type, String encoding) throws IOException { try { SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); saxParserFactory.setValidating(false); SAXParser saxParser = saxParserFactory.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); xmlReader.setFeature("http://xml.org/sax/features/validation", false); xmlReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); ZipInputStream zis = new ZipInputStream(stream); ZipEntry ze = zis.getNextEntry(); while (ze != null && !ze.getName().equals("content.xml")) { ze = zis.getNextEntry(); } OpenOfficeContentHandler contentHandler = new OpenOfficeContentHandler(); xmlReader.setContentHandler(contentHandler); try { xmlReader.parse(new InputSource(zis)); } finally { zis.close(); } return contentHandler.getContent(); } catch (ParserConfigurationException | SAXException e) { logger.warn("Failed to extract OpenOffice text content", e); throw new IOException(e.getMessage(), e); } finally { stream.close(); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2021-33950 - Severity: HIGH - CVSS Score: 7.5 Description: XXE injection security vulnerability Fix #287 Function: extractText File: src/main/java/com/openkm/extractor/OpenOfficeTextExtractor.java Repository: openkm/document-management-system Fixed Code: public String extractText(InputStream stream, String type, String encoding) throws IOException { try { SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); saxParserFactory.setValidating(false); SAXParser saxParser = saxParserFactory.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); xmlReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); xmlReader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); xmlReader.setFeature("http://xml.org/sax/features/external-general-entities", false); xmlReader.setFeature("http://xml.org/sax/features/validation", false); ZipInputStream zis = new ZipInputStream(stream); ZipEntry ze = zis.getNextEntry(); while (ze != null && !ze.getName().equals("content.xml")) { ze = zis.getNextEntry(); } OpenOfficeContentHandler contentHandler = new OpenOfficeContentHandler(); xmlReader.setContentHandler(contentHandler); try { xmlReader.parse(new InputSource(zis)); } finally { zis.close(); } return contentHandler.getContent(); } catch (ParserConfigurationException | SAXException e) { logger.warn("Failed to extract OpenOffice text content", e); throw new IOException(e.getMessage(), e); } finally { stream.close(); } }
[ "CWE-611" ]
CVE-2021-33950
HIGH
7.5
openkm/document-management-system
extractText
src/main/java/com/openkm/extractor/OpenOfficeTextExtractor.java
ce1d82329615aea6aa9f2cc6508c1fe7891e34b5
1
Analyze the following code function for security vulnerabilities
public boolean isInRenameMode() { return getDriver().getCurrentUrl().contains("xpage=rename"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInRenameMode 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
isInRenameMode
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 TagMatcher getRequiresClosingTags() { return requiresClosingTagsMatcher; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequiresClosingTags File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
getRequiresClosingTags
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
private void deleteSelected() { // delete ONLY if this is NOT a new contact. if (!mAddContact) { Intent intent = mSubscriptionInfoHelper.getIntent(DeleteFdnContactScreen.class); intent.putExtra(INTENT_EXTRA_NAME, mName); intent.putExtra(INTENT_EXTRA_NUMBER, mNumber); startActivity(intent); } finish(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteSelected File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
deleteSelected
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
@Override public KBTemplate findByUuid_C_First(String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator) throws NoSuchTemplateException { KBTemplate kbTemplate = fetchByUuid_C_First(uuid, companyId, orderByComparator); if (kbTemplate != null) { return kbTemplate; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); msg.append(uuid); msg.append(", companyId="); msg.append(companyId); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchTemplateException(msg.toString()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByUuid_C_First File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
findByUuid_C_First
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
void setWillReplaceChildWindows() { if (shouldBeReplacedWithChildren()) { setWillReplaceWindow(false /* animate */); } for (int i = mChildren.size() - 1; i >= 0; i--) { final WindowState c = mChildren.get(i); c.setWillReplaceChildWindows(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWillReplaceChildWindows 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
setWillReplaceChildWindows
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public boolean isResetPasswordTokenActive(ComponentName admin) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return false; } final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization( isProfileOwner(caller) || isDefaultDeviceOwner(caller)); synchronized (getLockObject()) { return isResetPasswordTokenActiveForUserLocked(caller.getUserId()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isResetPasswordTokenActive 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
isResetPasswordTokenActive
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected void setOCFormDataDNs(OdmClinicalDataBean data, String ecIds, HashMap<Integer, String> formOidPoses) { this.setOCFormDataDNsTypesExpected(); HashMap<String, ArrayList<ChildNoteBean>> pDNs = new HashMap<String, ArrayList<ChildNoteBean>>(); // HashMap<String, ArrayList<DiscrepancyNoteBean>> sDNs = new HashMap<String, ArrayList<DiscrepancyNoteBean>>(); logger.debug("Begin to execute GetOCEventDataDNsSql"); logger.debug("getOCFormDataDNsSql= " + this.getOCFormDataDNsSql(ecIds)); ArrayList rows = select(this.getOCFormDataDNsSql(ecIds)); Iterator iter = rows.iterator(); while (iter.hasNext()) { HashMap row = (HashMap) iter.next(); Integer ecId = (Integer) row.get("event_crf_id"); Integer pdnId = (Integer) row.get("parent_dn_id"); Integer dnId = (Integer) row.get("dn_id"); String description = (String) row.get("description"); String detailedNote = (String) row.get("detailed_notes"); Integer ownerId = (Integer) row.get("owner_id"); Date dateCreated = (Date) row.get("date_created"); String status = (String) row.get("status"); String noteType = (String) row.get("name"); if (pdnId != null && pdnId > 0) { String key = ecId + "-" + pdnId; ChildNoteBean cn = new ChildNoteBean(); cn.setDateCreated(dateCreated); cn.setDescription(description); cn.setDetailedNote(detailedNote); cn.setStatus(status); cn.setOid("CDN_" + dnId); ElementRefBean userRef = new ElementRefBean(); userRef.setElementDefOID("USR_" + ownerId); cn.setUserRef(userRef); ArrayList<ChildNoteBean> cns = pDNs.containsKey(key) ? pDNs.get(key) : new ArrayList<ChildNoteBean>(); cns.add(cn); pDNs.put(key, cns); } else { DiscrepancyNoteBean dn = new DiscrepancyNoteBean(); String k = ecId + "-" + dnId; if (pDNs != null && pDNs.containsKey(k)) { dn.setChildNotes(pDNs.get(k)); dn.setNumberOfChildNotes(dn.getChildNotes().size()); } dn.setDateUpdated(dateCreated); dn.setNoteType(noteType); dn.setStatus(status); dn.setOid("DN_" + dnId); ElementRefBean userRef = new ElementRefBean(); userRef.setElementDefOID("USR_" + ownerId); if (formOidPoses.containsKey(ecId)) { String[] poses = formOidPoses.get(ecId).split("---"); int p0 = Integer.parseInt(poses[0]); int p1 = Integer.parseInt(poses[1]); int p2 = Integer.parseInt(poses[2]); String entityID = data.getExportSubjectData().get(p0).getExportStudyEventData().get(p1).getExportFormData().get(p2).getFormOID(); data.getExportSubjectData().get(p0).getExportStudyEventData().get(p1).getExportFormData().get(p2).getDiscrepancyNotes() .setEntityID(entityID); data.getExportSubjectData().get(p0).getExportStudyEventData().get(p1).getExportFormData().get(p2).getDiscrepancyNotes() .getDiscrepancyNotes().add(dn); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOCFormDataDNs 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
setOCFormDataDNs
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
boolean ensureConfigAndVisibilityAfterUpdate(ActivityRecord starting, int changes) { boolean kept = true; final Task mainRootTask = mRootWindowContainer.getTopDisplayFocusedRootTask(); // mainRootTask is null during startup. if (mainRootTask != null) { if (changes != 0 && starting == null) { // If the configuration changed, and the caller is not already // in the process of starting an activity, then find the top // activity to check if its configuration needs to change. starting = mainRootTask.topRunningActivity(); } if (starting != null) { kept = starting.ensureActivityConfiguration(changes, false /* preserveWindow */); // And we need to make sure at this point that all other activities // are made visible with the correct configuration. mRootWindowContainer.ensureActivitiesVisible(starting, changes, !PRESERVE_WINDOWS); } } return kept; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureConfigAndVisibilityAfterUpdate 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
ensureConfigAndVisibilityAfterUpdate
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public GridSelectionModel<T> setSelectionMode(SelectionMode selectionMode) { Objects.requireNonNull(selectionMode, "Selection mode cannot be null."); GridSelectionModel<T> model = selectionMode.createModel(); setSelectionModel(model); return model; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSelectionMode File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
setSelectionMode
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
void endFullBackup() { synchronized (mQueueLock) { if (mRunningFullBackupTask != null) { if (DEBUG_SCHEDULING) { Slog.i(TAG, "Telling running backup to stop"); } mRunningFullBackupTask.setRunning(false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endFullBackup 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
endFullBackup
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public static VaadinService getCurrent() { return CurrentInstance.get(VaadinService.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrent File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
getCurrent
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
public static boolean isDockerMode() { String value = System.getenv("DOCKER_MODE"); return "true".equalsIgnoreCase(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDockerMode File: common/src/main/java/com/zrlog/util/ZrLogUtil.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
isDockerMode
common/src/main/java/com/zrlog/util/ZrLogUtil.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
private void resumeSuspendedAutohide() { if (mAutohideSuspended) { scheduleAutohide(); mHandler.postDelayed(mCheckBarModes, 500); // longer than home -> launcher } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resumeSuspendedAutohide 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
resumeSuspendedAutohide
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static float toFloat(@Nullable String s) throws SQLException { if (s != null) { try { s = s.trim(); return Float.parseFloat(s); } catch (NumberFormatException e) { throw new PSQLException(GT.tr("Bad value for type {0} : {1}", "float", s), PSQLState.NUMERIC_VALUE_OUT_OF_RANGE); } } return 0; // SQL NULL }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toFloat File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
toFloat
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public static Cipher getCipher(String algorithm) throws GeneralSecurityException { return PROVIDER != null ? Cipher.getInstance(algorithm, PROVIDER) : Cipher.getInstance(algorithm); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCipher File: core/src/main/java/hudson/util/Secret.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
getCipher
core/src/main/java/hudson/util/Secret.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
public String getReadingModeUrl() throws IndexUnreachableException, DAOException { return getFullscreenImageUrl(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReadingModeUrl File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
getReadingModeUrl
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
@Override public void onWakeUp() { synchronized (mLock) { if (shouldEnableWakeGestureLp()) { performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false); wakeUp(SystemClock.uptimeMillis(), mAllowTheaterModeWakeFromWakeGesture); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onWakeUp File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
onWakeUp
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
@Nullable public String getShortcutId() { return mShortcutId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShortcutId File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getShortcutId
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void setSelectionModel(SelectionModel selectionModel) throws IllegalArgumentException { if (selectionModel == null) { throw new IllegalArgumentException( "Selection model may not be null"); } if (this.selectionModel != selectionModel) { Collection<Object> oldSelection; // this.selectionModel is null on init if (this.selectionModel != null) { oldSelection = this.selectionModel.getSelectedRows(); this.selectionModel.remove(); } else { oldSelection = Collections.emptyList(); } this.selectionModel = selectionModel; selectionModel.setGrid(this); Collection<Object> newSelection = this.selectionModel .getSelectedRows(); if (!SharedUtil.equals(oldSelection, newSelection)) { fireSelectionEvent(oldSelection, newSelection); } // selection is included in the row data, so the client needs to be // updated datasourceExtension.refreshCache(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSelectionModel File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
setSelectionModel
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void fallbackToSingleUserLocked() { // Create the primary user UserInfo primary = new UserInfo(UserHandle.USER_OWNER, mContext.getResources().getString(com.android.internal.R.string.owner_name), null, UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY | UserInfo.FLAG_INITIALIZED); mUsers.put(0, primary); mNextSerialNumber = MIN_USER_ID; mUserVersion = USER_VERSION; Bundle restrictions = new Bundle(); mUserRestrictions.append(UserHandle.USER_OWNER, restrictions); updateUserIdsLocked(); initDefaultGuestRestrictions(); writeUserListLocked(); writeUserLocked(primary); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fallbackToSingleUserLocked File: services/core/java/com/android/server/pm/UserManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2457
LOW
2.1
android
fallbackToSingleUserLocked
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
public void setQsExpanded(boolean expanded) { mStatusBarWindowManager.setQsExpanded(expanded); mKeyguardStatusView.setImportantForAccessibility(expanded ? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS : View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setQsExpanded 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
setQsExpanded
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public String getStyle(RowReference row);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStyle File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
getStyle
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private StatusMode getStatus(Presence presence) { if (presence == null) return StatusMode.unknown; if (presence.getType() == Presence.Type.subscribe) return StatusMode.subscribe; if (presence.getType() == Presence.Type.available) { if (presence.getMode() != null) { return StatusMode.valueOf(presence.getMode().name()); } return StatusMode.available; } return StatusMode.offline; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStatus File: src/org/yaxim/androidclient/service/SmackableImp.java Repository: ge0rg/yaxim The code follows secure coding practices.
[ "CWE-20", "CWE-346" ]
CVE-2017-5589
MEDIUM
4.3
ge0rg/yaxim
getStatus
src/org/yaxim/androidclient/service/SmackableImp.java
65a38dc77545d9568732189e86089390f0ceaf9f
0
Analyze the following code function for security vulnerabilities
@Override public void notifyDockedStackMinimizedChanged(boolean minimized) { synchronized (ActivityManagerService.this) { mStackSupervisor.setDockedStackMinimized(minimized); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyDockedStackMinimizedChanged 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
notifyDockedStackMinimizedChanged
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
boolean isSingleQuotedExecutableEscaped() { return singleQuotedExecutableEscaped; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSingleQuotedExecutableEscaped File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java Repository: apache/maven-shared-utils The code follows secure coding practices.
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
isSingleQuotedExecutableEscaped
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
2735facbbbc2e13546328cb02dbb401b3776eea3
0
Analyze the following code function for security vulnerabilities
private ProductionRule getProductionRule(final Element element, final String attribute, final boolean mustFind) throws GameParseException { return getValidatedObject(element, attribute, mustFind, data.getProductionRuleList()::getProductionRule, "production rule"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProductionRule File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
getProductionRule
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
public synchronized boolean addPushPromiseStream(int pushedStreamId) throws IOException { if (!isClient() || pushedStreamId % 2 != 0) { throw UndertowMessages.MESSAGES.pushPromiseCanOnlyBeCreatedByServer(); } if (!isOpen()) { throw UndertowMessages.MESSAGES.channelIsClosed(); } if (!isIdle(pushedStreamId)) { UndertowLogger.REQUEST_IO_LOGGER.debugf("Non idle streamId %d received from the server as a pushed stream.", pushedStreamId); return false; } StreamHolder holder = new StreamHolder((Http2HeadersStreamSinkChannel) null); holder.sinkClosed = true; lastAssignedStreamOtherSide = Math.max(lastAssignedStreamOtherSide, pushedStreamId); currentStreams.put(pushedStreamId, holder); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPushPromiseStream File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
addPushPromiseStream
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
private void adjustOtherSinkPriorities(A2dpService a2dpService, BluetoothDevice connectedDevice) { for (BluetoothDevice device : getBondedDevices()) { if (a2dpService.getPriority(device) >= BluetoothProfile.PRIORITY_AUTO_CONNECT && !device.equals(connectedDevice)) { a2dpService.setPriority(device, BluetoothProfile.PRIORITY_ON); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adjustOtherSinkPriorities File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
adjustOtherSinkPriorities
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { final Path dirToCreate = Paths.get(destDir.toString(), dir.toString()); if(Files.notExists(dirToCreate)){ Files.createDirectory(dirToCreate); } return FileVisitResult.CONTINUE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: preVisitDirectory File: src/main/java/org/olat/modules/wiki/WikiManager.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
preVisitDirectory
src/main/java/org/olat/modules/wiki/WikiManager.java
699490be8e931af0ef1f135c55384db1f4232637
0
Analyze the following code function for security vulnerabilities
private static String getSettingTag(Bundle args) { return (args != null) ? args.getString(Settings.CALL_METHOD_TAG_KEY) : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSettingTag File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
getSettingTag
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
static ActivityRecord restoreFromXml(TypedXmlPullParser in, ActivityTaskSupervisor taskSupervisor) throws IOException, XmlPullParserException { Intent intent = null; PersistableBundle persistentState = null; int launchedFromUid = in.getAttributeInt(null, ATTR_LAUNCHEDFROMUID, 0); String launchedFromPackage = in.getAttributeValue(null, ATTR_LAUNCHEDFROMPACKAGE); String launchedFromFeature = in.getAttributeValue(null, ATTR_LAUNCHEDFROMFEATURE); String resolvedType = in.getAttributeValue(null, ATTR_RESOLVEDTYPE); boolean componentSpecified = in.getAttributeBoolean(null, ATTR_COMPONENTSPECIFIED, false); int userId = in.getAttributeInt(null, ATTR_USERID, 0); long createTime = in.getAttributeLong(null, ATTR_ID, -1); final int outerDepth = in.getDepth(); TaskDescription taskDescription = new TaskDescription(); taskDescription.restoreFromXml(in); int event; while (((event = in.next()) != END_DOCUMENT) && (event != END_TAG || in.getDepth() >= outerDepth)) { if (event == START_TAG) { final String name = in.getName(); if (DEBUG) Slog.d(TaskPersister.TAG, "ActivityRecord: START_TAG name=" + name); if (TAG_INTENT.equals(name)) { intent = Intent.restoreFromXml(in); if (DEBUG) Slog.d(TaskPersister.TAG, "ActivityRecord: intent=" + intent); } else if (TAG_PERSISTABLEBUNDLE.equals(name)) { persistentState = PersistableBundle.restoreFromXml(in); if (DEBUG) Slog.d(TaskPersister.TAG, "ActivityRecord: persistentState=" + persistentState); } else { Slog.w(TAG, "restoreActivity: unexpected name=" + name); XmlUtils.skipCurrentTag(in); } } } if (intent == null) { throw new XmlPullParserException("restoreActivity error intent=" + intent); } final ActivityTaskManagerService service = taskSupervisor.mService; final ActivityInfo aInfo = taskSupervisor.resolveActivity(intent, resolvedType, 0, null, userId, Binder.getCallingUid()); if (aInfo == null) { throw new XmlPullParserException("restoreActivity resolver error. Intent=" + intent + " resolvedType=" + resolvedType); } return new ActivityRecord.Builder(service) .setLaunchedFromUid(launchedFromUid) .setLaunchedFromPackage(launchedFromPackage) .setLaunchedFromFeature(launchedFromFeature) .setIntent(intent) .setResolvedType(resolvedType) .setActivityInfo(aInfo) .setComponentSpecified(componentSpecified) .setPersistentState(persistentState) .setTaskDescription(taskDescription) .setCreateTime(createTime) .build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreFromXml 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
restoreFromXml
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private void addToQueue(EntityReference reference, boolean recurse, IndexOperation operation) { if (!this.disposed) { // Don't block because the capacity of the resolver queue is not limited. try { this.resolveQueue.put(new ResolveQueueEntry(reference, recurse, operation)); } catch (InterruptedException e) { this.logger.error("Failed to add reference [{}] to Solr indexing queue", reference, e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addToQueue File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-312", "CWE-200" ]
CVE-2023-50719
HIGH
7.5
xwiki/xwiki-platform
addToQueue
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
0
Analyze the following code function for security vulnerabilities
@Test public void testExtractNanosecondDecimal03() { BigDecimal value = new BigDecimal("15.72"); long seconds = value.longValue(); assertEquals("The second part is not correct.", 15L, seconds); int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); assertEquals("The nanosecond part is not correct.", 720000000, nanoseconds); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2018-1000873 - Severity: MEDIUM - CVSS Score: 4.3 Description: Refactor TestDecimalUtils to reduce repetition. Function: testExtractNanosecondDecimal03 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDecimalUtils.java Repository: FasterXML/jackson-modules-java8 Fixed Code: @Test public void testExtractNanosecondDecimal03() { BigDecimal value = new BigDecimal("15.72"); checkExtractNanos(15L, 720000000, value); }
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testExtractNanosecondDecimal03
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDecimalUtils.java
103f5678fe104cd6934f07f1158fe92a1e2393a7
1
Analyze the following code function for security vulnerabilities
@Deprecated public @ColorInt int getOrganizationColorForUser(int userHandle) { try { return mService.getOrganizationColorForUser(userHandle); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationColorForUser 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
getOrganizationColorForUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@NonNull public BubbleMetadata.Builder setDesiredHeightResId(@DimenRes int heightResId) { mDesiredHeightResId = heightResId; mDesiredHeight = 0; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDesiredHeightResId File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setDesiredHeightResId
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
protected void enableHostnameVerificationForNio() { if (this.nioParams == null) { this.nioParams = new NioParams(); } this.nioParams = this.nioParams.enableHostnameVerification(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableHostnameVerificationForNio File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
enableHostnameVerificationForNio
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public String getNextBuildUrl() { return getUrl(run.getNextBuild()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNextBuildUrl File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
getNextBuildUrl
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public Response authenticate(Document soapMessage) { try { return new PostBindingProtocol() { @Override protected String getBindingType(AuthnRequestType requestAbstractType) { return SamlProtocol.SAML_SOAP_BINDING; } @Override protected boolean isDestinationRequired() { return false; } @Override protected Response loginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client) { // force passive authentication when executing this profile requestAbstractType.setIsPassive(true); requestAbstractType.setDestination(session.getContext().getUri().getAbsolutePath()); return super.loginRequest(relayState, requestAbstractType, client); } }.execute(Soap.toSamlHttpPostMessage(soapMessage), null, null, null); } catch (Exception e) { String reason = "Some error occurred while processing the AuthnRequest."; String detail = e.getMessage(); if (detail == null) { detail = reason; } return Soap.createFault().reason(reason).detail(detail).build(); } }
Vulnerability Classification: - CWE: CWE-287 - CVE: CVE-2021-3827 - Severity: MEDIUM - CVSS Score: 6.8 Description: KEYCLOAK-19177 Disable ECP flow by default for all Saml clients; ecp flow creates only transient users sessions Function: authenticate File: services/src/main/java/org/keycloak/protocol/saml/profile/ecp/SamlEcpProfileService.java Repository: keycloak Fixed Code: public Response authenticate(Document soapMessage) { try { return new PostBindingProtocol() { @Override protected String getBindingType(AuthnRequestType requestAbstractType) { return SamlProtocol.SAML_SOAP_BINDING; } @Override protected boolean isDestinationRequired() { return false; } @Override protected Response loginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client) { // Do not allow ECP login when client does not support it if (!new SamlClient(client).allowECPFlow()) { logger.errorf("Client %s is not allowed to execute ECP flow", client.getClientId()); throw new RuntimeException("Client is not allowed to use ECP profile."); } // force passive authentication when executing this profile requestAbstractType.setIsPassive(true); requestAbstractType.setDestination(session.getContext().getUri().getAbsolutePath()); return super.loginRequest(relayState, requestAbstractType, client); } }.execute(Soap.toSamlHttpPostMessage(soapMessage), null, null, null); } catch (Exception e) { String reason = "Some error occurred while processing the AuthnRequest."; String detail = e.getMessage(); if (detail == null) { detail = reason; } return Soap.createFault().reason(reason).detail(detail).build(); } }
[ "CWE-287" ]
CVE-2021-3827
MEDIUM
6.8
keycloak
authenticate
services/src/main/java/org/keycloak/protocol/saml/profile/ecp/SamlEcpProfileService.java
44000caaf5051d7f218d1ad79573bd3d175cad0d
1
Analyze the following code function for security vulnerabilities
protected GenerationUnitGenerationResult generateResourceRelationTemplates(GenerationUnit unit, AmwTemplateModel model) throws IOException { GenerationUnitPreprocessResult generationUnitPreprocessResult = preProcessModel(model); GenerationUnitGenerationResult generationUnitGenerationResult = generateTemplatesAmwTemplateModel(unit.getRelationTemplates(), unit.getGlobalFunctionTemplates(), model); generationUnitGenerationResult.setGenerationUnitPreprocessResult(generationUnitPreprocessResult); return generationUnitGenerationResult; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateResourceRelationTemplates File: AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java Repository: liimaorg/liima The code follows secure coding practices.
[ "CWE-917" ]
CVE-2023-26092
CRITICAL
9.8
liimaorg/liima
generateResourceRelationTemplates
AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
78ba2e198c615dc8858e56eee3290989f0362686
0
Analyze the following code function for security vulnerabilities
public void forEachChild(Consumer<StateNode> action) { forEachFeature(n -> n.forEachChild(action)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forEachChild File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
forEachChild
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public String display(String fieldname, String mode) { if (this.currentObj == null) { return this.doc.display(fieldname, mode, getXWikiContext()); } else { return this.doc.display(fieldname, mode, this.currentObj.getBaseObject(), getXWikiContext()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: display File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
display
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
private void startSaveAndFinish() { if (mSaveAndFinishWorker != null) { Log.w(TAG, "startSaveAndFinish with an existing SaveAndFinishWorker."); return; } setRightButtonEnabled(false); mSaveAndFinishWorker = new SaveAndFinishWorker(); mSaveAndFinishWorker.setListener(this); getFragmentManager().beginTransaction().add(mSaveAndFinishWorker, FRAGMENT_TAG_SAVE_AND_FINISH).commit(); getFragmentManager().executePendingTransactions(); final Intent intent = getActivity().getIntent(); final boolean required = intent.getBooleanExtra( EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true); if (intent.hasExtra(EXTRA_KEY_UNIFICATION_PROFILE_ID)) { try (LockscreenCredential profileCredential = (LockscreenCredential) intent.getParcelableExtra(EXTRA_KEY_UNIFICATION_PROFILE_CREDENTIAL)) { mSaveAndFinishWorker.setProfileToUnify( intent.getIntExtra(EXTRA_KEY_UNIFICATION_PROFILE_ID, UserHandle.USER_NULL), profileCredential); } } mSaveAndFinishWorker.start(mLockPatternUtils, required, mRequestGatekeeperPassword, mChosenPattern, mCurrentCredential, mUserId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startSaveAndFinish File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
startSaveAndFinish
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
int readExactly(InputStream in, byte[] buffer, int offset, int size) throws IOException { if (size <= 0) throw new IllegalArgumentException("size must be > 0"); int soFar = 0; while (soFar < size) { int nRead = in.read(buffer, offset + soFar, size - soFar); if (nRead <= 0) { if (MORE_DEBUG) Slog.w(TAG, "- wanted exactly " + size + " but got only " + soFar); break; } soFar += nRead; } return soFar; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readExactly 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
readExactly
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") protected <T> T makeHttpDeleteRequestAndCreateCustomResponse(String uri, Class<T> resultType, String user, String password, String token) { logger.debug("About to send DELETE request to '{}' ", uri); KieServerHttpRequest request = newRequest( uri, user, password, token ).delete(); KieServerHttpResponse response = request.response(); if ( response.code() == Response.Status.OK.getStatusCode() || response.code() == Response.Status.NO_CONTENT.getStatusCode() ) { T serviceResponse = deserialize( response.body(), resultType); return serviceResponse; } else { throw new IllegalStateException( "Error while sending DELETE request to " + uri + " response code " + response.code() ); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeHttpDeleteRequestAndCreateCustomResponse File: kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
makeHttpDeleteRequestAndCreateCustomResponse
kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
public static long findContentLengthFromContentRange(FileDownloadConnection connection) { final String contentRange = getContentRangeHeader(connection); long contentLength = parseContentLengthFromContentRange(contentRange); if (contentLength < 0) contentLength = TOTAL_VALUE_IN_CHUNKED_RESOURCE; return contentLength; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2018-11248 - Severity: HIGH - CVSS Score: 7.5 Description: fix: fix directory traversal vulnerability security issue closes #1028 Function: findContentLengthFromContentRange File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java Repository: lingochamp/FileDownloader Fixed Code: public static long findContentLengthFromContentRange(FileDownloadConnection connection) { final String contentRange = getContentRangeHeader(connection); long contentLength = parseContentLengthFromContentRange(contentRange); if (contentLength < 0) contentLength = TOTAL_VALUE_IN_CHUNKED_RESOURCE; return contentLength; }
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
findContentLengthFromContentRange
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
1
Analyze the following code function for security vulnerabilities
@NonNull private Dialog createDialog(View v) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setView(v).setPositiveButton(R.string.common_ok, null) .setNeutralButton(R.string.common_cancel, null) .setTitle(R.string.end_to_end_encryption_title); Dialog dialog = builder.create(); dialog.setCanceledOnTouchOutside(false); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(final DialogInterface dialog) { Button button = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { switch (keyResult) { case KEY_CREATED: Log_OC.d(TAG, "New keys generated and stored."); dialog.dismiss(); Intent intentCreated = new Intent(); intentCreated.putExtra(SUCCESS, true); intentCreated.putExtra(ARG_POSITION, getArguments().getInt(ARG_POSITION)); getTargetFragment().onActivityResult(getTargetRequestCode(), SETUP_ENCRYPTION_RESULT_CODE, intentCreated); break; case KEY_EXISTING_USED: Log_OC.d(TAG, "Decrypt private key"); textView.setText(R.string.end_to_end_encryption_decrypting); try { String privateKey = task.get(); String mnemonicUnchanged = passwordField.getText().toString(); String mnemonic = passwordField.getText().toString().replaceAll("\\s", "") .toLowerCase(Locale.ROOT); String decryptedPrivateKey = EncryptionUtils.decryptPrivateKey(privateKey, mnemonic); arbitraryDataProvider.storeOrUpdateKeyValue(user.getAccountName(), EncryptionUtils.PRIVATE_KEY, decryptedPrivateKey); dialog.dismiss(); Log_OC.d(TAG, "Private key successfully decrypted and stored"); arbitraryDataProvider.storeOrUpdateKeyValue(user.getAccountName(), EncryptionUtils.MNEMONIC, mnemonicUnchanged); Intent intentExisting = new Intent(); intentExisting.putExtra(SUCCESS, true); intentExisting.putExtra(ARG_POSITION, getArguments().getInt(ARG_POSITION)); getTargetFragment().onActivityResult(getTargetRequestCode(), SETUP_ENCRYPTION_RESULT_CODE, intentExisting); } catch (Exception e) { textView.setText(R.string.end_to_end_encryption_wrong_password); Log_OC.d(TAG, "Error while decrypting private key: " + e.getMessage()); } break; case KEY_GENERATE: passphraseTextView.setVisibility(View.GONE); positiveButton.setVisibility(View.GONE); neutralButton.setVisibility(View.GONE); getDialog().setTitle(R.string.end_to_end_encryption_storing_keys); GenerateNewKeysAsyncTask newKeysTask = new GenerateNewKeysAsyncTask(); newKeysTask.execute(); break; default: dialog.dismiss(); break; } } }); } }); return dialog; }
Vulnerability Classification: - CWE: CWE-212 - CVE: CVE-2021-32658 - Severity: LOW - CVSS Score: 2.1 Description: check e2e keys Signed-off-by: tobiasKaminsky <tobias@kaminsky.me> Function: createDialog File: src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java Repository: nextcloud/android Fixed Code: @NonNull private Dialog createDialog(View v) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setView(v).setPositiveButton(R.string.common_ok, null) .setNeutralButton(R.string.common_cancel, null) .setTitle(R.string.end_to_end_encryption_title); Dialog dialog = builder.create(); dialog.setCanceledOnTouchOutside(false); dialog.setOnShowListener(new DialogInterface.OnShowListener() { @Override public void onShow(final DialogInterface dialog) { Button button = ((AlertDialog) dialog).getButton(AlertDialog.BUTTON_POSITIVE); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { switch (keyResult) { case KEY_CREATED: Log_OC.d(TAG, "New keys generated and stored."); dialog.dismiss(); Intent intentCreated = new Intent(); intentCreated.putExtra(SUCCESS, true); intentCreated.putExtra(ARG_POSITION, getArguments().getInt(ARG_POSITION)); getTargetFragment().onActivityResult(getTargetRequestCode(), SETUP_ENCRYPTION_RESULT_CODE, intentCreated); break; case KEY_EXISTING_USED: Log_OC.d(TAG, "Decrypt private key"); textView.setText(R.string.end_to_end_encryption_decrypting); try { String privateKey = task.get(); String mnemonicUnchanged = passwordField.getText().toString(); String mnemonic = passwordField.getText().toString().replaceAll("\\s", "") .toLowerCase(Locale.ROOT); String decryptedPrivateKey = EncryptionUtils.decryptPrivateKey(privateKey, mnemonic); arbitraryDataProvider.storeOrUpdateKeyValue(user.getAccountName(), EncryptionUtils.PRIVATE_KEY, decryptedPrivateKey); dialog.dismiss(); Log_OC.d(TAG, "Private key successfully decrypted and stored"); arbitraryDataProvider.storeOrUpdateKeyValue(user.getAccountName(), EncryptionUtils.MNEMONIC, mnemonicUnchanged); // check if private key and public key match String publicKey = arbitraryDataProvider.getValue(user.getAccountName(), EncryptionUtils.PUBLIC_KEY); byte[] key1 = generateKey(); String base64encodedKey = encodeBytesToBase64String(key1); String encryptedString = EncryptionUtils.encryptStringAsymmetric(base64encodedKey, publicKey); String decryptedString = decryptStringAsymmetric(encryptedString, decryptedPrivateKey); byte[] key2 = decodeStringToBase64Bytes(decryptedString); if (!Arrays.equals(key1, key2)) { throw new Exception("Keys do not match"); } Intent intentExisting = new Intent(); intentExisting.putExtra(SUCCESS, true); intentExisting.putExtra(ARG_POSITION, getArguments().getInt(ARG_POSITION)); getTargetFragment().onActivityResult(getTargetRequestCode(), SETUP_ENCRYPTION_RESULT_CODE, intentExisting); } catch (Exception e) { textView.setText(R.string.end_to_end_encryption_wrong_password); Log_OC.d(TAG, "Error while decrypting private key: " + e.getMessage()); } break; case KEY_GENERATE: passphraseTextView.setVisibility(View.GONE); positiveButton.setVisibility(View.GONE); neutralButton.setVisibility(View.GONE); getDialog().setTitle(R.string.end_to_end_encryption_storing_keys); GenerateNewKeysAsyncTask newKeysTask = new GenerateNewKeysAsyncTask(); newKeysTask.execute(); break; default: dialog.dismiss(); break; } } }); } }); return dialog; }
[ "CWE-212" ]
CVE-2021-32658
LOW
2.1
nextcloud/android
createDialog
src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
355f3c745b464b741b20a3b96597303490c26333
1
Analyze the following code function for security vulnerabilities
public ModalDialog addAjaxEventBehavior(final AjaxEventBehavior behavior) { mainContainer.add(behavior); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAjaxEventBehavior File: src/main/java/org/projectforge/web/dialog/ModalDialog.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
addAjaxEventBehavior
src/main/java/org/projectforge/web/dialog/ModalDialog.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
public XWikiUser checkAuth(XWikiContext context) throws XWikiException { return getAuthService().checkAuth(context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkAuth 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
checkAuth
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 ApiClient setServerIndex(Integer serverIndex) { this.serverIndex = serverIndex; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServerIndex File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setServerIndex
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public Location getActiveViewLocation() { return viewLocation; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveViewLocation File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
getActiveViewLocation
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public List<String> getTagList() { return this.getDoc().getTagsList(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTagList File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getTagList
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public Optional<SessionUser> login(LoginRequest request, WebSession session, Locale locale) { UserDTO userDTO; if (locale != null) { LocaleContextHolder.setLocale(locale, true); } switch (request.getAuthenticate()) { case "OIDC": case "CAS": case "OAuth2": userDTO = loginSsoMode(request.getUsername(), request.getAuthenticate()); break; case "LDAP": userDTO = loginLdapMode(request.getUsername()); break; default: userDTO = loginLocalMode(request.getUsername(), request.getPassword()); break; } autoSwitch(session, userDTO); SessionUser sessionUser = SessionUser.fromUser(userDTO, session.getId()); session.getAttributes().put(SessionConstants.ATTR_USER, sessionUser); return Optional.of(sessionUser); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: login File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-32699
MEDIUM
6.5
metersphere
login
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
c59e381d368990214813085a1a4877c5ef865411
0
Analyze the following code function for security vulnerabilities
@Override public @PersonalAppsSuspensionReason int getPersonalAppsSuspendedReasons(ComponentName who) { Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); // DO shouldn't be able to use this method. Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller)); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); final long deadline = admin.mProfileOffDeadline; final int result = makeSuspensionReasons(admin.mSuspendPersonalApps, deadline != 0 && mInjector.systemCurrentTimeMillis() > deadline); Slogf.d(LOG_TAG, "getPersonalAppsSuspendedReasons user: %d; result: %d", mInjector.userHandleGetCallingUserId(), result); return result; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPersonalAppsSuspendedReasons 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
getPersonalAppsSuspendedReasons
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void setFetchSize(int rows) throws SQLException { checkClosed(); if (rows < 0) { throw new PSQLException(GT.tr("Fetch size must be a value greater to or equal to 0."), PSQLState.INVALID_PARAMETER_VALUE); } fetchSize = rows; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFetchSize File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
setFetchSize
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
final float getFloatAndRemove(CharSequence name, float defaultValue) { final Float v = getFloatAndRemove(name); return v != null ? v : defaultValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFloatAndRemove File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
getFloatAndRemove
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@Override public void onInvalidated() { super.onInvalidated(); notifyDataSetInvalidated(); if (mServiceTargetScale != null) { for (RowScale rs : mServiceTargetScale) { rs.cancelAnimation(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onInvalidated File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
onInvalidated
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
public static Builder builder() { return new Builder(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: builder File: src/main/java/org/junit/rules/TemporaryFolder.java Repository: junit-team/junit4 The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-15250
LOW
1.9
junit-team/junit4
builder
src/main/java/org/junit/rules/TemporaryFolder.java
610155b8c22138329f0723eec22521627dbc52ae
0
Analyze the following code function for security vulnerabilities
@Override public String getSwitchingToUserMessage() { return mUserController.getSwitchingToSystemUserMessage(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSwitchingToUserMessage File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
getSwitchingToUserMessage
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override protected void setErrorHandler(ErrorHandler errorHandler) { verifier.setErrorHandler(errorHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setErrorHandler File: ext/java/nokogiri/XmlRelaxng.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-26247
MEDIUM
4
sparklemotion/nokogiri
setErrorHandler
ext/java/nokogiri/XmlRelaxng.java
9c87439d9afa14a365ff13e73adc809cb2c3d97b
0
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return Objects.hash(mHomeSp, mCredential, mPolicy, mSubscriptionUpdate, mTrustRootCertList, mUpdateIdentifier, mCredentialPriority, mSubscriptionCreationTimeInMillis, mSubscriptionExpirationTimeMillis, mUsageLimitUsageTimePeriodInMinutes, mUsageLimitStartTimeInMillis, mUsageLimitDataLimit, mUsageLimitTimeLimitInMinutes, mServiceFriendlyNames, mCarrierId, mIsAutojoinEnabled, mIsMacRandomizationEnabled, mIsNonPersistentMacRandomizationEnabled, mMeteredOverride, mSubscriptionId, mIsCarrierMerged, mIsOemPaid, mIsOemPrivate, mDecoratedIdentityPrefix, mSubscriptionGroup); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
hashCode
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
private JsonArray readArray() throws IOException { read(); JsonArray array=new JsonArray(); skipWhiteSpace(); if (readIf(']')) { return array; } do { skipWhiteSpace(); array.add(readValue()); skipWhiteSpace(); } while (readIf(',')); if (!readIf(']')) { throw expected("',' or ']'"); } return array; }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2023-34620 - Severity: HIGH - CVSS Score: 7.5 Description: Fixing vulnerability CVE-2023-34620 in hjson library by adding the implementation of maximum depth while parsing input JSON. Function: readArray File: src/main/org/hjson/JsonParser.java Repository: hjson/hjson-java Fixed Code: private JsonArray readArray(int depth) throws IOException { read(); JsonArray array=new JsonArray(); skipWhiteSpace(); if (readIf(']')) { return array; } do { skipWhiteSpace(); array.add(readValue(depth)); skipWhiteSpace(); } while (readIf(',')); if (!readIf(']')) { throw expected("',' or ']'"); } return array; }
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
readArray
src/main/org/hjson/JsonParser.java
a16cb6a6078d76ddeaf715059213878d0ec7e057
1
Analyze the following code function for security vulnerabilities
private boolean isVerificationEnabled(int userId, int installFlags) { if (!DEFAULT_VERIFY_ENABLE) { return false; } boolean ensureVerifyAppsEnabled = isUserRestricted(userId, UserManager.ENSURE_VERIFY_APPS); // Check if installing from ADB if ((installFlags & PackageManager.INSTALL_FROM_ADB) != 0) { // Do not run verification in a test harness environment if (ActivityManager.isRunningInTestHarness()) { return false; } if (ensureVerifyAppsEnabled) { return true; } // Check if the developer does not want package verification for ADB installs if (android.provider.Settings.Global.getInt(mContext.getContentResolver(), android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, 1) == 0) { return false; } } if (ensureVerifyAppsEnabled) { return true; } return android.provider.Settings.Global.getInt(mContext.getContentResolver(), android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE, 1) == 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isVerificationEnabled 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
isVerificationEnabled
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public Integer getErrorStatusCode() { return this.errorStatusCode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getErrorStatusCode File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
getErrorStatusCode
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
private void setTextHandlesTemporarilyHidden(boolean hide) { if (mNativeContentViewCore == 0) return; nativeSetTextHandlesTemporarilyHidden(mNativeContentViewCore, hide); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTextHandlesTemporarilyHidden File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
setTextHandlesTemporarilyHidden
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
@CalledByNative private boolean shouldBlockMediaRequest(String url) { return getContentViewClient().shouldBlockMediaRequest(url); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldBlockMediaRequest 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
shouldBlockMediaRequest
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public void setResponseType(final String responseType) { try { this.responseType = ResponseType.parse(responseType); } catch (ParseException e) { throw new TechnicalException("Unrecognised responseType: " + responseType, e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setResponseType File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setResponseType
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
private native int nativeSendMouseMoveEvent( long nativeContentViewCoreImpl, long timeMs, float x, float y);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeSendMouseMoveEvent 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
nativeSendMouseMoveEvent
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public int checkUriPermission(Uri uri, int pid, int uid, int mode, int userId, IBinder callerToken) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); uri.writeToParcel(data, 0); data.writeInt(pid); data.writeInt(uid); data.writeInt(mode); data.writeInt(userId); data.writeStrongBinder(callerToken); mRemote.transact(CHECK_URI_PERMISSION_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkUriPermission File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
checkUriPermission
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void taskForward(TaskEntity currentTaskEntity, Map<String, Object> variables) { ActivityImpl activity = (ActivityImpl) ProcessDefUtils .getActivity(processEngine, currentTaskEntity.getProcessDefinitionId(), currentTaskEntity.getTaskDefinitionKey()) .getOutgoingTransitions().get(0).getDestination(); jumpTask(currentTaskEntity, activity, variables); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: taskForward File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java Repository: thinkgem/jeesite The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-34601
CRITICAL
9.8
thinkgem/jeesite
taskForward
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
0
Analyze the following code function for security vulnerabilities
public final boolean isInstance( T instance ) { return clazz.isInstance(instance); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInstance File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
isInstance
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void setRevokedByInUse(boolean revokedByInUse) { this.revokedByInUse = revokedByInUse; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRevokedByInUse File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setRevokedByInUse
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public void beginGroup(Map<String, String> parameters) { Map<String, String> clonedParameters = new LinkedHashMap<String, String>(); clonedParameters.putAll(parameters); getXHTMLWikiPrinter().setStandalone(); getXHTMLWikiPrinter().printXMLStartElement("div", clonedParameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginGroup File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java Repository: xwiki/xwiki-rendering The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
beginGroup
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
0
Analyze the following code function for security vulnerabilities
public Vector<String> getAllValues(String tagname) { Vector<String> v = new Vector<>(); NodeList nodes = mDoc.getElementsByTagName(tagname); for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); NodeList c = n.getChildNodes(); if (c.getLength() > 0) { Node nn = c.item(0); if (nn.getNodeType() == Node.TEXT_NODE) v.addElement(nn.getNodeValue()); } } return v; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllValues File: base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getAllValues
base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
protected SharedPreferences getPreferences() { return PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPreferences File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
getPreferences
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public AwTestContainerView createAwTestContainerViewOnMainSync( final AwContentsClient client) throws Exception { return createAwTestContainerViewOnMainSync(client, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createAwTestContainerViewOnMainSync File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
createAwTestContainerViewOnMainSync
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
@ApiOperation(value = "Get Solutions for specified userId") @RequestMapping(value = "/getSolutions", method = RequestMethod.GET) public String getSolutions(@RequestParam(value = "userId", defaultValue = "1") String userId) throws AcumosException { String result = null; String resultTemplate = "{\"items\" : %s}"; String error = "{errorCode : \"%s\", errorDescription : \"%s\"}"; try { logger.debug(EELFLoggerDelegator.debugLogger, " getSolutions() Begin "); result = solutionService.getSolutions(userId); result = String.format(resultTemplate, result); } catch (AcumosException e) { logger.error(EELFLoggerDelegator.errorLogger, " Exception in getSolutions() ", e); result = String.format(error, e.getErrorCode(), e.getErrorDesc()); } catch (Exception e) { logger.error(EELFLoggerDelegator.errorLogger, "Exception in getSolutions()", e); result = String.format(error, props.getSolutionErrorCode(), props.getSolutionErrorDesc()); } logger.debug(EELFLoggerDelegator.debugLogger, " getSolutions() End "); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSolutions File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java Repository: acumos/design-studio The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-25097
MEDIUM
4
acumos/design-studio
getSolutions
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
0df8a5e8722188744973168648e4c74c69ce67fd
0
Analyze the following code function for security vulnerabilities
@Override public void setVoiceInteractionManagerProvider( @Nullable ActivityManagerInternal.VoiceInteractionManagerProvider provider) { ActivityManagerService.this.setVoiceInteractionManagerProvider(provider); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVoiceInteractionManagerProvider File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
setVoiceInteractionManagerProvider
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void dumpInternal(FileDescriptor fd, PrintWriter pw, String[] args) { synchronized (mLock) { final long identity = Binder.clearCallingIdentity(); try { SparseBooleanArray users = mSettingsRegistry.getKnownUsersLocked(); final int userCount = users.size(); for (int i = 0; i < userCount; i++) { dumpForUserLocked(users.keyAt(i), pw); } } finally { Binder.restoreCallingIdentity(identity); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpInternal File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
dumpInternal
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
private void createDetails(Object itemId) throws IllegalStateException { assert itemId != null : "itemId was null"; if (itemIdToDetailsComponent.containsKey(itemId) || emptyDetails.contains(itemId)) { // Don't overwrite existing components return; } RowReference rowReference = new RowReference(getParentGrid()); rowReference.set(itemId); DetailsGenerator detailsGenerator = getParentGrid() .getDetailsGenerator(); Component details = detailsGenerator.getDetails(rowReference); if (details != null) { if (details.getParent() != null) { String name = detailsGenerator.getClass().getName(); throw new IllegalStateException( name + " generated a details component that already " + "was attached. (itemId: " + itemId + ", component: " + details + ")"); } itemIdToDetailsComponent.put(itemId, details); addComponentToGrid(details); assert !emptyDetails.contains(itemId) : "Bookeeping thinks " + "itemId is empty even though we just created a " + "component for it (" + itemId + ")"; } else { emptyDetails.add(itemId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createDetails File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
createDetails
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private void cleanUpRemovedTaskLocked(TaskRecord tr, boolean killProcess, boolean removeFromRecents) { if (removeFromRecents) { mRecentTasks.remove(tr); tr.removedFromRecents(); } ComponentName component = tr.getBaseIntent().getComponent(); if (component == null) { Slog.w(TAG, "No component for base intent of task: " + tr); return; } // Find any running services associated with this app and stop if needed. mServices.cleanUpRemovedTaskLocked(tr, component, new Intent(tr.getBaseIntent())); if (!killProcess) { return; } // Determine if the process(es) for this task should be killed. final String pkg = component.getPackageName(); ArrayList<ProcessRecord> procsToKill = new ArrayList<>(); ArrayMap<String, SparseArray<ProcessRecord>> pmap = mProcessNames.getMap(); for (int i = 0; i < pmap.size(); i++) { SparseArray<ProcessRecord> uids = pmap.valueAt(i); for (int j = 0; j < uids.size(); j++) { ProcessRecord proc = uids.valueAt(j); if (proc.userId != tr.userId) { // Don't kill process for a different user. continue; } if (proc == mHomeProcess) { // Don't kill the home process along with tasks from the same package. continue; } if (!proc.pkgList.containsKey(pkg)) { // Don't kill process that is not associated with this task. continue; } for (int k = 0; k < proc.activities.size(); k++) { TaskRecord otherTask = proc.activities.get(k).task; if (tr.taskId != otherTask.taskId && otherTask.inRecents) { // Don't kill process(es) that has an activity in a different task that is // also in recents. return; } } if (proc.foregroundServices) { // Don't kill process(es) with foreground service. return; } // Add process to kill list. procsToKill.add(proc); } } // Kill the running processes. for (int i = 0; i < procsToKill.size(); i++) { ProcessRecord pr = procsToKill.get(i); if (pr.setSchedGroup == ProcessList.SCHED_GROUP_BACKGROUND && pr.curReceiver == null) { pr.kill("remove task", true); } else { // We delay killing processes that are not in the background or running a receiver. pr.waitingToKill = "remove task"; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cleanUpRemovedTaskLocked 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
cleanUpRemovedTaskLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@Override public void onClick(View v) { // Post the selection action to the end of the UI thread to allow the suggestion // view a chance to update their background selection state. PerformSelectSuggestion performSelection = new PerformSelectSuggestion(); if (!post(performSelection)) performSelection.run(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onClick File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
onClick
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
public boolean yieldIfContendedSafely(long sleepAfterYieldDelay) { return yieldIfContendedHelper(true /* check yielding */, sleepAfterYieldDelay); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: yieldIfContendedSafely File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
yieldIfContendedSafely
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Test public void executeTransParamSyntaxError(TestContext context) { postgresClient = postgresClient(); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.execute(trans, "'", new JsonArray(), context.asyncAssertFailure(execute -> { postgresClient.rollbackTx(trans, context.asyncAssertSuccess()); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeTransParamSyntaxError 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
executeTransParamSyntaxError
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
protected static Class self() { return Self.class; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: self File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
self
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
private void resetInactivePasswordRequirementsIfRPlus(int userId, ActiveAdmin admin) { if (passwordQualityInvocationOrderCheckEnabled(admin.info.getPackageName(), userId)) { final PasswordPolicy policy = admin.mPasswordPolicy; if (policy.quality < PASSWORD_QUALITY_NUMERIC) { policy.length = PasswordPolicy.DEF_MINIMUM_LENGTH; } if (policy.quality < PASSWORD_QUALITY_COMPLEX) { policy.letters = PasswordPolicy.DEF_MINIMUM_LETTERS; policy.upperCase = PasswordPolicy.DEF_MINIMUM_UPPER_CASE; policy.lowerCase = PasswordPolicy.DEF_MINIMUM_LOWER_CASE; policy.numeric = PasswordPolicy.DEF_MINIMUM_NUMERIC; policy.symbols = PasswordPolicy.DEF_MINIMUM_SYMBOLS; policy.nonLetter = PasswordPolicy.DEF_MINIMUM_NON_LETTER; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetInactivePasswordRequirementsIfRPlus 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
resetInactivePasswordRequirementsIfRPlus
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private String getDefaultAttachmentArchiveStore(XWikiContext xcontext) { AttachmentVersioningStore store = xcontext.getWiki().getDefaultAttachmentArchiveStore(); if (store != null && store != this.attachmentArchiveStore) { return store.getHint(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultAttachmentArchiveStore File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
getDefaultAttachmentArchiveStore
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
public void setLogoutUrl(final String logoutUrl) { this.logoutUrl = logoutUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLogoutUrl File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setLogoutUrl
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
public Network syncGetCurrentNetwork() { return mWifiThreadRunner.call( () -> { if (getCurrentState() == mL3ConnectedState || getCurrentState() == mRoamingState) { return getCurrentNetwork(); } return null; }, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: syncGetCurrentNetwork File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
syncGetCurrentNetwork
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public void requestRestoreLoad() { if (mNativeContentViewCore != 0) nativeRequestRestoreLoad(mNativeContentViewCore); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestRestoreLoad 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
requestRestoreLoad
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public void setGroupService(XWikiGroupService groupService) { this.groupService = groupService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setGroupService 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
setGroupService
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0