instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public void performIdleMaintenance() throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: performIdleMaintenance File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
performIdleMaintenance
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected int setPageContent(String wikiName, List<String> spaceName, String pageName, String content) throws Exception { String uri = buildURI(PageResource.class, wikiName, spaceName, pageName).toString(); PutMethod putMethod = executePut(uri, content, javax.ws.rs.core.MediaType.TEXT_PLAIN, TestUtils.SUPER_ADMIN_CREDENTIALS.getUserName(), TestUtils.SUPER_ADMIN_CREDENTIALS.getPassword()); int code = putMethod.getStatusCode(); Assert.assertTrue(String.format("Failed to set page content, %s", getHttpMethodInfo(putMethod)), code == HttpStatus.SC_ACCEPTED || code == HttpStatus.SC_CREATED); return code; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPageContent File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
setPageContent
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
public static String substitutePerl(String content, String searchString, String replaceItem, String occurences) { String translationRule = "s#" + searchString + "#" + replaceItem + "#" + occurences; Perl5Util perlUtil = new Perl5Util(); try { return perlUtil.substitute(translationRule, content); } catch (MalformedPerl5PatternException e) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_MALFORMED_TRANSLATION_RULE_1, translationRule), e); } } return content; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: substitutePerl 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
substitutePerl
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
private void processPackageDependencies(PackageDependenciesType xmlPackageDependenciesType, PackageType xmlPackage, PluginPackages pluginPackageEntity) { if (xmlPackageDependenciesType == null) { log.info("There is not package dependency defined."); return; } List<PackageDependencyType> xmlPackageDependencyList = xmlPackageDependenciesType.getPackageDependency(); if (xmlPackageDependencyList == null || xmlPackageDependencyList.isEmpty()) { return; } for (PackageDependencyType xmlDependency : xmlPackageDependencyList) { PluginPackageDependencies dependencyEntity = new PluginPackageDependencies(); dependencyEntity.setId(LocalIdGenerator.generateId()); dependencyEntity.setPluginPackageId(pluginPackageEntity.getId()); dependencyEntity.setDependencyPackageName(xmlDependency.getName()); dependencyEntity.setDependencyPackageVersion(xmlDependency.getVersion()); dependencyEntity.setPluginPackage(pluginPackageEntity); pluginPackageDependenciesMapper.insert(dependencyEntity); pluginPackageEntity.getPluginPackageDependencies().add(dependencyEntity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processPackageDependencies File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java Repository: WeBankPartners/wecube-platform The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-45746
MEDIUM
5
WeBankPartners/wecube-platform
processPackageDependencies
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
1164dae43c505f8a0233cc049b2689d6ca6d0c37
0
Analyze the following code function for security vulnerabilities
public BaseObject newXObject(EntityReference classReference, XWikiContext context) throws XWikiException { int nb = createXObject(classReference, context); return getXObject(resolveClassReference(classReference), nb); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newXObject 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
newXObject
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
boolean fillsDisplay() { final DisplayInfo displayInfo = getDisplayInfo(); return mWindowFrames.mFrame.left <= 0 && mWindowFrames.mFrame.top <= 0 && mWindowFrames.mFrame.right >= displayInfo.appWidth && mWindowFrames.mFrame.bottom >= displayInfo.appHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillsDisplay 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
fillsDisplay
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public static boolean jsFunction_isUserExists(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException, org.wso2.carbon.user.api.UserStoreException { if (args == null || args.length == 0) { handleException("Invalid input parameters to the isUserExists method"); } String username = (String) args[0]; String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(username)); UserRegistrationConfigDTO signupConfig = SelfSignUpUtil.getSignupConfiguration(tenantDomain); //add user storage info username = SelfSignUpUtil.getDomainSpecificUserName(username, signupConfig ); String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(username); boolean exists = false; try { RealmService realmService = ServiceReferenceHolder.getInstance().getRealmService(); //UserRealm realm = realmService.getBootstrapRealm(); int tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager() .getTenantId(tenantDomain); UserRealm realm = (UserRealm) realmService.getTenantUserRealm(tenantId); UserStoreManager manager = realm.getUserStoreManager(); if (manager.isExistingUser(tenantAwareUserName)) { exists = true; } } catch (UserStoreException e) { handleException("Error while checking user existence for " + username, e); } return exists; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_isUserExists File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_isUserExists
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
public static String getAttributeValue(Node node, String attributeName) { try { return node.getAttributes().getNamedItem(attributeName).getNodeValue(); } catch (Exception e) { } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributeValue File: src/edu/stanford/nlp/ie/machinereading/common/DomReader.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3878
HIGH
7.5
stanfordnlp/CoreNLP
getAttributeValue
src/edu/stanford/nlp/ie/machinereading/common/DomReader.java
e5bbe135a02a74b952396751ed3015e8b8252e99
0
Analyze the following code function for security vulnerabilities
public abstract int getLineCount();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLineCount File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getLineCount
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
private Column appendColumn(Object datasourcePropertyId) { if (datasourcePropertyId == null) { throw new IllegalArgumentException("Property id cannot be null"); } assert datasource.getContainerPropertyIds().contains( datasourcePropertyId) : "Datasource should contain the property id"; GridColumnState columnState = new GridColumnState(); columnState.id = columnKeys.key(datasourcePropertyId); Column column = new Column(this, columnState, datasourcePropertyId); columns.put(datasourcePropertyId, column); getState().columns.add(columnState); getState().columnOrder.add(columnState.id); header.addColumn(datasourcePropertyId); footer.addColumn(datasourcePropertyId); String humanFriendlyPropertyId = SharedUtil.propertyIdToHumanFriendly( String.valueOf(datasourcePropertyId)); column.setHeaderCaption(humanFriendlyPropertyId); if (datasource instanceof Sortable && ((Sortable) datasource).getSortableContainerPropertyIds() .contains(datasourcePropertyId)) { column.setSortable(true); } return column; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendColumn 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
appendColumn
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public void handle(HttpServletRequest request, HttpServletResponse response) throws Exception { // We're sending an XML response, so set the response content type to text/xml response.setContentType("text/xml"); // Parse the incoming request as XML SAXReader xmlReader = new SAXReader(); Document doc = xmlReader.read(request.getInputStream()); Element env = doc.getRootElement(); Element body = env.element("body"); // First handle any new subscriptions List<SubscriptionRequest> requests = new ArrayList<SubscriptionRequest>(); List<Element> elements = body.elements("subscribe"); for (Element e : elements) { requests.add(new SubscriptionRequest(e.attributeValue("topic"))); } ServletLifecycle.beginRequest(request); try { ServletContexts.instance().setRequest(request); Manager.instance().initializeTemporaryConversation(); ServletLifecycle.resumeConversation(request); for (SubscriptionRequest req : requests) { req.subscribe(); } // Then handle any unsubscriptions List<String> unsubscribeTokens = new ArrayList<String>(); elements = body.elements("unsubscribe"); for (Element e : elements) { unsubscribeTokens.add(e.attributeValue("token")); } for (String token : unsubscribeTokens) { RemoteSubscriber subscriber = SubscriptionRegistry.instance(). getSubscription(token); if (subscriber != null) { subscriber.unsubscribe(); } } } finally { Lifecycle.endRequest(); } // Package up the response marshalResponse(requests, response.getOutputStream()); }
Vulnerability Classification: - CWE: CWE-264, CWE-200 - CVE: CVE-2013-6447 - Severity: MEDIUM - CVSS Score: 5.0 Description: https://issues.jboss.org/browse/WFK2-375 enhanced fix git-svn-id: https://svn.jboss.org/repos/seam/branches/enterprise/WFK-2_1@15651 a9c07ecc-ef43-0410-a306-c911db474e88 Function: handle File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/SubscriptionHandler.java Repository: seam2/jboss-seam Fixed Code: public void handle(HttpServletRequest request, HttpServletResponse response) throws Exception { // We're sending an XML response, so set the response content type to text/xml response.setContentType("text/xml"); // Parse the incoming request as XML SAXReader xmlReader = XML.getSafeSaxReader(); Document doc = xmlReader.read(request.getInputStream()); Element env = doc.getRootElement(); Element body = env.element("body"); // First handle any new subscriptions List<SubscriptionRequest> requests = new ArrayList<SubscriptionRequest>(); List<Element> elements = body.elements("subscribe"); for (Element e : elements) { requests.add(new SubscriptionRequest(e.attributeValue("topic"))); } ServletLifecycle.beginRequest(request); try { ServletContexts.instance().setRequest(request); Manager.instance().initializeTemporaryConversation(); ServletLifecycle.resumeConversation(request); for (SubscriptionRequest req : requests) { req.subscribe(); } // Then handle any unsubscriptions List<String> unsubscribeTokens = new ArrayList<String>(); elements = body.elements("unsubscribe"); for (Element e : elements) { unsubscribeTokens.add(e.attributeValue("token")); } for (String token : unsubscribeTokens) { RemoteSubscriber subscriber = SubscriptionRegistry.instance(). getSubscription(token); if (subscriber != null) { subscriber.unsubscribe(); } } } finally { Lifecycle.endRequest(); } // Package up the response marshalResponse(requests, response.getOutputStream()); }
[ "CWE-264", "CWE-200" ]
CVE-2013-6447
MEDIUM
5
seam2/jboss-seam
handle
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/SubscriptionHandler.java
090aa6252affc978a96c388e3fc2c1c2688d9bb5
1
Analyze the following code function for security vulnerabilities
public void setUser(@Nullable String user) { this.user = user; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUser File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setUser
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public static String toString(final Object object, final String tagName, final XMLParserConfiguration config) throws JSONException { return toString(object, tagName, config, 0, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/main/java/org/json/XML.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2022-45688
HIGH
7.5
stleary/JSON-java
toString
src/main/java/org/json/XML.java
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
0
Analyze the following code function for security vulnerabilities
@Override public ParceledListSlice<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum, int flags, int userId) { final int callingUid = Binder.getCallingUid(); userId = handleIncomingUser(Binder.getCallingPid(), callingUid, userId, "getRecentTasks"); final boolean allowed = isGetTasksAllowed("getRecentTasks", Binder.getCallingPid(), callingUid); synchronized (mGlobalLock) { return mRecentTasks.getRecentTasks(maxNum, flags, allowed, userId, callingUid); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRecentTasks 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
getRecentTasks
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public boolean isSlackAuthEnabled() { return CONF.slackAuthEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSlackAuthEnabled 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
isSlackAuthEnabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
ActiveAdmin getActiveAdminForCallerLocked(@Nullable ComponentName who, int reqPolicy, boolean parent) throws SecurityException { return getActiveAdminOrCheckPermissionForCallerLocked( who, reqPolicy, parent, /* permission= */ null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveAdminForCallerLocked 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
getActiveAdminForCallerLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static String readTag(Reader r) throws IOException { if ( ! r.ready()) { return null; } StringBuilder b = new StringBuilder("<"); int c = r.read(); while (c >= 0) { b.append((char) c); if (c == '>') { break; } c = r.read(); } if (b.length() == 1) { return null; } return b.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readTag File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
readTag
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
@Override public int getDeviceOwnerUserId() { return DevicePolicyManagerService.this.getDeviceOwnerUserId(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceOwnerUserId 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
getDeviceOwnerUserId
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override boolean needsZBoost() { return mNeedsZBoost || super.needsZBoost(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: needsZBoost 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
needsZBoost
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void setTriggering(ServiceRequest service) { SetTriggeringRequest request = (SetTriggeringRequest) service.getRequest(); UInteger subscriptionId = request.getSubscriptionId(); Subscription subscription = subscriptions.get(subscriptionId); if (subscription == null) { service.setServiceFault(StatusCodes.Bad_SubscriptionIdInvalid); return; } UInteger triggerId = request.getTriggeringItemId(); List<UInteger> linksToAdd = l(request.getLinksToAdd()); List<UInteger> linksToRemove = l(request.getLinksToRemove()); if (linksToAdd.isEmpty() && linksToRemove.isEmpty()) { service.setServiceFault(StatusCodes.Bad_NothingToDo); return; } StatusCode[] addResults; StatusCode[] removeResults; synchronized (subscription) { Map<UInteger, BaseMonitoredItem<?>> itemsById = subscription.getMonitoredItems(); BaseMonitoredItem<?> triggerItem = itemsById.get(triggerId); if (triggerItem == null) { service.setServiceFault(StatusCodes.Bad_MonitoredItemIdInvalid); return; } removeResults = linksToRemove.stream() .map(linkedItemId -> { BaseMonitoredItem<?> item = itemsById.get(linkedItemId); if (item != null) { if (triggerItem.getTriggeredItems().remove(linkedItemId) != null) { return StatusCode.GOOD; } else { return new StatusCode(StatusCodes.Bad_MonitoredItemIdInvalid); } } else { return new StatusCode(StatusCodes.Bad_MonitoredItemIdInvalid); } }) .toArray(StatusCode[]::new); addResults = linksToAdd.stream() .map(linkedItemId -> { BaseMonitoredItem<?> linkedItem = itemsById.get(linkedItemId); if (linkedItem != null) { triggerItem.getTriggeredItems().put(linkedItemId, linkedItem); return StatusCode.GOOD; } else { return new StatusCode(StatusCodes.Bad_MonitoredItemIdInvalid); } }) .toArray(StatusCode[]::new); } SetTriggeringResponse response = new SetTriggeringResponse( service.createResponseHeader(), addResults, new DiagnosticInfo[0], removeResults, new DiagnosticInfo[0] ); service.setResponse(response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTriggering 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
setTriggering
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
boolean isActivityStartsLoggingEnabled() { return mAmInternal.isActivityStartsLoggingEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isActivityStartsLoggingEnabled 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
isActivityStartsLoggingEnabled
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void stop() { if (atomicHandler.get() == null) { return; } if (reuseDevServer) { return; } try { // The most reliable way to stop the webpack-dev-server is // by informing webpack to exit. We have implemented in webpack a // a listener that handles the stop command via HTTP and exits. prepareConnection("/stop", "GET").getResponseCode(); } catch (IOException e) { getLogger().debug( "webpack-dev-server does not support the `/stop` command.", e); } DevServerWatchDog watchDogInstance = watchDog.get(); if (watchDogInstance != null) { watchDogInstance.stop(); } Process process = webpackProcess.get(); if (process != null && process.isAlive()) { process.destroy(); } atomicHandler.set(null); removeRunningDevServerPort(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stop File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-172" ]
CVE-2021-33604
LOW
1.2
vaadin/flow
stop
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
0
Analyze the following code function for security vulnerabilities
public void clearSslPreferences() { if (mNativeContentViewCore != 0) nativeClearSslPreferences(mNativeContentViewCore); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearSslPreferences 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
clearSslPreferences
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public Integer preferredPageSize() { ensureSearchEntityLoaded(); return mySearchEntity.getPreferredPageSize(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: preferredPageSize File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
preferredPageSize
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
private void migrate78(File dataDir, Stack<Integer> versions) { Map<String, Integer> issueCommentCounts = new HashMap<>(); Map<String, Integer> pullRequestCommentCounts = new HashMap<>(); for (File file: dataDir.listFiles()) { if (file.getName().startsWith("IssueComments.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { String issueId = element.elementTextTrim("issue"); Integer commentCount = issueCommentCounts.get(issueId); if (commentCount == null) commentCount = 0; commentCount++; issueCommentCounts.put(issueId, commentCount); } } else if (file.getName().startsWith("PullRequestComments.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { String pullRequestId = element.elementTextTrim("request"); Integer commentCount = pullRequestCommentCounts.get(pullRequestId); if (commentCount == null) commentCount = 0; commentCount++; pullRequestCommentCounts.put(pullRequestId, commentCount); } } } for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Issues.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { Integer commentCount = issueCommentCounts.get(element.elementTextTrim("id")); if (commentCount == null) commentCount = 0; element.element("commentCount").setText(String.valueOf(commentCount)); } dom.writeToFile(file, false); } else if (file.getName().startsWith("PullRequests.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { Integer commentCount = pullRequestCommentCounts.get(element.elementTextTrim("id")); if (commentCount == null) commentCount = 0; element.element("commentCount").setText(String.valueOf(commentCount)); } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate78 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrate78
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
@Override public void onApplicationActive(String packageName, int userId) { if (DEBUG) { Slog.d(TAG, "onApplicationActive: package=" + packageName + " userid=" + userId); } enforceResetThrottlingPermission(); synchronized (mLock) { if (!isUserUnlockedL(userId)) { // This is called by system UI, so no need to throw. Just ignore. return; } getPackageShortcutsLocked(packageName, userId) .resetRateLimitingForCommandLineNoSaving(); } saveUser(userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onApplicationActive 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
onApplicationActive
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public JSONObject put(String key, Map<?, ?> value) throws JSONException { return this.put(key, new JSONObject(value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
put
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public boolean receiveFocusFromTapOutside() { return canReceiveKeys(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: receiveFocusFromTapOutside 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
receiveFocusFromTapOutside
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private void addError(Issue msg, Object... parameters) { mErrors.add(new IssueWithParams(msg, parameters)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addError File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
addError
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
private static native @Nullable Configuration[] nativeGetSizeAndUiModeConfigurations(long ptr);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetSizeAndUiModeConfigurations File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeGetSizeAndUiModeConfigurations
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public void setDialerAppPackagesProvider(PackagesProvider provider) { synchronized (mPackages) { mDefaultPermissionPolicy.setDialerAppPackagesProviderLPw(provider); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDialerAppPackagesProvider 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
setDialerAppPackagesProvider
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public String displayForm(String className) { return this.doc.displayForm(className, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: displayForm 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
displayForm
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
@Override protected AbstractChainingPrintRenderer getSyntaxRenderer() { return new AnnotatedXHTMLChainingRenderer(this.linkRenderer, this.imageRenderer, getListenerChain()); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-32070 - Severity: MEDIUM - CVSS Score: 6.1 Description: XRENDERING-663: Restrict allowed attributes in HTML rendering * Change HTML renderers to only print allowed attributes and elements. * Add prefix to forbidden attributes to preserve them in XWiki syntax. * Adapt tests to expect that invalid attributes get a prefix. Function: getSyntaxRenderer File: xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/renderers/annotatedxhtml/HTMLMacroAnnotatedXHTMLRenderer.java Repository: xwiki/xwiki-rendering Fixed Code: @Override protected AbstractChainingPrintRenderer getSyntaxRenderer() { return new AnnotatedXHTMLChainingRenderer(this.linkRenderer, this.imageRenderer, this.htmlElementSanitizer, getListenerChain()); }
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
getSyntaxRenderer
xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/renderers/annotatedxhtml/HTMLMacroAnnotatedXHTMLRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
1
Analyze the following code function for security vulnerabilities
private void setSessionTimeout() { final PortalRequest portalRequest = this.portalRequestSupplier.get(); if ( portalRequest != null ) { final HttpSession httpSession = portalRequest.getRawRequest().getSession(); if ( httpSession != null ) { httpSession.setMaxInactiveInterval( this.sessionTimeout ); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSessionTimeout File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp The code follows secure coding practices.
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
setSessionTimeout
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
0189975691e9e6407a9fee87006f730e84f734ff
0
Analyze the following code function for security vulnerabilities
@Override public void addListener(@NonNull ShortcutChangeListener listener) { synchronized (mLock) { mListeners.add(Objects.requireNonNull(listener)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addListener 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
addListener
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Transactional(readOnly = true) public FacetPageHandler facetQuery(boolean projection, boolean fuzzy, Short siteId, String text, String[] fields, Long[] tagIds, Integer[] categoryIds, String[] modelIds, String[] dictionaryValues, Date startPublishDate, Date endPublishDate, Date expiryDate, String orderField, Integer pageIndex, Integer pageSize) { return dao.facetQuery(projection, fuzzy, siteId, categoryIds, modelIds, text, fields, arrayToDelimitedString(tagIds, CommonConstants.BLANK_SPACE), dictionaryValues, startPublishDate, endPublishDate, expiryDate, orderField, pageIndex, pageSize); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: facetQuery File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
facetQuery
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override boolean useBLASTSync() { return super.useBLASTSync() || (mDrawHandlers.size() != 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useBLASTSync 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
useBLASTSync
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public void setIp(String ip) { this.ip = ip; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIp File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
setIp
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override public void setKeyguardDisabledFeatures(ComponentName who, int which, boolean parent) { if (!mHasFeature) { return; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); final int userHandle = caller.getUserId(); synchronized (getLockObject()) { ActiveAdmin ap = getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES, parent); if (isManagedProfile(userHandle)) { if (parent) { if (isProfileOwnerOfOrganizationOwnedDevice(caller)) { which = which & PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER; } else { which = which & NON_ORG_OWNED_PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER; } } else { which = which & PROFILE_KEYGUARD_FEATURES; } } if (ap.disabledKeyguardFeatures != which) { ap.disabledKeyguardFeatures = which; saveSettingsLocked(userHandle); } } if (SecurityLog.isLoggingEnabled()) { final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle; SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISABLED_FEATURES_SET, who.getPackageName(), userHandle, affectedUserId, which); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_KEYGUARD_DISABLED_FEATURES) .setAdmin(caller.getComponentName()) .setInt(which) .setStrings(parent ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setKeyguardDisabledFeatures 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
setKeyguardDisabledFeatures
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting void waitForBitmapSavesForTest() { synchronized (mLock) { forEachLoadedUserLocked(u -> u.forAllPackageItems(ShortcutPackageItem::waitForBitmapSaves)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: waitForBitmapSavesForTest 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
waitForBitmapSavesForTest
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public final void setEncryptedPassword(String encryptedPassword) { this.encryptedPassword = encryptedPassword; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEncryptedPassword File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
setEncryptedPassword
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override public boolean requestVenueUrlAnqp(String bssid) { return mWifiNative.requestVenueUrlAnqp(mInterfaceName, bssid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestVenueUrlAnqp 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
requestVenueUrlAnqp
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public boolean nodeRenderInline(int depth) { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nodeRenderInline File: java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java Repository: spacewalkproject/spacewalk The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
nodeRenderInline
java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
7b9ff9ad
0
Analyze the following code function for security vulnerabilities
public void setNavigationHelper(NavigationHelper navigationHelper) { this.navigationHelper = navigationHelper; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNavigationHelper 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
setNavigationHelper
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
public JSONObject error(String msg) { JSONObject errorInfo = new JSONObject(); try { errorInfo.put("Error", msg); errorInfo.put("Code", "-1"); errorInfo.put("Properties", this.properties); } catch (JSONException e) { this.error("JSONObject error"); } this.error = errorInfo; return error; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: error File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java Repository: jflyfox/jfinal_cms The code follows secure coding practices.
[ "CWE-74" ]
CVE-2021-37262
MEDIUM
5
jflyfox/jfinal_cms
error
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
e7fd0fe9362464c4d2bd308318eecc89a847b116
0
Analyze the following code function for security vulnerabilities
public void broadcastTransitionDisableEvent( String iface, int networkId, @TransitionDisableIndication int indicationBits) { sendMessage(iface, TRANSITION_DISABLE_INDICATION, networkId, indicationBits); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastTransitionDisableEvent File: service/java/com/android/server/wifi/WifiMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
broadcastTransitionDisableEvent
service/java/com/android/server/wifi/WifiMonitor.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting boolean updateConfigurationLocked(String config) { boolean result = true; final KeyValueListParser parser = new KeyValueListParser(','); try { parser.setString(config); } catch (IllegalArgumentException e) { // Failed to parse the settings string, log this and move on // with defaults. Slog.e(TAG, "Bad shortcut manager settings", e); result = false; } mSaveDelayMillis = Math.max(0, (int) parser.getLong(ConfigConstants.KEY_SAVE_DELAY_MILLIS, DEFAULT_SAVE_DELAY_MS)); mResetInterval = Math.max(1, parser.getLong( ConfigConstants.KEY_RESET_INTERVAL_SEC, DEFAULT_RESET_INTERVAL_SEC) * 1000L); mMaxUpdatesPerInterval = Math.max(0, (int) parser.getLong( ConfigConstants.KEY_MAX_UPDATES_PER_INTERVAL, DEFAULT_MAX_UPDATES_PER_INTERVAL)); mMaxShortcuts = Math.max(0, (int) parser.getLong( ConfigConstants.KEY_MAX_SHORTCUTS, DEFAULT_MAX_SHORTCUTS_PER_ACTIVITY)); mMaxShortcutsPerApp = Math.max(0, (int) parser.getLong( ConfigConstants.KEY_MAX_SHORTCUTS_PER_APP, DEFAULT_MAX_SHORTCUTS_PER_APP)); final int iconDimensionDp = Math.max(1, injectIsLowRamDevice() ? (int) parser.getLong( ConfigConstants.KEY_MAX_ICON_DIMENSION_DP_LOWRAM, DEFAULT_MAX_ICON_DIMENSION_LOWRAM_DP) : (int) parser.getLong( ConfigConstants.KEY_MAX_ICON_DIMENSION_DP, DEFAULT_MAX_ICON_DIMENSION_DP)); mMaxIconDimension = injectDipToPixel(iconDimensionDp); mIconPersistFormat = CompressFormat.valueOf( parser.getString(ConfigConstants.KEY_ICON_FORMAT, DEFAULT_ICON_PERSIST_FORMAT)); mIconPersistQuality = (int) parser.getLong( ConfigConstants.KEY_ICON_QUALITY, DEFAULT_ICON_PERSIST_QUALITY); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateConfigurationLocked 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
updateConfigurationLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
protected OrganizationController getOrganizationController() { return organizationController; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationController File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
getOrganizationController
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
@Override public boolean isConnecting() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isConnecting 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
isConnecting
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private void queueNextSignalStrengthPoll() { if (mDontPollSignalStrength) { // The radio is telling us about signal strength changes // we don't have to ask it return; } Message msg; msg = obtainMessage(); msg.what = EVENT_POLL_SIGNAL_STRENGTH; long nextTime; // TODO Don't poll signal strength if screen is off sendMessageDelayed(msg, POLL_PERIOD_MILLIS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: queueNextSignalStrengthPoll File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
queueNextSignalStrengthPoll
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
protected void insertIssuesWithoutContext(String id, IssuesUpdateRequest issuesRequest) { IssuesWithBLOBs issues = new IssuesWithBLOBs(); issues.setId(id); issues.setPlatform(issuesRequest.getPlatform()); issues.setProjectId(issuesRequest.getProjectId()); issues.setCustomFields(issuesRequest.getCustomFields()); issues.setCreator(issuesRequest.getCreator()); issues.setCreateTime(System.currentTimeMillis()); issues.setUpdateTime(System.currentTimeMillis()); issues.setNum(getNextNum(issuesRequest.getProjectId())); issues.setResourceId(issuesRequest.getResourceId()); issuesMapper.insert(issues); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insertIssuesWithoutContext File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
insertIssuesWithoutContext
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private boolean isGetTasksAllowed(String caller, int callingPid, int callingUid) { boolean allowed = checkPermission(android.Manifest.permission.REAL_GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED; if (!allowed) { if (checkPermission(android.Manifest.permission.GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED) { // Temporary compatibility: some existing apps on the system image may // still be requesting the old permission and not switched to the new // one; if so, we'll still allow them full access. This means we need // to see if they are holding the old permission and are a system app. try { if (AppGlobals.getPackageManager().isUidPrivileged(callingUid)) { allowed = true; Slog.w(TAG, caller + ": caller " + callingUid + " is using old GET_TASKS but privileged; allowing"); } } catch (RemoteException e) { } } } if (!allowed) { Slog.w(TAG, caller + ": caller " + callingUid + " does not hold GET_TASKS; limiting output"); } return allowed; }
Vulnerability Classification: - CWE: CWE-284 - CVE: CVE-2015-3833 - Severity: MEDIUM - CVSS Score: 4.3 Description: Lockdown AM.getRunningAppProcesses API with permission.REAL_GET_TASKS * Applications must now have ...permission.REAL_GET_TASKS to be able to get process information for all applications. * Only the process information for the calling application will be returned if the app doesn't have the permission. * Privilages apps will temporarily be able to get process information for all applications if they don't have the new permission, but have deprecated ...permission.GET_TASKS. Bug: 20034603 Change-Id: I67ae9491f65d2280adb6a81593693d499714a216 (cherry picked from commit 9dbaa54f6834e013a63f18bd51ace554de811d80) Function: isGetTasksAllowed File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android Fixed Code: private boolean isGetTasksAllowed(String caller, int callingPid, int callingUid) { boolean allowed = checkPermission(android.Manifest.permission.REAL_GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED; if (!allowed) { if (checkPermission(android.Manifest.permission.GET_TASKS, callingPid, callingUid) == PackageManager.PERMISSION_GRANTED) { // Temporary compatibility: some existing apps on the system image may // still be requesting the old permission and not switched to the new // one; if so, we'll still allow them full access. This means we need // to see if they are holding the old permission and are a system app. try { if (AppGlobals.getPackageManager().isUidPrivileged(callingUid)) { allowed = true; Slog.w(TAG, caller + ": caller " + callingUid + " is using old GET_TASKS but privileged; allowing"); } } catch (RemoteException e) { } } } if (!allowed) { Slog.w(TAG, caller + ": caller " + callingUid + " does not hold REAL_GET_TASKS; limiting output"); } return allowed; }
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
isGetTasksAllowed
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
1
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") private HashMap<String, Object> loadCachedJson(final HttpQuery query, final long end_time, final long max_age, final String basepath) throws JsonParseException, JsonMappingException, IOException { final String json_path = basepath + ".json"; File json_cache = new File(json_path); if (staleCacheFile(query, end_time, max_age, json_cache)) { return null; } final byte[] json = readFile(query, json_cache, 4096); if (json == null) { return null; } json_cache = null; return (HashMap<String, Object>) JSON.parseToObject(json, HashMap.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadCachedJson File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2023-25826
CRITICAL
9.8
OpenTSDB/opentsdb
loadCachedJson
src/tsd/GraphHandler.java
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
0
Analyze the following code function for security vulnerabilities
private void logError(Throwable e) { logger.error("Failed to upload a file.", e); }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2014-8114 - Severity: MEDIUM - CVSS Score: 6.8 Description: BZ(1169544,1169556, 1169557,1169559,1169560): improvements on security related to file access Function: logError File: uberfire-server/src/main/java/org/uberfire/server/FileUploadServlet.java Repository: AppFormer/uberfire Fixed Code: private void logError( Throwable e ) { logger.error( "Failed to upload a file.", e ); }
[ "CWE-264" ]
CVE-2014-8114
MEDIUM
6.8
AppFormer/uberfire
logError
uberfire-server/src/main/java/org/uberfire/server/FileUploadServlet.java
21ec50eb15
1
Analyze the following code function for security vulnerabilities
private static boolean hadSavedInstanceStateMessage(final Bundle savedInstanceState) { return savedInstanceState != null && savedInstanceState.containsKey(EXTRA_MESSAGE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hadSavedInstanceStateMessage File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
hadSavedInstanceStateMessage
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public final JsonFactory getJsonFactory() { return jsonFactory; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJsonFactory File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java Repository: googleapis/google-oauth-java-client The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-7692
MEDIUM
6.4
googleapis/google-oauth-java-client
getJsonFactory
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
13433cd7dd06267fc261f0b1d4764f8e3432c824
0
Analyze the following code function for security vulnerabilities
void setRecentsScreenshotEnabled(boolean enabled) { mEnableRecentsScreenshot = enabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRecentsScreenshotEnabled 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
setRecentsScreenshotEnabled
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public void sendStanza(Stanza stanza) throws NotConnectedException, InterruptedException { Objects.requireNonNull(stanza, "Stanza must not be null"); assert(stanza instanceof Message || stanza instanceof Presence || stanza instanceof IQ); throwNotConnectedExceptionIfAppropriate(); switch (fromMode) { case OMITTED: stanza.setFrom((Jid) null); break; case USER: stanza.setFrom(getUser()); break; case UNCHANGED: default: break; } // Invoke interceptors for the new stanza that is about to be sent. Interceptors may modify // the content of the stanza. firePacketInterceptors(stanza); sendStanzaInternal(stanza); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendStanza File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
sendStanza
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
void removeCall(String callId, DisconnectCause disconnectCause) { CreateConnectionResponse response = mPendingResponses.remove(callId); if (response != null) { response.handleCreateConnectionFailure(disconnectCause); } mCallIdMapper.removeCall(callId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeCall File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
removeCall
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public void addCometListener(CometListener listener) { _cometListeners.add(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addCometListener File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
addCometListener
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
private boolean hasQueryParameters(RoutingContext ctx) { return hasQueryParameter(ctx, QUERY) || hasQueryParameter(ctx, OPERATION_NAME) || hasQueryParameter(ctx, VARIABLES) || hasQueryParameter(ctx, EXTENSIONS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasQueryParameters File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java Repository: quarkusio/quarkus The code follows secure coding practices.
[ "CWE-444" ]
CVE-2022-2466
CRITICAL
9.8
quarkusio/quarkus
hasQueryParameters
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
08e5c3106ce4bfb18b24a38514eeba6464668b07
0
Analyze the following code function for security vulnerabilities
public static boolean jsFunction_updateApplicationTier(Context cx,Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException { if (args != null && isStringArray(args)) { String name = (String) args[0]; String tier = (String) args[1]; String username = (String) args[2]; Subscriber subscriber = new Subscriber(username); APIConsumer apiConsumer = getAPIConsumer(thisObj); Application[] apps = apiConsumer.getApplications(subscriber, null); if (apps == null || apps.length == 0) { return false; } for (Application app : apps) { if (app.getName().equals(name)) { app.setTier(tier); apiConsumer.updateApplication(app); return true; } } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_updateApplicationTier File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_updateApplicationTier
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
ScanResult getCurrentScanResult() { WifiConfiguration config = getConnectedWifiConfigurationInternal(); if (config == null) { return null; } String bssid = mWifiInfo.getBSSID(); if (bssid == null) { bssid = mTargetBssid; } ScanDetailCache scanDetailCache = mWifiConfigManager.getScanDetailCacheForNetwork(config.networkId); if (scanDetailCache == null) { return null; } return scanDetailCache.getScanResult(bssid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentScanResult 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
getCurrentScanResult
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public void onShortPowerPressedGoHome() { // do nothing }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onShortPowerPressedGoHome File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
onShortPowerPressedGoHome
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
public JsonLocation getLastCharLocation() { return tokenizer.getLastCharLocation(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastCharLocation File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java Repository: eclipse-ee4j/parsson The code follows secure coding practices.
[ "CWE-834" ]
CVE-2023-4043
HIGH
7.5
eclipse-ee4j/parsson
getLastCharLocation
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
ab239fee273cb262910890f1a6fe666ae92cd623
0
Analyze the following code function for security vulnerabilities
private String getTemplate(BaseObject templateProvider, XWikiRequest request) { String result = ""; if (templateProvider != null) { result = templateProvider.getStringValue(TEMPLATE); } else if (request.getParameter(TEMPLATE) != null) { result = request.getParameter(TEMPLATE); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTemplate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2022-23617
MEDIUM
4
xwiki/xwiki-platform
getTemplate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
30c52b01559b8ef5ed1035dac7c34aaf805764d5
0
Analyze the following code function for security vulnerabilities
void processIncomingCallIntent(PhoneAccountHandle phoneAccountHandle, Bundle extras) { Log.d(this, "processIncomingCallIntent"); Uri handle = extras.getParcelable(TelephonyManager.EXTRA_INCOMING_NUMBER); Call call = new Call( mContext, mConnectionServiceRepository, handle, null /* gatewayInfo */, null /* connectionManagerPhoneAccount */, phoneAccountHandle, true /* isIncoming */, false /* isConference */); call.setExtras(extras); // TODO: Move this to be a part of addCall() call.addListener(this); call.startCreateConnection(mPhoneAccountRegistrar); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processIncomingCallIntent File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
processIncomingCallIntent
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
public String getFieldsString() { return "'{" + Joiner.on(", ").join(fieldHierarchy) +"}'"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFieldsString File: domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.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
getFieldsString
domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static RegionMetadata parse(final InputStream input) throws IOException { return new RegionMetadata(internalParse(input, false)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse File: aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java Repository: aws-amplify/aws-sdk-android The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-4725
CRITICAL
9.8
aws-amplify/aws-sdk-android
parse
aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java
c3e6d69422e1f0c80fe53f2d757b8df97619af2b
0
Analyze the following code function for security vulnerabilities
public static byte[] FlateDecode(byte in[]) { byte b[] = FlateDecode(in, true); if (b == null) return FlateDecode(in, false); return b; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: FlateDecode File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
FlateDecode
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element infoElement = toDOM(document); document.appendChild(infoElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: toXML File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki Fixed Code: public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element infoElement = toDOM(document); document.appendChild(infoElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toXML
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
@Override public boolean isRequestEnded() { return request.isEnded(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRequestEnded File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java Repository: quarkusio/quarkus The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-0981
MEDIUM
6.5
quarkusio/quarkus
isRequestEnded
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
96c64fd8f09c02a497e2db366c64dd9196582442
0
Analyze the following code function for security vulnerabilities
public static byte[] compress(byte[] input) throws IOException { return rawCompress(input, input.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compress File: src/main/java/org/xerial/snappy/Snappy.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-190" ]
CVE-2023-34454
HIGH
7.5
xerial/snappy-java
compress
src/main/java/org/xerial/snappy/Snappy.java
d0042551e4a3509a725038eb9b2ad1f683674d94
0
Analyze the following code function for security vulnerabilities
public static SAMLServiceManager.SOAPEntry getSourceSite(String issuer) { if (issuer == null) { return null; } Map entries = (Map) SAMLServiceManager.getAttribute( SAMLConstants.PARTNER_URLS); if (entries == null) { SAMLUtils.debug.error("SAMLUtils.isOnPartnerURLList: PartnerURL " + "list is null."); return null; } Iterator entryIter = entries.values().iterator(); boolean found = false; SAMLServiceManager.SOAPEntry srcSite = null; String theIssuer = null; while (entryIter.hasNext()) { srcSite = (SAMLServiceManager.SOAPEntry) entryIter.next(); if ((srcSite != null) && ((theIssuer = srcSite.getIssuer()) != null) && (theIssuer.equals(issuer))) { found = true; break; } } if (found) { return srcSite; } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSourceSite File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java Repository: OpenIdentityPlatform/OpenAM The code follows secure coding practices.
[ "CWE-287" ]
CVE-2023-37471
CRITICAL
9.8
OpenIdentityPlatform/OpenAM
getSourceSite
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
7c18543d126e8a567b83bb4535631825aaa9d742
0
Analyze the following code function for security vulnerabilities
private void add0(int h, int i, AsciiString name, String value) { // Update the hash table. entries[i] = new HeaderEntry(h, name, value, entries[i]); ++size; }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2019-16771 - Severity: MEDIUM - CVSS Score: 5.0 Description: Merge pull request from GHSA-35fr-h7jr-hh86 Motivation: An `HttpService` can produce a malformed HTTP response when a user specified a malformed HTTP header values, such as: ResponseHeaders.of(HttpStatus.OK "my-header", "foo\r\nbad-header: bar"); Modification: - Add strict header value validation to `HttpHeadersBase` - Add strict header name validation to `HttpHeaderNames.of()`, which is used by `HttpHeadersBase`. Result: - It is not possible anymore to send a bad header value which can be misused for sending additional headers or injecting arbitrary content. Function: add0 File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria Fixed Code: private void add0(int h, int i, AsciiString name, String value) { validateValue(value); // Update the hash table. entries[i] = new HeaderEntry(h, name, value, entries[i]); ++size; }
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
add0
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
1
Analyze the following code function for security vulnerabilities
private String getStartingFragmentClass(Intent intent) { if (mFragmentClass != null) return mFragmentClass; String intentClass = intent.getComponent().getClassName(); if (intentClass.equals(getClass().getName())) return null; if ("com.android.settings.RunningServices".equals(intentClass) || "com.android.settings.applications.StorageUse".equals(intentClass)) { // Old names of manage apps. intentClass = ManageApplications.class.getName(); } return intentClass; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStartingFragmentClass File: src/com/android/settings/SettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
getStartingFragmentClass
src/com/android/settings/SettingsActivity.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
@Override public CompletableFuture<?> loadNextBatch() throws IOException { if (backOffPolicy.hasNext()) { CompletableFuture<Void> cf = new CompletableFuture<>(); scheduler.schedule( (Runnable) () -> cf.complete(null), // cast to Runnable for enabling mockito tests backOffPolicy.next().millis(), TimeUnit.MILLISECONDS); return cf; } else { throw new IllegalStateException("All batches already loaded"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadNextBatch File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java Repository: crate The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
loadNextBatch
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
4e857d675683095945dd524d6ba03e692c70ecd6
0
Analyze the following code function for security vulnerabilities
private void readFromParcelImpl(Parcel parcel) { int version = parcel.readInt(); mAllowlistToken = parcel.readStrongBinder(); if (mAllowlistToken == null) { mAllowlistToken = processAllowlistToken; } // Propagate this token to all pending intents that are unmarshalled from the parcel. parcel.setClassCookie(PendingIntent.class, mAllowlistToken); when = parcel.readLong(); creationTime = parcel.readLong(); if (parcel.readInt() != 0) { mSmallIcon = Icon.CREATOR.createFromParcel(parcel); if (mSmallIcon.getType() == Icon.TYPE_RESOURCE) { icon = mSmallIcon.getResId(); } } number = parcel.readInt(); if (parcel.readInt() != 0) { contentIntent = PendingIntent.CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { deleteIntent = PendingIntent.CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { tickerText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { tickerView = RemoteViews.CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { contentView = RemoteViews.CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { mLargeIcon = Icon.CREATOR.createFromParcel(parcel); } defaults = parcel.readInt(); flags = parcel.readInt(); if (parcel.readInt() != 0) { sound = Uri.CREATOR.createFromParcel(parcel); } audioStreamType = parcel.readInt(); if (parcel.readInt() != 0) { audioAttributes = AudioAttributes.CREATOR.createFromParcel(parcel); } vibrate = parcel.createLongArray(); ledARGB = parcel.readInt(); ledOnMS = parcel.readInt(); ledOffMS = parcel.readInt(); iconLevel = parcel.readInt(); if (parcel.readInt() != 0) { fullScreenIntent = PendingIntent.CREATOR.createFromParcel(parcel); } priority = parcel.readInt(); category = parcel.readString8(); mGroupKey = parcel.readString8(); mSortKey = parcel.readString8(); extras = Bundle.setDefusable(parcel.readBundle(), true); // may be null fixDuplicateExtras(); actions = parcel.createTypedArray(Action.CREATOR); // may be null if (parcel.readInt() != 0) { bigContentView = RemoteViews.CREATOR.createFromParcel(parcel); } if (parcel.readInt() != 0) { headsUpContentView = RemoteViews.CREATOR.createFromParcel(parcel); } visibility = parcel.readInt(); if (parcel.readInt() != 0) { publicVersion = Notification.CREATOR.createFromParcel(parcel); } color = parcel.readInt(); if (parcel.readInt() != 0) { mChannelId = parcel.readString8(); } mTimeout = parcel.readLong(); if (parcel.readInt() != 0) { mShortcutId = parcel.readString8(); } if (parcel.readInt() != 0) { mLocusId = LocusId.CREATOR.createFromParcel(parcel); } mBadgeIcon = parcel.readInt(); if (parcel.readInt() != 0) { mSettingsText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel); } mGroupAlertBehavior = parcel.readInt(); if (parcel.readInt() != 0) { mBubbleMetadata = BubbleMetadata.CREATOR.createFromParcel(parcel); } mAllowSystemGeneratedContextualActions = parcel.readBoolean(); mFgsDeferBehavior = parcel.readInt(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFromParcelImpl File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
readFromParcelImpl
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Subscribe(threadMode = ThreadMode.BACKGROUND) public void onMessageEvent(WebSocketCommunicationEvent webSocketCommunicationEvent) { switch (webSocketCommunicationEvent.getType()) { case "hello": Log.d(TAG, "onMessageEvent 'hello'"); if (!webSocketCommunicationEvent.getHashMap().containsKey("oldResumeId")) { if (currentCallStatus.equals(CallStatus.RECONNECTING)) { hangup(false); } else { initiateCall(); } } break; case "roomJoined": Log.d(TAG, "onMessageEvent 'roomJoined'"); startSendingNick(); if (webSocketCommunicationEvent.getHashMap().get("roomToken").equals(roomToken)) { performCall(); } break; case PARTICIPANTS_UPDATE: Log.d(TAG, "onMessageEvent 'participantsUpdate'"); // See MagicWebSocketInstance#onMessage in case "participants" how the 'updateParameters' are created Map<String, String> updateParameters = webSocketCommunicationEvent.getHashMap(); if (updateParameters == null) { break; } String updateRoomToken = updateParameters.get(ROOM_TOKEN); String updateAll = updateParameters.get(UPDATE_ALL); String updateInCall = updateParameters.get(UPDATE_IN_CALL); String jobId = updateParameters.get(JOB_ID); if (roomToken.equals(updateRoomToken)) { if (updateAll != null && Boolean.parseBoolean(updateAll)) { if ("0".equals(updateInCall)) { Log.d(TAG, "Most probably a moderator ended the call for all."); hangup(true); } } else if (jobId != null) { // In that case a list of users for the room is passed. processUsersInRoom( (List<HashMap<String, Object>>) webSocketClient .getJobWithId( Integer.valueOf(jobId))); } } break; case "signalingMessage": Log.d(TAG, "onMessageEvent 'signalingMessage'"); processMessage((NCSignalingMessage) webSocketClient.getJobWithId( Integer.valueOf(webSocketCommunicationEvent.getHashMap().get("jobId")))); break; case "peerReadyForRequestingOffer": Log.d(TAG, "onMessageEvent 'peerReadyForRequestingOffer'"); webSocketClient.requestOfferForSessionIdWithType( webSocketCommunicationEvent.getHashMap().get("sessionId"), "video"); break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onMessageEvent File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
onMessageEvent
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private Object extractJsonRequest(InputStream pInputStream, String pEncoding) throws IOException { InputStreamReader reader = null; try { reader = pEncoding != null ? new InputStreamReader(pInputStream, pEncoding) : new InputStreamReader(pInputStream); JSONParser parser = new JSONParser(); return parser.parse(reader); } catch (ParseException exp) { throw new IllegalArgumentException("Invalid JSON request " + reader,exp); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractJsonRequest File: agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java Repository: jolokia The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0168
MEDIUM
6.8
jolokia
extractJsonRequest
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
0
Analyze the following code function for security vulnerabilities
public PdfDictionary getCatalog() { return catalog; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCatalog File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
getCatalog
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public void addValidator(String validatorId, String validatorClass) { Util.notNull("validatorId", validatorId); Util.notNull("validatorClass", validatorClass); if (LOGGER.isLoggable(Level.FINE) && validatorMap.containsKey(validatorId)) { LOGGER.log(Level.FINE, "validatorId {0} has already been registered. Replacing existing validator class type {1} with {2}.", new Object[] { validatorId, validatorMap.get(validatorId), validatorClass }); } validatorMap.put(validatorId, validatorClass); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(MessageFormat.format("added validator of type ''{0}'' class ''{1}''", validatorId, validatorClass)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addValidator File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
addValidator
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
private static String randomString(int byteLength) { byte[] bytes = new byte[byteLength]; try { SecureRandom.getInstanceStrong().nextBytes(bytes); } catch (NoSuchAlgorithmException e) { throw new UncheckedException(e); } return new String(bytes, StandardCharsets.ISO_8859_1); }
Vulnerability Classification: - CWE: CWE-312 - CVE: CVE-2021-29481 - Severity: MEDIUM - CVSS Score: 5.0 Description: Use more portable secure random Function: randomString File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java Repository: ratpack Fixed Code: private static String randomString(int byteLength) { byte[] bytes = new byte[byteLength]; SECURE_RANDOM.nextBytes(bytes); return new String(bytes, StandardCharsets.ISO_8859_1); }
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
randomString
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
60302fae7ef26897b9a0ec0def6281a9425344cf
1
Analyze the following code function for security vulnerabilities
public List<V1SchemeSignerInfo> getV1SchemeSigners() { return mV1SchemeSigners; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getV1SchemeSigners File: src/main/java/com/android/apksig/ApkVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
getV1SchemeSigners
src/main/java/com/android/apksig/ApkVerifier.java
039f815895f62c9f8af23df66622b66246f3f61e
0
Analyze the following code function for security vulnerabilities
@Override public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(displayId); mRemote.transact(CREATE_STACK_ON_DISPLAY, data, reply, 0); reply.readException(); final int result = reply.readInt(); final IActivityContainer res; if (result == 1) { res = IActivityContainer.Stub.asInterface(reply.readStrongBinder()); } else { res = null; } data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStackOnDisplay File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
createStackOnDisplay
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private boolean isManagedProfileWithSeparatedLock(int userId) { return mUserManager.getUserInfo(userId).isManagedProfile() && mLockPatternUtils.isSeparateProfileChallengeEnabled(userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isManagedProfileWithSeparatedLock File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
isManagedProfileWithSeparatedLock
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public void createConversationNotificationChannel(String pkg, int uid, NotificationChannel parent, String conversationId) { try { sINM.createConversationNotificationChannelForPackage(pkg, uid, parent, conversationId); } catch (Exception e) { Log.w(TAG, "Error calling NoMan", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createConversationNotificationChannel File: src/com/android/settings/notification/NotificationBackend.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35667
HIGH
7.8
android
createConversationNotificationChannel
src/com/android/settings/notification/NotificationBackend.java
d8355ac47e068ad20c6a7b1602e72f0585ec0085
0
Analyze the following code function for security vulnerabilities
private void handlePackageUpdateFinished(String packageName, @UserIdInt int userId) { if (DEBUG || DEBUG_REBOOT) { Slog.d(TAG, String.format("handlePackageUpdateFinished: %s user=%d", packageName, userId)); } synchronized (mLock) { final ShortcutUser user = getUserShortcutsLocked(userId); user.attemptToRestoreIfNeededAndSave(this, packageName, userId); if (isPackageInstalled(packageName, userId)) { user.rescanPackageIfNeeded(packageName, /* forceRescan=*/ true); } } verifyStates(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handlePackageUpdateFinished 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
handlePackageUpdateFinished
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { Map map = (Map) source; String entryName = mapper().serializedClass(Map.Entry.class); for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); ExtendedHierarchicalStreamWriterHelper.startNode(writer, entryName, entry.getClass()); writeCompleteItem(entry.getKey(), context, writer); writeCompleteItem(entry.getValue(), context, writer); writer.endNode(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: marshal File: xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
marshal
xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
@Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { int pos = binding.startConversationViewPager.getCurrentItem(); if (pos == 0) { if (contacts.size() == 1) { openConversationForContact((Contact) contacts.get(0)); return true; } else if (contacts.size() == 0 && conferences.size() == 1) { openConversationsForBookmark((Bookmark) conferences.get(0)); return true; } } else { if (conferences.size() == 1) { openConversationsForBookmark((Bookmark) conferences.get(0)); return true; } else if (conferences.size() == 0 && contacts.size() == 1) { openConversationForContact((Contact) contacts.get(0)); return true; } } SoftKeyboardUtils.hideSoftKeyboard(StartConversationActivity.this); mListPagerAdapter.requestFocus(pos); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onEditorAction File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
onEditorAction
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public void setNonPersistentMacRandomizationEnabled(boolean enabled) { mIsNonPersistentMacRandomizationEnabled = enabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNonPersistentMacRandomizationEnabled 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
setNonPersistentMacRandomizationEnabled
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
private boolean isOnFgOffloadQueue(int flags) { return ((flags & Intent.FLAG_RECEIVER_OFFLOAD_FOREGROUND) != 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isOnFgOffloadQueue 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
isOnFgOffloadQueue
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
boolean matchesDisplayAreaBounds() { final Rect rotatedDisplayBounds = mToken.getFixedRotationTransformDisplayBounds(); if (rotatedDisplayBounds != null) { // If the rotated display bounds are available, the window bounds are also rotated. return rotatedDisplayBounds.equals(getBounds()); } final DisplayArea displayArea = getDisplayArea(); if (displayArea == null) { return getDisplayContent().getBounds().equals(getBounds()); } return displayArea.getBounds().equals(getBounds()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: matchesDisplayAreaBounds 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
matchesDisplayAreaBounds
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public void updateOrder(ResetOrderRequest request) { ServiceUtils.updateOrderField(request, ApiScenarioWithBLOBs.class, apiScenarioMapper::selectByPrimaryKey, extApiScenarioMapper::getPreOrder, extApiScenarioMapper::getLastOrder, apiScenarioMapper::updateByPrimaryKeySelective); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateOrder 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
updateOrder
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Override public void toDOM(Document document, Element certEnrollmentRequestElement) { super.toDOM(document, certEnrollmentRequestElement); if (getProfileId() != null && !getProfileId().isEmpty()) { Element profileIdElement = document.createElement("ProfileID"); profileIdElement.appendChild(document.createTextNode(getProfileId())); certEnrollmentRequestElement.appendChild(profileIdElement); } if (getServerSideKeygenP12Passwd() != null && !getServerSideKeygenP12Passwd().isEmpty()) { Element getServerSideKeygenP12PasswdElement = document.createElement("ServerSideKeygenP12Passwd"); getServerSideKeygenP12PasswdElement.appendChild(document.createTextNode(getServerSideKeygenP12Passwd())); certEnrollmentRequestElement.appendChild(getServerSideKeygenP12PasswdElement); } Element renewalElement = document.createElement("Renewal"); renewalElement.appendChild(document.createTextNode(String.valueOf(isRenewal()))); certEnrollmentRequestElement.appendChild(renewalElement); if (getSerialNum() != null) { Element serialNumberElement = document.createElement("SerialNumber"); serialNumberElement.appendChild(document.createTextNode(getSerialNum().toHexString())); certEnrollmentRequestElement.appendChild(serialNumberElement); } if (getRemoteHost() != null) { Element remoteHostElement = document.createElement("RemoteHost"); remoteHostElement.appendChild(document.createTextNode(getRemoteHost())); certEnrollmentRequestElement.appendChild(remoteHostElement); } if (getRemoteAddr() != null) { Element remoteAddressElement = document.createElement("RemoteAddress"); remoteAddressElement.appendChild(document.createTextNode(getRemoteAddr())); certEnrollmentRequestElement.appendChild(remoteAddressElement); } for (ProfileInput input: getInputs()) { certEnrollmentRequestElement.appendChild(input.toDOM(document)); } for (ProfileOutput output: getOutputs()) { Element outputElement = document.createElement("Output"); output.toDOM(document, outputElement); certEnrollmentRequestElement.appendChild(outputElement); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toDOM File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toDOM
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public int waitForResult() { return mEngine.waitForResult(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: waitForResult 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
waitForResult
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
protected H createHandler() { return new StatusBar.H(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createHandler 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
createHandler
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private boolean isEnableAudit() { return getConfiguration().isEnableAudit(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEnableAudit File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
isEnableAudit
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
void queryTargetServices(ChooserListAdapter adapter) { final PackageManager pm = getPackageManager(); int targetsToQuery = 0; for (int i = 0, N = adapter.getDisplayResolveInfoCount(); i < N; i++) { final DisplayResolveInfo dri = adapter.getDisplayResolveInfo(i); if (adapter.getScore(dri) == 0) { // A score of 0 means the app hasn't been used in some time; // don't query it as it's not likely to be relevant. continue; } final ActivityInfo ai = dri.getResolveInfo().activityInfo; final Bundle md = ai.metaData; final String serviceName = md != null ? convertServiceName(ai.packageName, md.getString(ChooserTargetService.META_DATA_NAME)) : null; if (serviceName != null) { final ComponentName serviceComponent = new ComponentName( ai.packageName, serviceName); final Intent serviceIntent = new Intent(ChooserTargetService.SERVICE_INTERFACE) .setComponent(serviceComponent); if (DEBUG) { Log.d(TAG, "queryTargets found target with service " + serviceComponent); } try { final String perm = pm.getServiceInfo(serviceComponent, 0).permission; if (!ChooserTargetService.BIND_PERMISSION.equals(perm)) { Log.w(TAG, "ChooserTargetService " + serviceComponent + " does not require" + " permission " + ChooserTargetService.BIND_PERMISSION + " - this service will not be queried for ChooserTargets." + " add android:permission=\"" + ChooserTargetService.BIND_PERMISSION + "\"" + " to the <service> tag for " + serviceComponent + " in the manifest."); continue; } } catch (NameNotFoundException e) { Log.e(TAG, "Could not look up service " + serviceComponent, e); continue; } final ChooserTargetServiceConnection conn = new ChooserTargetServiceConnection(this, dri); if (bindServiceAsUser(serviceIntent, conn, BIND_AUTO_CREATE | BIND_NOT_FOREGROUND, UserHandle.CURRENT)) { if (DEBUG) { Log.d(TAG, "Binding service connection for target " + dri + " intent " + serviceIntent); } mServiceConnections.add(conn); targetsToQuery++; } } if (targetsToQuery >= QUERY_TARGET_SERVICE_LIMIT) { if (DEBUG) Log.d(TAG, "queryTargets hit query target limit " + QUERY_TARGET_SERVICE_LIMIT); break; } } if (!mServiceConnections.isEmpty()) { if (DEBUG) Log.d(TAG, "queryTargets setting watchdog timer for " + WATCHDOG_TIMEOUT_MILLIS + "ms"); mChooserHandler.sendEmptyMessageDelayed(CHOOSER_TARGET_SERVICE_WATCHDOG_TIMEOUT, WATCHDOG_TIMEOUT_MILLIS); } else { sendVoiceChoicesIfNeeded(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: queryTargetServices 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
queryTargetServices
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
@Override public Response processCommitTransactionOnePhase(TransactionInfo info) throws Exception { TransportConnectionState cs = lookupConnectionState(info.getConnectionId()); context = cs.getContext(); cs.removeTransactionState(info.getTransactionId()); broker.commitTransaction(context, info.getTransactionId(), true); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processCommitTransactionOnePhase File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
processCommitTransactionOnePhase
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0