instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
private void handleAttachmentSelection(MenuItem item) { switch (item.getItemId()) { case R.id.attach_choose_picture: attachFile(ATTACHMENT_CHOICE_CHOOSE_IMAGE); break; case R.id.attach_take_picture: attachFile(ATTACHMENT_CHOICE_TAKE_PHOTO); break; case R.id.attach_record_video: attachFile(ATTACHMENT_CHOICE_RECORD_VIDEO); break; case R.id.attach_choose_file: attachFile(ATTACHMENT_CHOICE_CHOOSE_FILE); break; case R.id.attach_record_voice: attachFile(ATTACHMENT_CHOICE_RECORD_VOICE); break; case R.id.attach_location: attachFile(ATTACHMENT_CHOICE_LOCATION); break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleAttachmentSelection File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
handleAttachmentSelection
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public boolean runsModal() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runsModal File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
runsModal
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
public void setVolumeManager(VolumeManager volumeManager) { this.volumeManager = volumeManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVolumeManager File: src/main/java/com/github/junrar/Archive.java Repository: junrar The code follows secure coding practices.
[ "CWE-835" ]
CVE-2018-12418
MEDIUM
4.3
junrar
setVolumeManager
src/main/java/com/github/junrar/Archive.java
ad8d0ba8e155630da8a1215cee3f253e0af45817
0
Analyze the following code function for security vulnerabilities
boolean isPackageInstalled(String packageName, int userId) { return getApplicationInfo(packageName, userId) != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPackageInstalled File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
isPackageInstalled
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
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/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setServerIndex
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@LogMessage(level = Level.INFO) @Message(id = 716, value = "Running in Servlet 2.x environment. Asynchronous request support is disabled.") void servlet2Environment();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: servlet2Environment File: impl/src/main/java/org/jboss/weld/logging/ServletLogger.java Repository: weld/core The code follows secure coding practices.
[ "CWE-362" ]
CVE-2014-8122
MEDIUM
4.3
weld/core
servlet2Environment
impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
8e413202fa1af08c09c580f444e4fd16874f9c65
0
Analyze the following code function for security vulnerabilities
@Test public void selectSingleTxException(TestContext context) { postgresClient().selectSingle(null, "SELECT 1", context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectSingleTxException 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
selectSingleTxException
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public Set<ServerSession> disassociate(String userId) { Set<LocalLocation> localLocations = new HashSet<>(); synchronized (_uid2Location) { Set<Location> userLocations = _uid2Location.get(userId); if (userLocations != null) { for (Location location : userLocations) { if (location instanceof LocalLocation) { localLocations.add((LocalLocation)location); } } } } Set<ServerSession> removedUserSessions = new HashSet<>(); for (LocalLocation location : localLocations) { ServerSession session = location._session; boolean removed = disassociate(userId, session); if (removed) { removedUserSessions.add(session); } } return removedUserSessions; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disassociate File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
disassociate
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
@Override public String getEnrollmentSpecificId(String callerPackage) { if (!mHasFeature) { return ""; } final CallerIdentity caller = getCallerIdentity(callerPackage); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller) || isCallerDelegate(caller, DELEGATION_CERT_INSTALL)); synchronized (getLockObject()) { final ActiveAdmin requiredAdmin = getDeviceOrProfileOwnerAdminLocked( caller.getUserId()); final String esid = requiredAdmin.mEnrollmentSpecificId; return esid != null ? esid : ""; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnrollmentSpecificId 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
getEnrollmentSpecificId
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Exported(name="jobs") public List<TopLevelItem> getItems() { if (authorizationStrategy instanceof AuthorizationStrategy.Unsecured || authorizationStrategy instanceof FullControlOnceLoggedInAuthorizationStrategy) { return new ArrayList(items.values()); } List<TopLevelItem> viewableItems = new ArrayList<TopLevelItem>(); for (TopLevelItem item : items.values()) { if (item.hasPermission(Item.READ)) viewableItems.add(item); } return viewableItems; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getItems File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getItems
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public static boolean isCloudinaryAvatarRepositoryEnabled() { return !StringUtils.isBlank(CONF.cloudinaryUrl()) && "cloudinary".equalsIgnoreCase(CONF.avatarRepository()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCloudinaryAvatarRepositoryEnabled File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
isCloudinaryAvatarRepositoryEnabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public String getFullDisplayName() { return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFullDisplayName File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getFullDisplayName
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public NamedNodeMap getAttributes() { return NamedAttrNodeMapImpl.EMPTY_MAP; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributes File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
getAttributes
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
@GET @Path("/contents") public Response getFileContents(@QueryParam("f") String fileName, @Context SecurityContext securityContext) { if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) { throw new ForbiddenException("FILESYSTEM EDITOR role is required for reading files."); } return fileContents(ensureFileIsAllowed(fileName)); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-40315 - Severity: HIGH - CVSS Score: 8.0 Description: NMS-15702: Only members of ROLE_ADMIN can view/edit users.xml Function: getFileContents File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java Repository: OpenNMS/opennms Fixed Code: @GET @Path("/contents") public Response getFileContents(@QueryParam("f") String fileName, @Context SecurityContext securityContext) { if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) { throw new ForbiddenException("FILESYSTEM EDITOR role is required for reading files."); } return fileContents(ensureFileIsAllowed(fileName, securityContext)); }
[ "CWE-Other" ]
CVE-2023-40315
HIGH
8
OpenNMS/opennms
getFileContents
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
201301e067329ababa3c0671ded5c4c43347d4a8
1
Analyze the following code function for security vulnerabilities
public boolean isNavbarLink2Enabled() { return !StringUtils.isBlank(getNavbarLink2URL()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isNavbarLink2Enabled File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
isNavbarLink2Enabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public <T> T unwrap(Class<T> iface) throws SQLException { if (iface.isAssignableFrom(getClass())) { return iface.cast(this); } throw new SQLException("Cannot unwrap to " + iface.getName()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unwrap 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
unwrap
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public String display(String fieldname, String mode, String prefix, Object obj) { if (obj == null) { return ""; } return this.doc.display(fieldname, mode, prefix, obj.getBaseObject(), getSyntaxId(), 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
public void deleteBatch(List<String> ids) { // 删除外键表 preDeleteBatch(ids); ApiScenarioExample example = new ApiScenarioExample(); example.createCriteria().andIdIn(ids); apiScenarioMapper.deleteByExample(example); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteBatch File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
deleteBatch
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Before @Override public void setUp() throws Exception { super.setUp(); this.wikiName = getWiki(); this.spaces = Arrays.asList(getTestClassName()); this.pageName = getTestMethodName(); this.reference = new DocumentReference(this.wikiName, this.spaces, this.pageName); // Create a clean test page. this.testUtils.rest().delete(this.reference); this.testUtils.rest().savePage(this.reference); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUp File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
setUp
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
public void setToDouble(double n) { setBcdToZero(); flags = 0; // Double.compare() handles +0.0 vs -0.0 if (Double.compare(n, 0.0) < 0) { flags |= NEGATIVE_FLAG; n = -n; } if (Double.isNaN(n)) { flags |= NAN_FLAG; } else if (Double.isInfinite(n)) { flags |= INFINITY_FLAG; } else if (n != 0) { _setToDoubleFast(n); compact(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setToDouble File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
setToDouble
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
public long getXWikiPreferenceAsLong(String preference) { return this.xwiki.getXWikiPreferenceAsLong(preference, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiPreferenceAsLong File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getXWikiPreferenceAsLong
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
private <T> List<T> searchGenericInternal(String sql, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException { return executeRead(context, session -> { try { Query query = createQuery(session, filterSQL(sql), parameterValues); if (start > 0) { query.setFirstResult(start); } if (nb > 0) { query.setMaxResults(nb); } Iterator<T> it = query.list().iterator(); List<T> list = new ArrayList<>(); while (it.hasNext()) { list.add(it.next()); } return list; } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SEARCH, "Exception while searching documents with SQL [{0}]", e, new Object[] {sql}); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: searchGenericInternal 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
searchGenericInternal
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 reset() { lastField_.clear(); lastFieldId_ = 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reset File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
reset
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
void updatePictureInPictureMode(Rect targetRootTaskBounds, boolean forceUpdate) { if (task == null || task.getRootTask() == null || !attachedToProcess()) { return; } final boolean inPictureInPictureMode = inPinnedWindowingMode() && targetRootTaskBounds != null; if (inPictureInPictureMode != mLastReportedPictureInPictureMode || forceUpdate) { // Picture-in-picture mode changes also trigger a multi-window mode change as well, so // update that here in order. Set the last reported MW state to the same as the PiP // state since we haven't yet actually resized the task (these callbacks need to // precede the configuration change from the resize. mLastReportedPictureInPictureMode = inPictureInPictureMode; mLastReportedMultiWindowMode = inPictureInPictureMode; ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS, true /* ignoreVisibility */); } }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21145 - Severity: HIGH - CVSS Score: 7.8 Description: Remove Activity if it enters PiP without window This is to prevent malicious app entering PiP without being visible first, like blocking onResume from completion. Which in turn leaves the PiP window in limbo and non-interactable. Bug: 265293293 Test: atest PinnedStackTests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4fad1456409b79d6e649a29d5116a4fe3160bd21) Merged-In: I458a9508662e72a1adb9d9818105f2e9d7096d44 Change-Id: I458a9508662e72a1adb9d9818105f2e9d7096d44 Function: updatePictureInPictureMode File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android Fixed Code: void updatePictureInPictureMode(Rect targetRootTaskBounds, boolean forceUpdate) { if (task == null || task.getRootTask() == null || !attachedToProcess()) { return; } final boolean inPictureInPictureMode = inPinnedWindowingMode() && targetRootTaskBounds != null; if (inPictureInPictureMode != mLastReportedPictureInPictureMode || forceUpdate) { // Picture-in-picture mode changes also trigger a multi-window mode change as well, so // update that here in order. Set the last reported MW state to the same as the PiP // state since we haven't yet actually resized the task (these callbacks need to // precede the configuration change from the resize. mLastReportedPictureInPictureMode = inPictureInPictureMode; mLastReportedMultiWindowMode = inPictureInPictureMode; ensureActivityConfiguration(0 /* globalChanges */, PRESERVE_WINDOWS, true /* ignoreVisibility */); if (inPictureInPictureMode && findMainWindow() == null) { // Prevent malicious app entering PiP without valid WindowState, which can in turn // result a non-touchable PiP window since the InputConsumer for PiP requires it. EventLog.writeEvent(0x534e4554, "265293293", -1, ""); removeImmediately(); } } }
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
updatePictureInPictureMode
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
1
Analyze the following code function for security vulnerabilities
private static String classNameOrClass(String className, Class clazz) { return !isNullOrEmpty(className) ? className : clazz != null ? clazz.getName() : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: classNameOrClass File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-522" ]
CVE-2023-33264
MEDIUM
4.3
hazelcast
classNameOrClass
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
80a502d53cc48bf895711ab55f95e3a51e344ac1
0
Analyze the following code function for security vulnerabilities
public String getTitleBarLabel(String language) throws IndexUnreachableException, PresentationException, DAOException, ViewerConfigurationException { if (navigationHelper == null) { return null; } if (PageType.getByName(navigationHelper.getCurrentPage()) != null && PageType.getByName(navigationHelper.getCurrentPage()).isDocumentPage() && viewManager != null) { // Prefer the label of the current TOC element TOC toc = getToc(); if (toc != null && toc.getTocElements() != null && !toc.getTocElements().isEmpty()) { String label = null; String labelTemplate = "_DEFAULT"; if (getViewManager() != null) { labelTemplate = getViewManager().getTopStructElement().getDocStructType(); } if (DataManager.getInstance().getConfiguration().isDisplayAnchorLabelInTitleBar(labelTemplate) && StringUtils.isNotBlank(viewManager.getAnchorPi())) { String prefix = DataManager.getInstance().getConfiguration().getAnchorLabelInTitleBarPrefix(labelTemplate); String suffix = DataManager.getInstance().getConfiguration().getAnchorLabelInTitleBarSuffix(labelTemplate); prefix = ViewerResourceBundle.getTranslation(prefix, Locale.forLanguageTag(language)).replace("_SPACE_", " "); suffix = ViewerResourceBundle.getTranslation(suffix, Locale.forLanguageTag(language)).replace("_SPACE_", " "); label = prefix = toc.getLabel(viewManager.getAnchorPi(), language) + suffix + toc.getLabel(viewManager.getPi(), language); } else { label = toc.getLabel(viewManager.getPi(), language); } if (label != null) { return label; } } String label = viewManager.getTopStructElement().getLabel(selectedRecordLanguage); if (StringUtils.isNotEmpty(label)) { return label; } } else if (cmsBean != null && navigationHelper.isCmsPage()) { CMSPage cmsPage = cmsBean.getCurrentPage(); if (cmsPage != null) { String cmsPageName = StringUtils.isNotBlank(cmsPage.getMenuTitle()) ? cmsPage.getMenuTitle() : cmsPage.getTitle(); if (StringUtils.isNotBlank(cmsPageName)) { return cmsPageName; } } } if (navigationHelper.getCurrentPageType() != null) { PageType pageType = navigationHelper.getCurrentPageType(); if (PageType.other.equals(pageType)) { String pageLabel = navigationHelper.getCurrentPage(); if (StringUtils.isNotBlank(pageLabel)) { return Messages.translate(pageLabel, Locale.forLanguageTag(language)); } } return Messages.translate(pageType.getLabel(), Locale.forLanguageTag(language)); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitleBarLabel 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
getTitleBarLabel
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
public static void createParentDir(File f) throws IOException { createParentDir(f, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createParentDir File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
createParentDir
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
private boolean buildManifest() throws BrutException { try { if (!new File(mApkDir, "AndroidManifest.xml").exists()) { return false; } if (!mConfig.forceBuildAll) { LOGGER.info("Checking whether resources has changed..."); } File apkDir = new File(mApkDir, APK_DIRNAME); if (mConfig.forceBuildAll || isModified(newFiles(APK_MANIFEST_FILENAMES, mApkDir), newFiles(APK_MANIFEST_FILENAMES, apkDir))) { LOGGER.info("Building AndroidManifest.xml..."); File apkFile = File.createTempFile("APKTOOL", null); //noinspection ResultOfMethodCallIgnored apkFile.delete(); File ninePatch = new File(mApkDir, "9patch"); if (!ninePatch.exists()) { ninePatch = null; } AaptInvoker invoker = new AaptInvoker(mConfig, mApkInfo); invoker.invokeAapt(apkFile, new File(mApkDir, "AndroidManifest.xml"), null, ninePatch, null, getIncludeFiles()); Directory tmpDir = new ExtFile(apkFile).getDirectory(); tmpDir.copyToDir(apkDir, APK_MANIFEST_FILENAMES); //noinspection ResultOfMethodCallIgnored apkFile.delete(); } return true; } catch (IOException | DirectoryException ex) { throw new AndrolibException(ex); } catch (AndrolibException ex) { LOGGER.warning("Parse AndroidManifest.xml failed, treat it as raw file."); return buildManifestRaw(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildManifest File: brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java Repository: iBotPeaches/Apktool The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-21633
HIGH
7.8
iBotPeaches/Apktool
buildManifest
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
d348c43b24a9de350ff6e5bd610545a10c1fc712
0
Analyze the following code function for security vulnerabilities
private boolean buildManifestRaw() throws AndrolibException { try { File apkDir = new File(mApkDir, APK_DIRNAME); LOGGER.info("Copying raw AndroidManifest.xml..."); mApkDir.getDirectory().copyToDir(apkDir, APK_MANIFEST_FILENAMES); return true; } catch (DirectoryException ex) { throw new AndrolibException(ex); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildManifestRaw File: brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java Repository: iBotPeaches/Apktool The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-21633
HIGH
7.8
iBotPeaches/Apktool
buildManifestRaw
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
d348c43b24a9de350ff6e5bd610545a10c1fc712
0
Analyze the following code function for security vulnerabilities
HotRodServer getHotrodServer() { return hotrod; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHotrodServer File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
getHotrodServer
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
69be66141eee7abb1c47d46f0a6b74b079709f4b
0
Analyze the following code function for security vulnerabilities
private static void servicesXmlGenerator(XmlGenerator gen, Config config) { ServicesConfig c = config.getServicesConfig(); if (c == null) { return; } gen.open("services", "enable-defaults", c.isEnableDefaults()); if (CollectionUtil.isNotEmpty(c.getServiceConfigs())) { for (ServiceConfig serviceConfig : c.getServiceConfigs()) { gen.open("service", "enabled", serviceConfig.isEnabled()) .node("name", serviceConfig.getName()) .node("class-name", classNameOrImplClass(serviceConfig.getClassName(), serviceConfig.getImplementation())) .appendProperties(serviceConfig.getProperties()) .close(); } } gen.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: servicesXmlGenerator File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
servicesXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void processFileAndScheduleJobs(String fileName, Scheduler sched) throws Exception { processFileAndScheduleJobs(fileName, getSystemIdForFileName(fileName), sched); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processFileAndScheduleJobs File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
processFileAndScheduleJobs
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
private boolean packageIsBrowser(String packageName, int userId) { List<ResolveInfo> list = queryIntentActivities(sBrowserIntent, null, PackageManager.MATCH_ALL, userId); final int N = list.size(); for (int i = 0; i < N; i++) { ResolveInfo info = list.get(i); if (packageName.equals(info.activityInfo.packageName)) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: packageIsBrowser 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
packageIsBrowser
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public boolean isPushEnabled() { return pushEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPushEnabled 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
isPushEnabled
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
public synchronized void updateLong(String columnName, long x) throws SQLException { updateLong(findColumn(columnName), x); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateLong 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
updateLong
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override public OptionMap getUndertowOptions() { return OptionMap.EMPTY; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUndertowOptions File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
getUndertowOptions
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
@Override public List<SearchIndexableRaw> getRawDataToIndex(Context context, boolean enabled) { final List<SearchIndexableRaw> result = new ArrayList<>(); final UserCapabilities userCaps = UserCapabilities.create(context); if (!userCaps.mEnabled) { return result; } final Resources res = context.getResources(); SearchIndexableRaw data = new SearchIndexableRaw(context); data.title = res.getString(R.string.user_settings_title); data.screenTitle = res.getString(R.string.user_settings_title); result.add(data); if (userCaps.mCanAddUser || userCaps.mDisallowAddUserSetByAdmin) { data = new SearchIndexableRaw(context); data.title = res.getString(userCaps.mCanAddRestrictedProfile ? R.string.user_add_user_or_profile_menu : R.string.user_add_user_menu); data.screenTitle = res.getString(R.string.user_settings_title); result.add(data); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRawDataToIndex File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
getRawDataToIndex
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
void checkPolicyVisibilityChange() { if (isLegacyPolicyVisibility() != mLegacyPolicyVisibilityAfterAnim) { if (DEBUG_VISIBILITY) { Slog.v(TAG, "Policy visibility changing after anim in " + mWinAnimator + ": " + mLegacyPolicyVisibilityAfterAnim); } if (mLegacyPolicyVisibilityAfterAnim) { setPolicyVisibilityFlag(LEGACY_POLICY_VISIBILITY); } else { clearPolicyVisibilityFlag(LEGACY_POLICY_VISIBILITY); } if (!isVisibleByPolicy()) { mWinAnimator.hide(getGlobalTransaction(), "checkPolicyVisibilityChange"); if (isFocused()) { ProtoLog.i(WM_DEBUG_FOCUS_LIGHT, "setAnimationLocked: setting mFocusMayChange true"); mWmService.mFocusMayChange = true; } setDisplayLayoutNeeded(); // Window is no longer visible -- make sure if we were waiting // for it to be displayed before enabling the display, that // we allow the display to be enabled now. mWmService.enableScreenIfNeededLocked(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPolicyVisibilityChange 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
checkPolicyVisibilityChange
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public void checkPrintJobAccess() { try { if (enterPublicInterface()) return; throw new SecurityException(localized("security.error_printer")); //$NON-NLS-1$ } finally { exitPublicInterface(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPrintJobAccess File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
checkPrintJobAccess
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
@Override public boolean isVrModePackageEnabled(ComponentName packageName) { if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_VR_MODE)) { throw new UnsupportedOperationException("VR mode not supported on this device!"); } final VrManagerInternal vrService = LocalServices.getService(VrManagerInternal.class); return vrService.hasVrPackage(packageName, UserHandle.getCallingUserId()) == VrManagerInternal.NO_ERROR; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isVrModePackageEnabled 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
isVrModePackageEnabled
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public XWikiDocument cloneRename(DocumentReference newDocumentReference, XWikiContext context) throws XWikiException { loadAttachments(context); loadArchive(context); return this.cloneInternal(newDocumentReference, true, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cloneRename 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
cloneRename
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
private ContentProviderHolder getContentProviderExternalUnchecked(String name, IBinder token, int userId) { return getContentProviderImpl(null, name, token, true, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentProviderExternalUnchecked 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
getContentProviderExternalUnchecked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public List<FileAsset> findFileAssetsByFolder(Folder parentFolder, String sortBy, boolean live, boolean working, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException { List<FileAsset> assets = null; try{ assets = fromContentlets(perAPI.filterCollection(contAPI.search("+structureType:" + Structure.STRUCTURE_TYPE_FILEASSET+" +conFolder:" + parentFolder.getInode() + (live?" +live:true":"") + (working? " +working:true":""), -1, 0, sortBy , user, respectFrontendRoles), PermissionAPI.PERMISSION_READ, respectFrontendRoles, user)); } catch (Exception e) { Logger.error(this.getClass(), e.getMessage(), e); throw new DotRuntimeException(e.getMessage(), e); } return assets; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findFileAssetsByFolder File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-434" ]
CVE-2017-11466
HIGH
9
dotCMS/core
findFileAssetsByFolder
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
ab2bb2e00b841d131b8734227f9106e3ac31bb99
0
Analyze the following code function for security vulnerabilities
public void engineInit( int opmode, Key key, SecureRandom random) throws InvalidKeyException { try { engineInit(opmode, key, (AlgorithmParameterSpec)null, random); } catch (InvalidAlgorithmParameterException e) { throw new IllegalArgumentException("cannot handle supplied parameter spec: " + e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineInit File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineInit
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
public void onOverdrawBottomHeightChanged(int overdrawHeightPix) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onOverdrawBottomHeightChanged 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
onOverdrawBottomHeightChanged
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
@Override public void setProcessImportant(IBinder token, int pid, boolean isForeground, String reason) { enforceCallingPermission(android.Manifest.permission.SET_PROCESS_LIMIT, "setProcessImportant()"); synchronized(this) { boolean changed = false; synchronized (mPidsSelfLocked) { ProcessRecord pr = mPidsSelfLocked.get(pid); if (pr == null && isForeground) { Slog.w(TAG, "setProcessForeground called on unknown pid: " + pid); return; } ImportanceToken oldToken = mImportantProcesses.get(pid); if (oldToken != null) { oldToken.token.unlinkToDeath(oldToken, 0); mImportantProcesses.remove(pid); if (pr != null) { pr.forcingToImportant = null; } changed = true; } if (isForeground && token != null) { ImportanceToken newToken = new ImportanceToken(pid, token, reason) { @Override public void binderDied() { importanceTokenDied(this); } }; try { token.linkToDeath(newToken, 0); mImportantProcesses.put(pid, newToken); pr.forcingToImportant = newToken; changed = true; } catch (RemoteException e) { // If the process died while doing this, we will later // do the cleanup with the process death link. } } } if (changed) { updateOomAdjLocked(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProcessImportant 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
setProcessImportant
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void routeAids(String aid, int route) { Message msg = mHandler.obtainMessage(); msg.what = MSG_ROUTE_AID; msg.arg1 = route; msg.obj = aid; mHandler.sendMessage(msg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: routeAids File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
routeAids
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
public static List<String> splitAsList(String source, String delimiter) { return splitAsList(source, delimiter, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: splitAsList File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
splitAsList
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@Override public void onDismiss(DialogInterface dialog) { synchronized (mUserLock) { mRemovingUserId = -1; updateUserList(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDismiss File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
onDismiss
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
boolean dumpBinderProxiesCounts(PrintWriter pw, String header) { SparseIntArray counts = BinderInternal.nGetBinderProxyPerUidCounts(); if(counts != null) { pw.println(header); for (int i = 0; i < counts.size(); i++) { final int uid = counts.keyAt(i); final int binderCount = counts.valueAt(i); pw.print(" UID "); pw.print(uid); pw.print(", binder count = "); pw.print(binderCount); pw.print(", package(s)= "); final String[] pkgNames = mContext.getPackageManager().getPackagesForUid(uid); if (pkgNames != null) { for (int j = 0; j < pkgNames.length; j++) { pw.print(pkgNames[j]); pw.print("; "); } } else { pw.print("NO PACKAGE NAME FOUND"); } pw.println(); } return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpBinderProxiesCounts 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
dumpBinderProxiesCounts
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public @NonNull Set<String> getCrossProfilePackages(@NonNull ComponentName admin) { throwIfParentInstance("getCrossProfilePackages"); if (mService != null) { try { return new ArraySet<>(mService.getCrossProfilePackages(admin)); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return Collections.emptySet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfilePackages 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
getCrossProfilePackages
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public boolean getCrossProfileCallerIdDisabledForUser(int userId) { Preconditions.checkArgumentNonnegative(userId, "Invalid userId"); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerAdminLocked(userId); if (admin == null) { return false; } if (admin.mManagedProfileCallerIdAccess == null) { return admin.disableCallerId; } return admin.mManagedProfileCallerIdAccess.getPolicyType() == PackagePolicy.PACKAGE_POLICY_ALLOWLIST; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfileCallerIdDisabledForUser 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
getCrossProfileCallerIdDisabledForUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void addAlgorithmsVerifier(AlgorithmsVerifier verifier) { kexer.addAlgorithmsVerifier(verifier); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAlgorithmsVerifier File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
addAlgorithmsVerifier
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
void showStartingWindow(ActivityRecord prev, boolean newTask, boolean taskSwitch, boolean processRunning, boolean startActivity, ActivityRecord sourceRecord, ActivityOptions candidateOptions) { if (mTaskOverlay) { // We don't show starting window for overlay activities. return; } final ActivityOptions startOptions = candidateOptions != null ? candidateOptions : mPendingOptions; if (startOptions != null && startOptions.getAnimationType() == ActivityOptions.ANIM_SCENE_TRANSITION) { // Don't show starting window when using shared element transition. return; } final int splashScreenTheme = startActivity ? getSplashscreenTheme(startOptions) : 0; final int resolvedTheme = evaluateStartingWindowTheme(prev, packageName, theme, splashScreenTheme); mSplashScreenStyleSolidColor = shouldUseSolidColorSplashScreen(sourceRecord, startActivity, startOptions, resolvedTheme); final boolean activityCreated = mState.ordinal() >= STARTED.ordinal() && mState.ordinal() <= STOPPED.ordinal(); // If this activity is just created and all activities below are finish, treat this // scenario as warm launch. final boolean newSingleActivity = !newTask && !activityCreated && task.getActivity((r) -> !r.finishing && r != this) == null; final boolean scheduled = addStartingWindow(packageName, resolvedTheme, prev, newTask || newSingleActivity, taskSwitch, processRunning, allowTaskSnapshot(), activityCreated, mSplashScreenStyleSolidColor, allDrawn); if (DEBUG_STARTING_WINDOW_VERBOSE && scheduled) { Slog.d(TAG, "Scheduled starting window for " + this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showStartingWindow 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
showStartingWindow
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public String getContactInfo(final String userID, final String command) throws IOException { update(); m_readLock.lock(); try { final User user = m_users.get(userID); return _getContactInfo(user, command); } finally { m_readLock.unlock(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContactInfo File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352" ]
CVE-2021-25931
MEDIUM
6.8
OpenNMS/opennms
getContactInfo
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
@Override public void onHostCardEmulationData(byte[] data) { if (mCardEmulationManager != null) { mCardEmulationManager.onHostCardEmulationData(data); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onHostCardEmulationData File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
onHostCardEmulationData
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
@Override public HttpHeaders setInt(CharSequence name, int value) { headers.setInt(name, value); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInt File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
setInt
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
@Override public IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId, int intentFlags) { final int userId = UserHandle.getCallingUserId(); if (DEBUG) { Slog.i(TAG, "createAppWidgetConfigIntentSender() " + userId); } // Make sure the package runs under the caller uid. mSecurityPolicy.enforceCallFromPackage(callingPackage); synchronized (mLock) { ensureGroupStateLoadedLocked(userId); // NOTE: The lookup is enforcing security across users by making // sure the caller can only access widgets it hosts or provides. Widget widget = lookupWidgetLocked(appWidgetId, Binder.getCallingUid(), callingPackage); if (widget == null) { throw new IllegalArgumentException("Bad widget id " + appWidgetId); } Provider provider = widget.provider; if (provider == null) { throw new IllegalArgumentException("Widget not bound " + appWidgetId); } Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); intent.setComponent(provider.info.configure); intent.setFlags(intentFlags); // All right, create the sender. final long identity = Binder.clearCallingIdentity(); try { return PendingIntent.getActivityAsUser( mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT, null, new UserHandle(provider.getUserId())) .getIntentSender(); } finally { Binder.restoreCallingIdentity(identity); } } }
Vulnerability Classification: - CWE: CWE-284 - CVE: CVE-2015-1541 - Severity: MEDIUM - CVSS Score: 4.3 Description: DO NOT MERGE Don't take flags when creating app widget config activity. bug:19618745 Change-Id: I7973ebfc67ebf52f14890dda9eb891a7b8a5a095 Function: createAppWidgetConfigIntentSender File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android Fixed Code: @Override public IntentSender createAppWidgetConfigIntentSender(String callingPackage, int appWidgetId) { final int userId = UserHandle.getCallingUserId(); if (DEBUG) { Slog.i(TAG, "createAppWidgetConfigIntentSender() " + userId); } // Make sure the package runs under the caller uid. mSecurityPolicy.enforceCallFromPackage(callingPackage); synchronized (mLock) { ensureGroupStateLoadedLocked(userId); // NOTE: The lookup is enforcing security across users by making // sure the caller can only access widgets it hosts or provides. Widget widget = lookupWidgetLocked(appWidgetId, Binder.getCallingUid(), callingPackage); if (widget == null) { throw new IllegalArgumentException("Bad widget id " + appWidgetId); } Provider provider = widget.provider; if (provider == null) { throw new IllegalArgumentException("Widget not bound " + appWidgetId); } Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); intent.setComponent(provider.info.configure); // All right, create the sender. final long identity = Binder.clearCallingIdentity(); try { return PendingIntent.getActivityAsUser( mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT, null, new UserHandle(provider.getUserId())) .getIntentSender(); } finally { Binder.restoreCallingIdentity(identity); } } }
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
createAppWidgetConfigIntentSender
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
1
Analyze the following code function for security vulnerabilities
public java.lang.Object getValue(String fieldName, Object object) { if (object != null) { return object.getValue(fieldName); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValue 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
getValue
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
@VisibleForTesting String injectShortcutManagerConstants() { return android.provider.Settings.Global.getString( mContext.getContentResolver(), android.provider.Settings.Global.SHORTCUT_MANAGER_CONSTANTS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectShortcutManagerConstants File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
injectShortcutManagerConstants
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
protected abstract boolean deleteOnExit();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteOnExit File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java Repository: netty The code follows secure coding practices.
[ "CWE-378", "CWE-379" ]
CVE-2021-21290
LOW
1.9
netty
deleteOnExit
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
c735357bf29d07856ad171c6611a2e1a0e0000ec
0
Analyze the following code function for security vulnerabilities
@Override protected Class<?> resolveClass(ObjectStreamClass desc) throws ClassNotFoundException { return Resources.classForName(desc.getName()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveClass File: src/main/java/org/apache/ibatis/cache/decorators/SerializedCache.java Repository: mybatis/mybatis-3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-26945
MEDIUM
5.1
mybatis/mybatis-3
resolveClass
src/main/java/org/apache/ibatis/cache/decorators/SerializedCache.java
9caf480e05c389548c9889362c2cb080d728b5d8
0
Analyze the following code function for security vulnerabilities
ActivityRecord isInAnyStackLocked(IBinder token) { int numDisplays = mActivityDisplays.size(); for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks; for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityRecord r = stacks.get(stackNdx).isInStackLocked(token); if (r != null) { return r; } } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInAnyStackLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
isInAnyStackLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public static void readFully(InputStream in, byte[] buffer) throws IOException { if (!readFullyOrNothing(in, buffer)) { throw new EOFException(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFully File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
readFully
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void setFrontActivityScreenCompatMode(int mode) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(mode); mRemote.transact(SET_FRONT_ACTIVITY_SCREEN_COMPAT_MODE_TRANSACTION, data, reply, 0); reply.readException(); reply.recycle(); data.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFrontActivityScreenCompatMode File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
setFrontActivityScreenCompatMode
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private String evaluateVelocity(final String content, final String namespace, final DocumentReference author, final DocumentReference sourceDocument, final XWikiContext context) { String result = content; try { result = Utils.getComponent(AuthorExecutor.class) .call(() -> context.getWiki().evaluateVelocity(content, namespace), author, sourceDocument); } catch (Exception e) { // Should not happen since there is nothing in the call() method throwing an exception. LOGGER.error("Failed to evaluate velocity content for namespace {} with the rights of the user {}", namespace, author, e); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: evaluateVelocity File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
evaluateVelocity
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
0
Analyze the following code function for security vulnerabilities
private void checkNewWorkspaceAndProject(WebSession session, UserDTO user) { List<UserGroup> userGroups = user.getUserGroups(); List<Group> groups = user.getGroups(); List<String> projectGroupIds = groups .stream() .filter(ug -> StringUtils.equals(ug.getType(), UserGroupType.PROJECT)) .map(Group::getId) .collect(Collectors.toList()); List<UserGroup> projects = userGroups .stream() .filter(ug -> projectGroupIds.contains(ug.getGroupId())) .collect(Collectors.toList()); if (CollectionUtils.isEmpty(projects)) { List<String> workspaceIds = groups .stream() .filter(ug -> StringUtils.equals(ug.getType(), UserGroupType.WORKSPACE)) .map(Group::getId) .collect(Collectors.toList()); List<UserGroup> workspaces = userGroups .stream() .filter(ug -> workspaceIds.contains(ug.getGroupId())) .collect(Collectors.toList()); if (workspaces.size() > 0) { String wsId = workspaces.get(0).getSourceId(); switchUserResource(session, "workspace", wsId, user); } else { List<String> superGroupIds = groups .stream() .map(Group::getId) .filter(id -> StringUtils.equals(id, UserGroupConstants.SUPER_GROUP)) .collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(superGroupIds)) { Project p = baseProjectMapper.selectOne(); if (p != null) { switchSuperUserResource(session, p.getId(), p.getWorkspaceId(), user); } } else { // 用户登录之后没有项目和工作空间的权限就把值清空 user.setLastWorkspaceId(StringUtils.EMPTY); user.setLastProjectId(StringUtils.EMPTY); updateUser(user); } } } else { UserGroup userGroup = projects.stream() .filter(p -> StringUtils.isNotBlank(p.getSourceId())) .collect(Collectors.toList()).get(0); String projectId = userGroup.getSourceId(); Project p = projectMapper.selectByPrimaryKey(projectId); String wsId = p.getWorkspaceId(); user.setId(user.getId()); user.setLastProjectId(projectId); user.setLastWorkspaceId(wsId); updateUser(user); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkNewWorkspaceAndProject 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
checkNewWorkspaceAndProject
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
c59e381d368990214813085a1a4877c5ef865411
0
Analyze the following code function for security vulnerabilities
@Override protected boolean allowFilterResult( PackageParser.ServiceIntentInfo filter, List<ResolveInfo> dest) { ServiceInfo filterSi = filter.service.info; for (int i=dest.size()-1; i>=0; i--) { ServiceInfo destAi = dest.get(i).serviceInfo; if (destAi.name == filterSi.name && destAi.packageName == filterSi.packageName) { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: allowFilterResult 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
allowFilterResult
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public final ContentProviderHolder getContentProvider( IApplicationThread caller, String callingPackage, String name, int userId, boolean stable) { traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "getContentProvider: ", name); try { return mCpHelper.getContentProvider(caller, callingPackage, name, userId, stable); } finally { Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentProvider 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
getContentProvider
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private static DevModeHandler createInstance(int runningPort, DeploymentConfiguration configuration, File npmFolder, CompletableFuture<Void> waitFor) { return new DevModeHandler(configuration, runningPort, npmFolder, waitFor); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createInstance File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
createInstance
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
public void setVerifyTokenAudience(Boolean verifyTokenAudience) { this.verifyTokenAudience = verifyTokenAudience; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVerifyTokenAudience File: services/src/main/java/org/keycloak/services/managers/ClientManager.java Repository: keycloak The code follows secure coding practices.
[ "CWE-798" ]
CVE-2019-14837
MEDIUM
6.4
keycloak
setVerifyTokenAudience
services/src/main/java/org/keycloak/services/managers/ClientManager.java
9a7c1a91a59ab85e7f8889a505be04a71580777f
0
Analyze the following code function for security vulnerabilities
protected boolean isIgnoredDir(File dir) { // ignoring the workspace and the artifacts directories. Both of them // are potentially large and they do not store any secrets. String n = dir.getName(); return n.equals("workspace") || n.equals("artifacts") || n.equals("plugins") // no mutable data here || n.equals(".") || n.equals(".."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isIgnoredDir File: core/src/main/java/hudson/util/SecretRewriter.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
isIgnoredDir
core/src/main/java/hudson/util/SecretRewriter.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
private static boolean subtypeOf(OpcUaServer server, NodeId dataTypeId, NodeId potentialSuperTypeId) { UaNode dataTypeNode = server.getAddressSpaceManager() .getManagedNode(dataTypeId) .orElse(null); if (dataTypeNode != null) { NodeId superTypeId = getSuperTypeId(server, dataTypeId); if (superTypeId != null) { return superTypeId.equals(potentialSuperTypeId) || subtypeOf(server, superTypeId, potentialSuperTypeId); } else { return false; } } else { return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: subtypeOf File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java Repository: eclipse/milo The code follows secure coding practices.
[ "CWE-770" ]
CVE-2022-25897
HIGH
7.5
eclipse/milo
subtypeOf
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
0
Analyze the following code function for security vulnerabilities
public static final boolean isMobile(HttpServletRequest request) { String userAgent = request.getHeader("user-agent").toLowerCase(); return userAgent.contains("android") || userAgent.contains("iphone") || userAgent.contains("ipad") || userAgent.contains("blackberry"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMobile File: src/main/java/com/openkm/util/FormatUtil.java Repository: openkm/document-management-system The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-40317
MEDIUM
5.4
openkm/document-management-system
isMobile
src/main/java/com/openkm/util/FormatUtil.java
870d518f7de349c3fa4c7b9883789fdca4590c4e
0
Analyze the following code function for security vulnerabilities
@Override protected Group[] getRoleSets() throws LoginException { Group[] roleSets = {userRoles}; return roleSets; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRoleSets File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java Repository: wildfly-security/jboss-negotiation The code follows secure coding practices.
[ "CWE-200" ]
CVE-2015-1849
MEDIUM
4.3
wildfly-security/jboss-negotiation
getRoleSets
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
0
Analyze the following code function for security vulnerabilities
private native void nativeReload(long nativeContentViewCoreImpl, boolean checkForRepost);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeReload 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
nativeReload
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public Object xpathQuery(String xpath, QName type, NamespaceContext nsContext) throws XPathExpressionException { XPathFactory xpathFactory = XPathFactory.newInstance(); XPath xPath = xpathFactory.newXPath(); if (nsContext != null) { xPath.setNamespaceContext(nsContext); } XPathExpression xpathExp = xPath.compile(xpath); try { return xpathExp.evaluate(this.xmlNode, type); } catch (IllegalArgumentException e) { // Thrown if item found does not match expected type return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: xpathQuery File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
xpathQuery
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public List<DictModelMany> queryDictItemsByCodeList(@Param("dictCodeList") List<String> dictCodeList);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: queryDictItemsByCodeList File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45207
CRITICAL
9.8
jeecgboot/jeecg-boot
queryDictItemsByCodeList
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
8632a835c23f558dfee3584d7658cc6a13ccec6f
0
Analyze the following code function for security vulnerabilities
private void saveApiKeysObject() { Sysprop s = new Sysprop("api_keys"); s.setProperties(API_KEYS); pc.create(s); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveApiKeysObject File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
saveApiKeysObject
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public HttpRequest host(final String host) { this.host = host; if (headers.contains(HEADER_HOST)) { headerOverwrite(HEADER_HOST, host); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: host File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
host
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection delete(final String path1, final String path2, final String path3, final Route.Filter filter) { return new Route.Collection( new Route.Definition[]{delete(path1, filter), delete(path2, filter), delete(path3, filter)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
delete
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private static void handleAsVoidResult(CompletableFuture<?> future, AsyncMethodCallback resultHandler) { future.handle((res, cause) -> { if (cause != null) { resultHandler.onError(convert(cause)); } else { resultHandler.onComplete(null); } return null; }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleAsVoidResult File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
handleAsVoidResult
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
public Log adminFindLogByLogId(Object id) { if (id != null) { String sql = "select l.*,last_update_date as lastUpdateDate,u.userName,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId) commentSize ,t.alias as typeAlias,t.typeName as typeName from " + TABLE_NAME + " l inner join user u,type t where t.typeId=l.typeId and u.userId=l.userId and l.logId=?"; Log log = findFirst(sql, id); if (log == null) { sql = "select l.*,last_update_date as lastUpdateDate,u.userName,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId) commentSize ,t.alias as typeAlias,t.typeName as typeName from " + TABLE_NAME + " l inner join user u,type t where t.typeId=l.typeId and u.userId=l.userId and l.alias=?"; log = findFirst(sql, id); } return log; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adminFindLogByLogId File: data/src/main/java/com/zrlog/model/Log.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-17420
MEDIUM
6.5
94fzb/zrlog
adminFindLogByLogId
data/src/main/java/com/zrlog/model/Log.java
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
0
Analyze the following code function for security vulnerabilities
ActivityContainer createVirtualActivityContainer(ActivityRecord parentActivity, IActivityContainerCallback callback) { ActivityContainer activityContainer = new VirtualActivityContainer(parentActivity, callback); mActivityContainers.put(activityContainer.mStackId, activityContainer); if (DEBUG_CONTAINERS) Slog.d(TAG_CONTAINERS, "createActivityContainer: " + activityContainer); parentActivity.mChildContainers.add(activityContainer); return activityContainer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createVirtualActivityContainer File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
createVirtualActivityContainer
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
CompatibilityInfo compatibilityInfoForPackageLocked(ApplicationInfo ai) { return mCompatModePackages.compatibilityInfoForPackageLocked(ai); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compatibilityInfoForPackageLocked 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
compatibilityInfoForPackageLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
protected void handleSocketInterceptorConfig(Node node, BeanDefinitionBuilder networkConfigBuilder) { BeanDefinitionBuilder socketInterceptorConfigBuilder = createBeanBuilder(SocketInterceptorConfig.class); String implAttribute = "implementation"; fillAttributeValues(node, socketInterceptorConfigBuilder, implAttribute); Node implNode = node.getAttributes().getNamedItem(implAttribute); String implementation = implNode != null ? getTextContent(implNode) : null; if (implementation != null) { socketInterceptorConfigBuilder.addPropertyReference(xmlToJavaName(implAttribute), implementation); } for (Node child : childElements(node)) { String name = cleanNodeName(child); if ("properties".equals(name)) { handleProperties(child, socketInterceptorConfigBuilder); } } networkConfigBuilder.addPropertyValue("socketInterceptorConfig", socketInterceptorConfigBuilder.getBeanDefinition()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleSocketInterceptorConfig File: hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
handleSocketInterceptorConfig
hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void startRoamToNetwork(int networkId, String bssid) { sendMessage(CMD_START_ROAM, networkId, 0, bssid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startRoamToNetwork 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
startRoamToNetwork
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private UserReferenceSerializer<DocumentReference> getUserReferenceDocumentReferenceSerializer() { return Utils.getComponent(UserReferenceSerializer.TYPE_DOCUMENT_REFERENCE, "document"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserReferenceDocumentReferenceSerializer 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-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getUserReferenceDocumentReferenceSerializer
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
public boolean isTriviallySigned() { return getTotalJarEntries(jarSignableEntries) <= 0 && certs.size() <= 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isTriviallySigned File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
isTriviallySigned
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
0
Analyze the following code function for security vulnerabilities
protected final void loadMoreGuaranteed() throws IOException { if (!loadMore()) { _reportInvalidEOF(); } }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2020-28491 - Severity: MEDIUM - CVSS Score: 5.0 Description: Fix eager allocation aspect of #186 Function: loadMoreGuaranteed File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary Fixed Code: protected void loadMoreGuaranteed() throws IOException { if (!loadMore()) { _reportInvalidEOF(); } }
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
loadMoreGuaranteed
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
1
Analyze the following code function for security vulnerabilities
public String getAbsolutePath() { return internal.getAbsolutePath(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAbsolutePath File: src/net/sourceforge/plantuml/security/SFile.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
getAbsolutePath
src/net/sourceforge/plantuml/security/SFile.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public boolean addNewContents(boolean isDialog, boolean isUserGesture) { return mContentsClient.onCreateWindow(isDialog, isUserGesture); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addNewContents File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
addNewContents
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public boolean isAncestorOfAny(final DomNode... nodes) { for (final DomNode node : nodes) { if (isAncestorOf(node)) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAncestorOfAny File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
isAncestorOfAny
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
public boolean isProfileOwnerApp(String packageName) { throwIfParentInstance("isProfileOwnerApp"); if (mService != null) { try { ComponentName profileOwner = mService.getProfileOwnerAsUser(myUserId()); return profileOwner != null && profileOwner.getPackageName().equals(packageName); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProfileOwnerApp 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
isProfileOwnerApp
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public String addMandatory() { return this.xwiki.addMandatory(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addMandatory File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
addMandatory
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
@Deprecated public boolean isCreator(String username) { if (username.equals(XWikiRightService.GUEST_USER_FULLNAME)) { return false; } return username.equals(getCreator()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCreator 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
isCreator
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
private void notifyStrongAuthStateChanged(int userId) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onStrongAuthStateChanged(userId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyStrongAuthStateChanged File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
notifyStrongAuthStateChanged
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public Page<E> setPages(int pages) { this.pages = pages; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPages File: src/main/java/com/github/pagehelper/Page.java Repository: pagehelper/Mybatis-PageHelper The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-28111
HIGH
7.5
pagehelper/Mybatis-PageHelper
setPages
src/main/java/com/github/pagehelper/Page.java
554a524af2d2b30d09505516adc412468a84d8fa
0
Analyze the following code function for security vulnerabilities
public static final boolean isIsolated(int uid) { uid = UserHandle.getAppId(uid); return uid >= FIRST_ISOLATED_UID && uid <= LAST_ISOLATED_UID; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isIsolated File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
isIsolated
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == PROXY_ACTIVITY_REQUEST_CODE) { setResult(resultCode, data); finishAfterTransition(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onActivityResult File: PermissionController/src/com/android/permissioncontroller/permission/ui/ManagePermissionsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21132
MEDIUM
6.8
android
onActivityResult
PermissionController/src/com/android/permissioncontroller/permission/ui/ManagePermissionsActivity.java
0679e4f35055729be7276536fe45fe8ec18a0453
0