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 boolean navigateUpTo(IBinder token, Intent destIntent, int resultCode, Intent resultData) { synchronized (this) { final ActivityRecord r = ActivityRecord.forTokenLocked(token); if (r != null) { return r.task.stack.navigateUpToLocked(r, destIntent, resultCode, resultData); } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: navigateUpTo File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
navigateUpTo
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PolicyDefault other = (PolicyDefault) obj; if (attributes == null) { if (other.attributes != null) return false; } else if (!attributes.equals(other.attributes)) return false; if (classId == null) { if (other.classId != null) return false; } else if (!classId.equals(other.classId)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (params == null) { if (other.params != null) return false; } else if (!params.equals(other.params)) return false; if (text == null) { if (other.text != null) return false; } else if (!text.equals(other.text)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
equals
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
boolean isPartialHandler() { return partialHandler; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPartialHandler File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-3690
HIGH
7.5
undertow-io/undertow
isPartialHandler
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
c7e84a0b7efced38506d7d1dfea5902366973877
0
Analyze the following code function for security vulnerabilities
void backKeyPressed();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: backKeyPressed File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
backKeyPressed
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
protected void deleteSyncIssue(List<String> ids) { if (CollectionUtils.isEmpty(ids)) return; IssuesExample example = new IssuesExample(); IssuesWithBLOBs issue = new IssuesWithBLOBs(); issue.setPlatformStatus(IssuesStatus.DELETE.toString()); example.createCriteria().andIdIn(ids); issuesMapper.updateByExampleSelective(issue, example); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteSyncIssue 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
deleteSyncIssue
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
private void playSounds(boolean locked) { playSound(locked ? mLockSoundId : mUnlockSoundId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: playSounds 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
playSounds
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
protected VaadinSession readFromHttpSession(WrappedSession wrappedSession) { return (VaadinSession) wrappedSession .getAttribute(getSessionAttributeName()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFromHttpSession File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
readFromHttpSession
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public void readFromTemplate(DocumentReference templateDocumentReference, XWikiContext context) throws XWikiException { if (templateDocumentReference != null) { String content = getContent(); if (!content.equals("\n") && !content.equals("") && !isNew()) { Object[] args = { getDefaultEntityReferenceSerializer().serialize(getDocumentReference()) }; throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY, "Cannot add a template to document {0} because it already has content", null, args); } else { XWiki xwiki = context.getWiki(); XWikiDocument templatedoc = xwiki.getDocument(templateDocumentReference, context); if (templatedoc.isNew()) { Object[] args = { getDefaultEntityReferenceSerializer().serialize(templateDocumentReference), getCompactEntityReferenceSerializer().serialize(getDocumentReference()) }; throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_APP_TEMPLATE_DOES_NOT_EXIST, "Template document {0} does not exist when adding to document {1}", null, args); } else { setTemplateDocumentReference(templateDocumentReference); setTitle(templatedoc.getTitle()); setContent(templatedoc.getContent()); // Set the new document syntax as the syntax of the template since the template content // is copied into the new document setSyntax(templatedoc.getSyntax()); // If the parent is not set in the current document set the template parent as the parent. if (getParentReference() == null) { setParentReference(templatedoc.getRelativeParentReference()); } if (isNew()) { // We might have received the objects from the cache and the template objects might have been // copied already we need to remove them setXObjects(new TreeMap<DocumentReference, List<BaseObject>>()); } // Merge the external objects. // Currently the choice is not to merge the base class and object because it is not the preferred // way of using external classes and objects. mergeXObjects(templatedoc); // Copy the attachments from the template document, but don't overwrite existing attachments because // the user can add attachments from the WYSIWYG editor before the save button is clicked (and thus // before the template is applied). copyAttachments(templatedoc, false); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFromTemplate 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
readFromTemplate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
private static Logger getLogger() { return LoggerFactory.getLogger(VaadinConnectAccessChecker.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLogger File: fusion-endpoint/src/main/java/com/vaadin/flow/server/connect/auth/VaadinConnectAccessChecker.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31406
LOW
1.9
vaadin/flow
getLogger
fusion-endpoint/src/main/java/com/vaadin/flow/server/connect/auth/VaadinConnectAccessChecker.java
3fe644cab2cffa5b86316dbe71b11df1083861a9
0
Analyze the following code function for security vulnerabilities
@JsonProperty("NotValidBefore") public Date getNotValidBefore() { return notValidBefore; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotValidBefore File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getNotValidBefore
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public static NativeObject jsFunction_login(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException { if (args == null || args.length == 0 || !isStringArray(args)) { handleException("Invalid input parameters for the login method"); } String username = (String) args[0]; String password = (String) args[1]; String appContext = ""; if (args.length == 3) { appContext = (String) args[2]; } ConfigurationContext configurationContext = ServiceReferenceHolder.getInstance().getAxis2ConfigurationContext(); APIManagerConfiguration config = HostObjectComponent.getAPIManagerConfiguration(); String url = config.getFirstProperty(APIConstants.AUTH_MANAGER_URL); if (url == null) { handleException("API key manager URL unspecified"); } NativeObject row = new NativeObject(); try { AuthenticationAdminStub authAdminStub = new AuthenticationAdminStub(configurationContext, url + "AuthenticationAdmin"); ServiceClient client = authAdminStub._getServiceClient(); Options options = client.getOptions(); options.setManageSession(true); String tenantDomain = MultitenantUtils.getTenantDomain(username); //update permission cache before validate user int tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager() .getTenantId(tenantDomain); if(tenantId == MultitenantConstants.INVALID_TENANT_ID) { handleException("Invalid tenant domain."); } PermissionUpdateUtil.updatePermissionTree(tenantId); String host = new URL(url).getHost(); if (!authAdminStub.login(username, password, host)) { handleException("Login failed. Please recheck the username and password and try again."); } ServiceContext serviceContext = authAdminStub. _getServiceClient().getLastOperationContext().getServiceContext(); String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING); String usernameWithDomain = APIUtil.getLoggedInUserInfo(sessionCookie, url).getUserName(); usernameWithDomain = APIUtil.setDomainNameToUppercase(usernameWithDomain); boolean isSuperTenant = false; if (tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) { isSuperTenant = true; // If email user name is not enabled and user name is an email user name then only append // carbon.super to the username if (!MultitenantUtils.isEmailUserName() && MultitenantUtils.getTenantAwareUsername(username) .contains(APIConstants.EMAIL_DOMAIN_SEPARATOR)) { usernameWithDomain = usernameWithDomain + APIConstants.EMAIL_DOMAIN_SEPARATOR + tenantDomain; } } else { usernameWithDomain = usernameWithDomain + APIConstants.EMAIL_DOMAIN_SEPARATOR + tenantDomain; } boolean authorized = true; if (!adminAppName.equals(appContext)) { authorized = APIUtil.checkPermissionQuietly(usernameWithDomain, APIConstants.Permissions.API_SUBSCRIBE); } boolean displayPublishUrlFromStore = false; if (config != null) { displayPublishUrlFromStore = Boolean.parseBoolean(config.getFirstProperty(APIConstants.SHOW_API_PUBLISHER_URL_FROM_STORE)); } boolean loginUserHasPublisherAccess = false; if (displayPublishUrlFromStore) { loginUserHasPublisherAccess = APIUtil.checkPermissionQuietly(usernameWithDomain, APIConstants.Permissions.API_CREATE) || APIUtil.checkPermissionQuietly(usernameWithDomain, APIConstants.Permissions.API_PUBLISH); } if (authorized) { //We will clear recently added API cache when logged in. HostObjectUtils.invalidateRecentlyAddedAPICache(username); row.put("user", row, usernameWithDomain); row.put("sessionId", row, sessionCookie); row.put("isSuperTenant", row, isSuperTenant); row.put("error", row, false); row.put("hasPublisherAccess", row, loginUserHasPublisherAccess); } else { CarbonConstants.AUDIT_LOG.info('\'' + usernameWithDomain + APIConstants.EMAIL_DOMAIN_SEPARATOR + tenantDomain + " [" + tenantId + "]' login denied due to insufficient privileges"); handleException("Login failed. Insufficient Privileges."); } } catch (Exception e) { row.put("error", row, true); row.put("detail", row, e.getMessage()); } return row; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_login 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_login
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 void sendSmsByCarrierApp(String carrierPackageName, SmsSenderCallback senderCallback) { mSenderCallback = senderCallback; if (!bindToCarrierMessagingService(mContext, carrierPackageName)) { Rlog.e(TAG, "bindService() for carrier messaging service failed"); mSenderCallback.onSendSmsComplete( CarrierMessagingService.SEND_STATUS_RETRY_ON_CARRIER_NETWORK, 0 /* messageRef */); } else { Rlog.d(TAG, "bindService() for carrier messaging service succeeded"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSmsByCarrierApp File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
sendSmsByCarrierApp
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
private String getElementText(Element element, String tagName, boolean ignoreEmpty) { NodeList nList = element.getElementsByTagName(tagName); String value = nList.getLength() > 0 ? nList.item(0).getTextContent() : null; if (value != null && ignoreEmpty && StringUtils.isEmpty(value)) { value = null; } return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getElementText File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-27480
HIGH
7.7
xwiki/xwiki-platform
getElementText
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
e3527b98fdd8dc8179c24dc55e662b2c55199434
0
Analyze the following code function for security vulnerabilities
protected void checkBuilder() { if (mBuilder == null) { throw new IllegalArgumentException("Style requires a valid Builder object"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkBuilder File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
checkBuilder
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
HTMLPanel getContent();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContent File: jbpm-console-ng-human-tasks/jbpm-console-ng-human-tasks-client/src/main/java/org/jbpm/console/ng/ht/client/editors/taskdetailsmulti/TaskDetailsMultiPresenter.java Repository: kiegroup/jbpm-wb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-6465
LOW
3.5
kiegroup/jbpm-wb
getContent
jbpm-console-ng-human-tasks/jbpm-console-ng-human-tasks-client/src/main/java/org/jbpm/console/ng/ht/client/editors/taskdetailsmulti/TaskDetailsMultiPresenter.java
4818204506e8e94645b52adb9426bedfa9ffdd04
0
Analyze the following code function for security vulnerabilities
public ApiClient configureApiKeys(Map<String, String> secrets) { for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) { Authentication auth = authEntry.getValue(); if (auth instanceof ApiKeyAuth) { String name = authEntry.getKey(); // respect x-auth-id-alias property name = authenticationLookup.containsKey(name) ? authenticationLookup.get(name) : name; if (secrets.containsKey(name)) { ((ApiKeyAuth) auth).setApiKey(secrets.get(name)); } } } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: configureApiKeys File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
configureApiKeys
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
protected final Object deserializeWithView(JsonParser p, DeserializationContext ctxt, Object bean, Class<?> activeView) throws IOException { if (p.hasTokenId(JsonTokenId.ID_FIELD_NAME)) { String propName = p.currentName(); do { p.nextToken(); // TODO: 06-Jan-2015, tatu: try streamlining call sequences here as well SettableBeanProperty prop = _beanProperties.find(propName); if (prop != null) { if (!prop.visibleInView(activeView)) { p.skipChildren(); continue; } try { prop.deserializeAndSet(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); } continue; } handleUnknownVanilla(p, ctxt, bean, propName); } while ((propName = p.nextFieldName()) != null); } return bean; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deserializeWithView File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42004
HIGH
7.5
FasterXML/jackson-databind
deserializeWithView
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
063183589218fec19a9293ed2f17ec53ea80ba88
0
Analyze the following code function for security vulnerabilities
@Override public void onBeforeRender() { super.onBeforeRender(); actionButtons.render(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onBeforeRender File: src/main/java/org/projectforge/web/task/TaskTreeForm.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
onBeforeRender
src/main/java/org/projectforge/web/task/TaskTreeForm.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
@Override public void test() throws Exception { testServlet(); testWrongParameters(); testTools(); testAlreadyRunning(); testStartWebServerWithConnection(); testServer(); testWebApp(); testIfExists(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: test File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
test
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public Collection<String> getJobNames() { List<String> names = new ArrayList<String>(); for (Job j : getAllItems(Job.class)) names.add(j.getFullName()); return names; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJobNames 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
getJobNames
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void dismiss(boolean authenticated, int targetUserId, SecurityMode expectedSecurityMode) { mKeyguardSecurityCallback.dismiss(authenticated, targetUserId, expectedSecurityMode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dismiss File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21245
HIGH
7.8
android
dismiss
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
a33159e8cb297b9eee6fa5c63c0e343d05fad622
0
Analyze the following code function for security vulnerabilities
public void setLockScreenShown(boolean shown) { if (checkCallingPermission(android.Manifest.permission.DEVICE_POWER) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires permission " + android.Manifest.permission.DEVICE_POWER); } synchronized(this) { long ident = Binder.clearCallingIdentity(); try { if (DEBUG_LOCKSCREEN) logLockScreen(" shown=" + shown); mLockScreenShown = shown ? LOCK_SCREEN_SHOWN : LOCK_SCREEN_HIDDEN; updateSleepIfNeededLocked(); } finally { Binder.restoreCallingIdentity(ident); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLockScreenShown File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
setLockScreenShown
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private void migrate19(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Projects.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { Element commitMessageTransformsElement = element.addElement("commitMessageTransforms"); Element commitMessageTransformSettingElement = element.element("commitMessageTransformSetting"); if (commitMessageTransformSettingElement != null) { commitMessageTransformSettingElement.detach(); commitMessageTransformSettingElement.setName("io.onedev.server.model.support.CommitMessageTransform"); commitMessageTransformsElement.add(commitMessageTransformSettingElement); } } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate19 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
migrate19
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
String readHeaderLine(InputStream in) throws IOException { int c; StringBuilder buffer = new StringBuilder(80); while ((c = in.read()) >= 0) { if (c == '\n') break; // consume and discard the newlines buffer.append((char)c); } return buffer.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readHeaderLine 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
readHeaderLine
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public static void copy(File input, OutputStream output) throws IOException { FileInputStream fis = new FileInputStream(input); IOUtils.copy(fis, output); fis.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copy File: src/main/java/com/openkm/util/FileUtils.java Repository: openkm/document-management-system The code follows secure coding practices.
[ "CWE-377" ]
CVE-2022-3969
MEDIUM
5.5
openkm/document-management-system
copy
src/main/java/com/openkm/util/FileUtils.java
c069e4d73ab8864345c25119d8459495f45453e1
0
Analyze the following code function for security vulnerabilities
protected CompletableFuture<Void> internalSetSubscriptionDispatchRate(DispatchRateImpl dispatchRate) { if (dispatchRate == null) { return CompletableFuture.completedFuture(null); } return getTopicPoliciesAsyncWithRetry(topicName) .thenCompose(op -> { TopicPolicies topicPolicies = op.orElseGet(TopicPolicies::new); topicPolicies.setSubscriptionDispatchRate(dispatchRate); return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, topicPolicies); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalSetSubscriptionDispatchRate File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalSetSubscriptionDispatchRate
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
public int engineGetKeySize(Key key) { if (key instanceof DHKey) { return ((DHKey)key).getParams().getP().bitLength(); } else { throw new IllegalArgumentException("not a DH key"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineGetKeySize File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineGetKeySize
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
@Override public Document build(final InputSource in) throws JDOMException, IOException { try { return getEngine().build(in); } finally { if (!reuseParser) { engine = null; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: build File: core/src/java/org/jdom2/input/SAXBuilder.java Repository: hunterhacker/jdom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-33813
MEDIUM
5
hunterhacker/jdom
build
core/src/java/org/jdom2/input/SAXBuilder.java
bd3ab78370098491911d7fe9d7a43b97144a234e
0
Analyze the following code function for security vulnerabilities
public static final native int[] getExclusiveCores();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExclusiveCores File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
getExclusiveCores
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
public void setRequestID(RequestId requestID) { this.requestID = requestID; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequestID File: base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setRequestID
base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
List<EntityReference> getUserLikes(UserReference source, int offset, int limit) throws LikeException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserLikes File: xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-94" ]
CVE-2023-35152
HIGH
8.8
xwiki/xwiki-platform
getUserLikes
xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
0993a7ab3c102f9ac37ffe361a83a3dc302c0e45
0
Analyze the following code function for security vulnerabilities
public ModuleLocation[] getLocations(AbstractBuild<?,?> build) { return getLocations(null, build); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLocations File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
getLocations
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
public ShortcutInfo disableWithId(@NonNull String shortcutId, String disabledMessage, int disabledMessageResId, boolean overrideImmutable, boolean ignoreInvisible, int disabledReason) { final ShortcutInfo deleted = deleteOrDisableWithId(shortcutId, /* disable =*/ true, overrideImmutable, ignoreInvisible, disabledReason, /*ignorePersistedShortcuts=*/ false); // If disabled id still exists, it is pinned and we need to update the disabled message. mutateShortcut(shortcutId, null, disabled -> { if (disabled != null) { if (disabledMessage != null) { disabled.setDisabledMessage(disabledMessage); } else if (disabledMessageResId != 0) { disabled.setDisabledMessageResId(disabledMessageResId); mShortcutUser.mService.fixUpShortcutResourceNamesAndValues(disabled); } } }); return deleted; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disableWithId File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
disableWithId
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
private void addObjectSlow(Iterable<? extends Entry<? extends CharSequence, ?>> headers) { // Slow copy for (Entry<? extends CharSequence, ?> header : headers) { addObject(header.getKey(), header.getValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObjectSlow File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
addObjectSlow
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public PRIndirectReference addPdfObject(PdfObject obj) { xrefObj.add(obj); PRIndirectReference retVal = new PRIndirectReference(this, xrefObj.size() - 1); return retVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPdfObject 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
addPdfObject
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override public int getCallStateUsingPackage(String callingPackage, String callingFeatureId) { try { Log.startSession("TSI.getCallStateUsingPackage"); if (CompatChanges.isChangeEnabled( TelecomManager.ENABLE_GET_CALL_STATE_PERMISSION_PROTECTION, callingPackage, Binder.getCallingUserHandle())) { // Bypass canReadPhoneState check if this is being called from SHELL UID if (Binder.getCallingUid() != Process.SHELL_UID && !canReadPhoneState( callingPackage, callingFeatureId, "getCallState")) { throw new SecurityException("getCallState API requires READ_PHONE_STATE" + " for API version 31+"); } } synchronized (mLock) { return mCallsManager.getCallState(); } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallStateUsingPackage File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
getCallStateUsingPackage
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
private void onManageUserClicked(int userId, boolean newUser) { mAddingUser = false; if (userId == UserPreference.USERID_GUEST_DEFAULTS) { Bundle extras = new Bundle(); extras.putBoolean(UserDetailsSettings.EXTRA_USER_GUEST, true); ((SettingsActivity) getActivity()).startPreferencePanel( UserDetailsSettings.class.getName(), extras, R.string.user_guest, null, null, 0); return; } UserInfo info = mUserManager.getUserInfo(userId); if (info.isRestricted() && mUserCaps.mIsAdmin) { Bundle extras = new Bundle(); extras.putInt(RestrictedProfileSettings.EXTRA_USER_ID, userId); extras.putBoolean(RestrictedProfileSettings.EXTRA_NEW_USER, newUser); ((SettingsActivity) getActivity()).startPreferencePanel( RestrictedProfileSettings.class.getName(), extras, R.string.user_restrictions_title, null, null, 0); } else if (info.id == UserHandle.myUserId()) { // Jump to owner info panel OwnerInfoSettings.show(this); } else if (mUserCaps.mIsAdmin) { Bundle extras = new Bundle(); extras.putInt(UserDetailsSettings.EXTRA_USER_ID, userId); ((SettingsActivity) getActivity()).startPreferencePanel( UserDetailsSettings.class.getName(), extras, -1, /* No title res id */ info.name, /* title */ null, /* resultTo */ 0 /* resultRequestCode */); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onManageUserClicked File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
onManageUserClicked
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
public Syntax getAvailableRendererSyntax(String syntaxType, String syntaxVersion) { Syntax syntax = null; try { List<PrintRendererFactory> factories = Utils.getContextComponentManager().getInstanceList((Type) PrintRendererFactory.class); for (PrintRendererFactory factory : factories) { Syntax factorySyntax = factory.getSyntax(); if (syntaxVersion != null) { if (factorySyntax.getType().getId().equalsIgnoreCase(syntaxType) && factorySyntax.getVersion().equals(syntaxVersion)) { syntax = factorySyntax; break; } } else { // TODO: improve version comparaison since it does not work when comparing 2.0 and 10.0 for example. // We // should have a Version which implements Comparable like we have SyntaxId in Syntax if (factorySyntax.getType().getId().equalsIgnoreCase(syntaxType) && (syntax == null || factorySyntax.getVersion().compareTo(syntax.getVersion()) > 0)) { syntax = factorySyntax; } } } } catch (ComponentLookupException e) { LOGGER.error("Failed to lookup available renderer syntaxes", e); } return syntax; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAvailableRendererSyntax File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
getAvailableRendererSyntax
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
@PUT @Path("test/{nodeId}/configuration/report") @Operation(summary = "Update the configuration of report", description = "Update the configuration of the reports in the test course node") @ApiResponse(responseCode = "200", description = "The course node configuration", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = SurveyConfigVO.class)), @Content(mediaType = "application/xml", schema = @Schema(implementation = SurveyConfigVO.class)) }) @ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient") @ApiResponse(responseCode = "404", description = "The course node was not found") @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response putTestReportConfiguration(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId, TestReportConfigVO config, @Context HttpServletRequest request) { FullConfigDelegate delegate = new TestReportFullConfig(config); attachNodeConfig(courseId, nodeId, delegate, request); return getTestReportConfiguration(courseId, nodeId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putTestReportConfiguration File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
putTestReportConfiguration
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
private void updateWallpaperVisibilityLocked() { final boolean visible = isWallpaperVisible(mWallpaperTarget); final DisplayContent displayContent = mWallpaperTarget.getDisplayContent(); if (displayContent == null) { return; } final DisplayInfo displayInfo = displayContent.getDisplayInfo(); final int dw = displayInfo.logicalWidth; final int dh = displayInfo.logicalHeight; for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { WindowToken token = mWallpaperTokens.get(curTokenNdx); if (token.hidden == visible) { token.hidden = !visible; // Need to do a layout to ensure the wallpaper now has the // correct size. displayContent.layoutNeeded = true; } final WindowList windows = token.windows; for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { WindowState wallpaper = windows.get(wallpaperNdx); if (visible) { updateWallpaperOffsetLocked(wallpaper, dw, dh, false); } dispatchWallpaperVisibility(wallpaper, visible); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateWallpaperVisibilityLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
updateWallpaperVisibilityLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List<TValue> values, Map<String, TValue> named) throws EaterException, EaterExceptionLocated { final String path = values.get(0).toString(); try { String data = loadStringData(path, getCharset(values)); if (data == null) data = getDefaultJson(values); JsonValue jsonValue = Json.parse(data); return TValue.fromJson(jsonValue); } catch (ParseException pe) { Logme.error(pe); throw EaterException.unlocated("JSON parse issue in source " + path + " on location " + pe.getLocation()); } catch (UnsupportedEncodingException e) { Logme.error(e); throw EaterException.unlocated("JSON encoding issue in source " + path + ": " + e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeReturnFunction File: src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
executeReturnFunction
src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
public void setRecoveryDelayHandler(final RecoveryDelayHandler recoveryDelayHandler) { this.recoveryDelayHandler = recoveryDelayHandler; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRecoveryDelayHandler File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
setRecoveryDelayHandler
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public static SubmissionStepConfig getCurrentStepConfig( HttpServletRequest request, SubmissionInfo si) { int stepNum = -1; SubmissionStepConfig step = (SubmissionStepConfig) request .getAttribute("step"); if (step == null) { // try and get it as a parameter stepNum = UIUtil.getIntParameter(request, "step"); // if something is wrong, return null if (stepNum < 0 || si == null || si.getSubmissionConfig() == null) { return null; } else { return si.getSubmissionConfig().getStep(stepNum); } } else { return step; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentStepConfig File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31194
HIGH
7.2
DSpace
getCurrentStepConfig
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
d1dd7d23329ef055069759df15cfa200c8e3
0
Analyze the following code function for security vulnerabilities
private void handleDisplayRemovedLocked(int displayId) { final DisplayContent displayContent = getDisplayContentLocked(displayId); if (displayContent != null) { if (displayContent.isAnimating()) { displayContent.mDeferredRemoval = true; return; } if (DEBUG_DISPLAY) Slog.v(TAG, "Removing display=" + displayContent); mDisplayContents.delete(displayId); displayContent.close(); if (displayId == Display.DEFAULT_DISPLAY) { unregisterPointerEventListener(displayContent.mTapDetector); } } mAnimator.removeDisplayLocked(displayId); requestTraversalLocked(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleDisplayRemovedLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
handleDisplayRemovedLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public int getMaxConnectionPerHost() { return maxConnectionPerHost; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaxConnectionPerHost File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
getMaxConnectionPerHost
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
public String getXWikiPreference(String prefname, String fallbackParam, String defaultValue, XWikiContext context) { String result = getWikiConfiguration().getProperty(prefname, String.class); if (StringUtils.isEmpty(result)) { result = getConfiguration().getProperty(fallbackParam, defaultValue); } return result != null ? result : ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiPreference File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getXWikiPreference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public boolean canGoBack() { return mWebContents != null && mWebContents.getNavigationController().canGoBack(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canGoBack 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
canGoBack
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public static ProfileOutput fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element profileParameterElement = document.getDocumentElement(); return fromDOM(profileParameterElement); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: fromXML File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java Repository: dogtagpki/pki Fixed Code: public static ProfileOutput fromXML(String xml) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(xml))); Element profileParameterElement = document.getDocumentElement(); return fromDOM(profileParameterElement); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
fromXML
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
private V fromShort(K name, short value) { try { return valueConverter.convertShort(value); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("Failed to convert short value for header '" + name + '\'', e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromShort File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
fromShort
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public ApiClient setOauthAuthorizationCodeFlow(String code) { for (Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).useAuthorizationCodeFlow(code); return this; } } throw new RuntimeException("No OAuth2 authentication configured!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOauthAuthorizationCodeFlow File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setOauthAuthorizationCodeFlow
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@StyleRes private static native int nativeGetParentThemeIdentifier(long ptr, @StyleRes int styleId);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetParentThemeIdentifier 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
nativeGetParentThemeIdentifier
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
private static Err handle405(final Set<Route.Definition> routeDefs, final String method, final String path, final MediaType type, final List<MediaType> accept) { if (alternative(routeDefs, method, path).size() > 0) { return new Err(Status.METHOD_NOT_ALLOWED, method); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handle405 File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-15477
MEDIUM
4.3
jooby-project/jooby
handle405
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
34856a738829d8fedca4ed27bd6ff413af87186f
0
Analyze the following code function for security vulnerabilities
public boolean serveDevModeRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { // Do not serve requests if dev server starting or failed to start. if (isDevServerFailedToStart.get() || !devServerStartFuture.isDone()) { return false; } // Since we have 'publicPath=/VAADIN/' in webpack config, // a valid request for webpack-dev-server should start with '/VAADIN/' String requestFilename = request.getPathInfo(); if (HandlerHelper.isPathUnsafe(requestFilename)) { getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN, requestFilename); response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return true; } HttpURLConnection connection = prepareConnection(requestFilename, request.getMethod()); // Copies all the headers from the original request Enumeration<String> headerNames = request.getHeaderNames(); while (headerNames.hasMoreElements()) { String header = headerNames.nextElement(); connection.setRequestProperty(header, // Exclude keep-alive "Connect".equals(header) ? "close" : request.getHeader(header)); } // Send the request getLogger().debug("Requesting resource to webpack {}", connection.getURL()); int responseCode = connection.getResponseCode(); if (responseCode == HTTP_NOT_FOUND) { getLogger().debug("Resource not served by webpack {}", requestFilename); // webpack cannot access the resource, return false so as flow can // handle it return false; } getLogger().debug("Served resource by webpack: {} {}", responseCode, requestFilename); // Copies response headers connection.getHeaderFields().forEach((header, values) -> { if (header != null) { response.addHeader(header, values.get(0)); } }); if (responseCode == HTTP_OK) { // Copies response payload writeStream(response.getOutputStream(), connection.getInputStream()); } else if (responseCode < 400) { response.setStatus(responseCode); } else { // Copies response code response.sendError(responseCode); } // Close request to avoid issues in CI and Chrome response.getOutputStream().close(); return true; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2020-36321 - Severity: MEDIUM - CVSS Score: 5.0 Description: Add unit tests and change status code Function: serveDevModeRequest File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow Fixed Code: public boolean serveDevModeRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { // Do not serve requests if dev server starting or failed to start. if (isDevServerFailedToStart.get() || !devServerStartFuture.isDone()) { return false; } // Since we have 'publicPath=/VAADIN/' in webpack config, // a valid request for webpack-dev-server should start with '/VAADIN/' String requestFilename = request.getPathInfo(); if (HandlerHelper.isPathUnsafe(requestFilename)) { getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN, requestFilename); response.setStatus(HttpServletResponse.SC_FORBIDDEN); return true; } HttpURLConnection connection = prepareConnection(requestFilename, request.getMethod()); // Copies all the headers from the original request Enumeration<String> headerNames = request.getHeaderNames(); while (headerNames.hasMoreElements()) { String header = headerNames.nextElement(); connection.setRequestProperty(header, // Exclude keep-alive "Connect".equals(header) ? "close" : request.getHeader(header)); } // Send the request getLogger().debug("Requesting resource to webpack {}", connection.getURL()); int responseCode = connection.getResponseCode(); if (responseCode == HTTP_NOT_FOUND) { getLogger().debug("Resource not served by webpack {}", requestFilename); // webpack cannot access the resource, return false so as flow can // handle it return false; } getLogger().debug("Served resource by webpack: {} {}", responseCode, requestFilename); // Copies response headers connection.getHeaderFields().forEach((header, values) -> { if (header != null) { response.addHeader(header, values.get(0)); } }); if (responseCode == HTTP_OK) { // Copies response payload writeStream(response.getOutputStream(), connection.getInputStream()); } else if (responseCode < 400) { response.setStatus(responseCode); } else { // Copies response code response.sendError(responseCode); } // Close request to avoid issues in CI and Chrome response.getOutputStream().close(); return true; }
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
serveDevModeRequest
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
1
Analyze the following code function for security vulnerabilities
public void setSearchBean(SearchBean searchBean) { this.searchBean = searchBean; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSearchBean 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
setSearchBean
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
public HttpRequest withConnectionProvider(final HttpConnectionProvider httpConnectionProvider) { this.httpConnectionProvider = httpConnectionProvider; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withConnectionProvider File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
withConnectionProvider
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
@Override @Deprecated(since = "14.0RC1") public DocumentReference getContentAuthorReference() { UserReference contentAuthor = this.getAuthors().getContentAuthor(); if (contentAuthor != null && contentAuthor != GuestUserReference.INSTANCE) { return this.getUserReferenceDocumentReferenceSerializer().serialize(contentAuthor); } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentAuthorReference File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getContentAuthorReference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
@Override public CmsFile writeFile(CmsObject cms, CmsSecurityManager securityManager, CmsFile resource) throws CmsException, CmsVfsException, CmsSecurityException { if (CmsImageLoader.isEnabled()) { // check if the user has write access and if resource is locked // done here so that no image operations are performed in case no write access is granted securityManager.checkPermissions( cms.getRequestContext(), resource, CmsPermissionSet.ACCESS_WRITE, true, CmsResourceFilter.ALL); // get the downscaler to use CmsImageScaler downScaler = getDownScaler(cms, resource.getRootPath()); // create a new image scale adjuster CmsImageAdjuster adjuster = new CmsImageAdjuster( resource.getContents(), resource.getRootPath(), null, downScaler); // update the image scale adjuster - this will calculate the image dimensions and (optionally) adjust the size adjuster.adjust(); // continue with the updated content resource.setContents(adjuster.getContent()); if (adjuster.getProperties() != null) { // write properties writePropertyObjects(cms, securityManager, resource, adjuster.getProperties()); } } return super.writeFile(cms, securityManager, resource); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeFile File: src/org/opencms/file/types/CmsResourceTypeImage.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3312
MEDIUM
4
alkacon/opencms-core
writeFile
src/org/opencms/file/types/CmsResourceTypeImage.java
92e035423aa6967822d343e54392d4291648c0ee
0
Analyze the following code function for security vulnerabilities
public String optString(int index) { return optString(index, ""); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optString File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
optString
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@Override public void drawArc(Object graphics, int x, int y, int width, int height, int startAngle, int arcAngle) { ((AndroidGraphics) graphics).drawArc(x, y, width, height, startAngle, arcAngle); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: drawArc File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
drawArc
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void checkTime(long startTime, String where) { long now = SystemClock.elapsedRealtime(); if ((now-startTime) > 1000) { // If we are taking more than a second, log about it. Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkTime File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
checkTime
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public boolean isDozing() { return mDozing; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDozing File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isDozing
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private byte[] shrink(byte[] arr, int size) { if(size == -1) { return null; } byte[] n = new byte[size]; System.arraycopy(arr, 0, n, 0, size); return n; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shrink File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
shrink
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected Map<String, List<String>> buildResponseHeaders(Response response) { Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>(); for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) { List<Object> values = entry.getValue(); List<String> headers = new ArrayList<String>(); for (Object o : values) { headers.add(String.valueOf(o)); } responseHeaders.put(entry.getKey(), headers); } return responseHeaders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildResponseHeaders File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
buildResponseHeaders
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override public void userSwitched() { updateNotification(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userSwitched File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3854
MEDIUM
5
android
userSwitched
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
05e0705177d2078fa9f940ce6df723312cfab976
0
Analyze the following code function for security vulnerabilities
static public Reader getFileReader(File file, ObjectNode fileRecord, String commonEncoding) throws FileNotFoundException { return getReaderFromStream(new FileInputStream(file), fileRecord, commonEncoding); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFileReader File: main/src/com/google/refine/importing/ImportingUtilities.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-19859
MEDIUM
4
OpenRefine
getFileReader
main/src/com/google/refine/importing/ImportingUtilities.java
e243e73e4064de87a913946bd320fbbe246da656
0
Analyze the following code function for security vulnerabilities
@Override public T addShort(K name, short value) { return add(name, fromShort(name, value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addShort File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
addShort
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public void decodeManifest(File outDir) throws AndrolibException { if (!mApkInfo.hasManifest()) { return; } AXmlResourceParser axmlParser = new AndroidManifestResourceParser(mResTable); XmlPullStreamDecoder fileDecoder = new XmlPullStreamDecoder(axmlParser, getResXmlSerializer()); Directory inApk, out; try { inApk = mApkInfo.getApkFile().getDirectory(); out = new FileDirectory(outDir); if (mApkInfo.hasResources()) { LOGGER.info("Decoding AndroidManifest.xml with resources..."); } else { LOGGER.info("Decoding AndroidManifest.xml with only framework resources..."); } InputStream inputStream = inApk.getFileInput("AndroidManifest.xml"); OutputStream outputStream = out.getFileOutput("AndroidManifest.xml"); fileDecoder.decodeManifest(inputStream, outputStream); } catch (DirectoryException ex) { throw new AndrolibException(ex); } if (mApkInfo.hasResources()) { if (!mConfig.analysisMode) { // Remove versionName / versionCode (aapt API 16) // // check for a mismatch between resources.arsc package and the package listed in AndroidManifest // also remove the android::versionCode / versionName from manifest for rebuild // this is a required change to prevent aapt warning about conflicting versions // it will be passed as a parameter to aapt like "--min-sdk-version" via apktool.yml adjustPackageManifest(outDir.getAbsolutePath() + File.separator + "AndroidManifest.xml"); ResXmlPatcher.removeManifestVersions(new File( outDir.getAbsolutePath() + File.separator + "AndroidManifest.xml")); // update apk info mApkInfo.packageInfo.forcedPackageId = String.valueOf(mResTable.getPackageId()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decodeManifest File: brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java Repository: iBotPeaches/Apktool The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-21633
HIGH
7.8
iBotPeaches/Apktool
decodeManifest
brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
d348c43b24a9de350ff6e5bd610545a10c1fc712
0
Analyze the following code function for security vulnerabilities
public String getComment() { if (this.comment == null) { return ""; } return this.comment; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getComment 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
getComment
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public static final native void setCanSelfBackground(boolean backgroundOk);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCanSelfBackground File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
setCanSelfBackground
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
public EntityEnclosingMethod update(org.xwiki.rest.model.jaxb.Object obj, boolean release) throws Exception { return TestUtils.assertStatusCodes(executePut(ObjectResource.class, obj, toElements(obj, false)), release, STATUS_CREATED_ACCEPTED); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: update File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
update
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private void setSessionAttribute(String name, Object value) { HttpSession session = getHttpSession(); if (session != null) { session.setAttribute(name, value); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSessionAttribute File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
setSessionAttribute
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
private int execute(CommandLine hgCmd, ConsoleOutputStreamConsumer outputStreamConsumer) { return run(hgCmd, outputStreamConsumer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: execute File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2022-29184
MEDIUM
6.5
gocd
execute
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
37d35115db2ada2190173f9413cfe1bc6c295ecb
0
Analyze the following code function for security vulnerabilities
public void setJaxbContextProperties(Map<String, ?> jaxbContextProperties) { this.jaxbContextProperties = jaxbContextProperties; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setJaxbContextProperties File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java Repository: spring-projects/spring-framework The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-4152
MEDIUM
6.8
spring-projects/spring-framework
setJaxbContextProperties
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
0
Analyze the following code function for security vulnerabilities
IWindowManager getIWindowManager() { return IWindowManager.Stub .asInterface(ServiceManager.getService(Context.WINDOW_SERVICE)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIWindowManager 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
getIWindowManager
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Nullable public static String getAbsoluteExtendedPath(@NonNull String expiredFilePath, long extendedTime) { final String displayName = extractDisplayName(expiredFilePath); final Matcher matcher = PATTERN_EXPIRES_FILE.matcher(displayName); if (matcher.matches()) { final String newDisplayName = String.format(Locale.US, ".%s-%d-%s", matcher.group(1), extendedTime, matcher.group(3)); final int lastSlash = expiredFilePath.lastIndexOf('/'); final String newPath = expiredFilePath.substring(0, lastSlash + 1).concat( newDisplayName); return newPath; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAbsoluteExtendedPath File: src/com/android/providers/media/util/FileUtils.java Repository: android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35670
HIGH
7.8
android
getAbsoluteExtendedPath
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
static String renderTopNav2(HttpServletRequest request) { String topNav = KVStorage.getCustomValue("TopNav32"); if (!JSONUtils.wellFormat(topNav)) return StringUtils.EMPTY; JSONArray sets = JSON.parseArray(topNav); if (sets.isEmpty()) return StringUtils.EMPTY; final ID user = AppUtils.getRequestUser(request); final boolean isAdmin = UserHelper.isAdmin(user); final Object[][] alls = instance.getAllConfig(null, TYPE_NAV); StringBuilder topNavHtml = new StringBuilder(); for (Object nd : sets) { JSONArray ndAnd = (JSONArray) nd; String nav = ndAnd.getString(0); String dash = ndAnd.getString(1); ID useNav = ID.isId(nav) ? ID.valueOf(nav) : null; if (useNav == null) continue; for (Object[] d : alls) { if (!useNav.equals(d[0])) continue; // 管理员、有共享的 if ((isAdmin && RoleService.ADMIN_ROLE.equals(d[5])) || instance.isShareTo((String) d[1], user)) { String url = AppUtils.getContextPath("/app/home?n=" + useNav); if (ID.isId(dash)) url += "&d=" + dash; String name = StringUtils.defaultIfBlank((String) d[4], Language.L("未命名")); topNavHtml.append( String.format("<li class=\"nav-item\" data-id=\"%s\"><a class=\"nav-link\" href=\"%s\">%s</a></li>", useNav, url, name)); break; } } } return topNavHtml.toString(); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2023-1495 - Severity: MEDIUM - CVSS Score: 6.5 Description: H5 sync2 (#595) * style: 目录样式gh * style: J_new * feat: advListFilterTabs * feat: nav-copyto * enh: 助记码全拼 * enh: 地图搜索选点 * enh: topnav * list pn * .form-line.v33 * open TAG * KVS addShutdownHook * fix: #594 --------- Co-authored-by: devezhao <zhaofang123@gmail.com> Function: renderTopNav2 File: src/main/java/com/rebuild/core/configuration/NavBuilder.java Repository: getrebuild/rebuild Fixed Code: static String renderTopNav2(HttpServletRequest request) { String topNav = KVStorage.getCustomValue("TopNav32"); if (!JSONUtils.wellFormat(topNav)) return StringUtils.EMPTY; JSONArray sets = JSON.parseArray(topNav); if (sets.isEmpty()) return StringUtils.EMPTY; final ID user = AppUtils.getRequestUser(request); final boolean isAdmin = UserHelper.isAdmin(user); final Object[][] alls = instance.getAllConfig(null, TYPE_NAV); StringBuilder topNavHtml = new StringBuilder(); for (Object nd : sets) { JSONArray ndAnd = (JSONArray) nd; String nav = ndAnd.getString(0); String dash = ndAnd.getString(1); ID useNav = ID.isId(nav) ? ID.valueOf(nav) : null; if (useNav == null) continue; for (Object[] d : alls) { if (!useNav.equals(d[0])) continue; // 管理员、有共享的 if ((isAdmin && RoleService.ADMIN_ROLE.equals(d[5])) || instance.isShareTo((String) d[1], user)) { String url = AppUtils.getContextPath("/app/home?n=" + useNav); if (ID.isId(dash)) url += "&d=" + dash; String name = StringUtils.defaultIfBlank((String) d[4], Language.L("未命名")); topNavHtml.append( String.format("<li class=\"nav-item\" data-id=\"%s\"><a class=\"nav-link text-ellipsis\" href=\"%s\">%s</a></li>", useNav, url, name)); break; } } } return topNavHtml.toString(); }
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
renderTopNav2
src/main/java/com/rebuild/core/configuration/NavBuilder.java
c9474f84e5f376dd2ade2078e3039961a9425da7
1
Analyze the following code function for security vulnerabilities
public void setLocation(String location) { this.location = location; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLocation File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setLocation
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsFloatEdgeCase09() throws Exception { String input = "-1e10000000"; Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS) .readValue(input); assertEquals(0, value.getSeconds()); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2018-1000873 - Severity: MEDIUM - CVSS Score: 4.3 Description: Avoid latency problems converting decimal to time. Fixes https://github.com/FasterXML/jackson-databind/issues/2141 Function: testDeserializationAsFloatEdgeCase09 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java Repository: FasterXML/jackson-modules-java8 Fixed Code: @Test(timeout = 100) public void testDeserializationAsFloatEdgeCase09() throws Exception { String input = "-1e10000000"; Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS) .readValue(input); assertEquals(0, value.getSeconds()); }
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsFloatEdgeCase09
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
1
Analyze the following code function for security vulnerabilities
public void putData(String key, String val) { if (this.data == null) { this.data = new HashMap<>(); } this.data.put(key, val); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putData File: src/gribbit/auth/User.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
putData
src/gribbit/auth/User.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
public boolean getCertTypeInUse() { return certTypeInUse; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCertTypeInUse File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getCertTypeInUse
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override boolean check(MapAttributeConfig c1, MapAttributeConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getName(), c2.getName()) && nullSafeEqual(c1.getExtractor(), c2.getExtractor()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@GuardedBy("mLock") @VisibleForTesting void saveBaseStateLocked() { final AtomicFile file = getBaseStateFile(); if (DEBUG || DEBUG_REBOOT) { Slog.d(TAG, "Saving to " + file.getBaseFile()); } FileOutputStream outs = null; try { outs = file.startWrite(); // Write to XML TypedXmlSerializer out = Xml.resolveSerializer(outs); out.startDocument(null, true); out.startTag(null, TAG_ROOT); // Body. writeTagValue(out, TAG_LAST_RESET_TIME, mRawLastResetTime); // Epilogue. out.endTag(null, TAG_ROOT); out.endDocument(); // Close. file.finishWrite(outs); } catch (IOException e) { Slog.e(TAG, "Failed to write to file " + file.getBaseFile(), e); file.failWrite(outs); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveBaseStateLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40092
MEDIUM
5.5
android
saveBaseStateLocked
services/core/java/com/android/server/pm/ShortcutService.java
a5e55363e69b3c84d3f4011c7b428edb1a25752c
0
Analyze the following code function for security vulnerabilities
@Override public void onSearchComplete(AjaxRequestTarget target, List<QueryHit> hits) { newSearchResult(target, hits); resizeWindow(target); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSearchComplete File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-434" ]
CVE-2021-21245
HIGH
7.5
theonedev/onedev
onSearchComplete
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
protected void assertElementContainsNoOrWhitespaceOnlyTextNodes(Node anXmlElement) { Node textNodeWithNonWhitespace = null; NodeList childNodes = anXmlElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { if (Element.TEXT_NODE == childNodes.item(i).getNodeType()) { Node textNode = childNodes.item(i); String textWithoutWhitespace = textNode.getTextContent().replaceAll("\\s", ""); if (textWithoutWhitespace.length() > 0) { textNodeWithNonWhitespace = textNode; break; } } } if (textNodeWithNonWhitespace != null) { throw new IllegalStateException( "Cannot add sub-element to element <" + anXmlElement.getNodeName() + "> that contains a Text node that isn't purely whitespace: " + textNodeWithNonWhitespace); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assertElementContainsNoOrWhitespaceOnlyTextNodes File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
assertElementContainsNoOrWhitespaceOnlyTextNodes
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
private IDelegate getDelegate(final Element element, final String attribute, final boolean mustFind) throws GameParseException { return getValidatedObject(element, attribute, mustFind, data.getDelegateList()::getDelegate, "delegate"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDelegate File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
getDelegate
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
static void init() { try { impl = SnappyLoader.loadSnappyApi(); } catch (Exception e) { throw new ExceptionInInitializerError(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init 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
init
src/main/java/org/xerial/snappy/Snappy.java
d0042551e4a3509a725038eb9b2ad1f683674d94
0
Analyze the following code function for security vulnerabilities
@Override public String getUserIP() { return delegatedUserIPHolder.get(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserIP File: modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2020-5206
MEDIUM
6.4
opencast
getUserIP
modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
b157e1fb3b35991ca7bf59f0730329fbe7ce82e8
0
Analyze the following code function for security vulnerabilities
@Override public void keepScreenOnStartedLw() { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: keepScreenOnStartedLw File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
keepScreenOnStartedLw
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
int broadcastIntentInPackage(String packageName, int uid, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle resultExtras, String requiredPermission, Bundle options, boolean serialized, boolean sticky, int userId) { synchronized(this) { intent = verifyBroadcastLocked(intent); final long origId = Binder.clearCallingIdentity(); String[] requiredPermissions = requiredPermission == null ? null : new String[] {requiredPermission}; int res = broadcastIntentLocked(null, packageName, intent, resolvedType, resultTo, resultCode, resultData, resultExtras, requiredPermissions, AppOpsManager.OP_NONE, options, serialized, sticky, -1, uid, userId); Binder.restoreCallingIdentity(origId); return res; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastIntentInPackage File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
broadcastIntentInPackage
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
private String jsonbFunction( String functionName, String... params ) { return String.join( "", functionName, "(", String.join( ",", "prg.sharing", Arrays.stream( params ) .map( this::withQuotes ) .collect( joining( "," ) ) ), ")" ); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2022-24848 - Severity: MEDIUM - CVSS Score: 6.5 Description: Merge pull request from GHSA-52vp-f7hj-cj92 Function: jsonbFunction File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java Repository: dhis2/dhis2-core Fixed Code: private String jsonbFunction( String functionName, String... params ) { return String.join( "", functionName, "(", String.join( ",", "prg.sharing", Arrays.stream( params ) .map( SqlUtils::singleQuote ) .collect( joining( "," ) ) ), ")" ); }
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
jsonbFunction
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
3b245d04a58b78f0dc9bae8559f36ee4ca36dfac
1
Analyze the following code function for security vulnerabilities
@Override public int charWidth(Object nativeFont, char ch) { this.tmpchar[0] = ch; float w = (nativeFont == null ? this.defaultFont : (Paint) ((NativeFont) nativeFont).font).measureText(this.tmpchar, 0, 1); if (w - (int) w > 0) { return (int) (w + 1); } return (int) w; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: charWidth File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
charWidth
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public float readFloat() throws IOException { return primitiveTypes.readFloat(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFloat File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readFloat
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
public List<Post> getSimilarPosts(Post showPost, Pager pager) { List<Post> similarquestions = Collections.emptyList(); if (!showPost.isReply()) { String likeTxt = Utils.stripAndTrim((showPost.getTitle() + " " + showPost.getBody())); if (likeTxt.length() > 1000) { // read object on the server to prevent "URI too long" errors similarquestions = pc.findSimilar(showPost.getType(), showPost.getId(), new String[]{"properties.title", "properties.body", "properties.tags"}, "id:" + showPost.getId(), pager); } else if (!StringUtils.isBlank(likeTxt)) { similarquestions = pc.findSimilar(showPost.getType(), showPost.getId(), new String[]{"properties.title", "properties.body", "properties.tags"}, likeTxt, pager); } } return similarquestions; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSimilarPosts 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
getSimilarPosts
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@CalledByNative public boolean doTopControlsShrinkBlinkSize() { return mTopControlsShrinkBlinkSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doTopControlsShrinkBlinkSize File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
doTopControlsShrinkBlinkSize
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
public HttpServerRequest vertxServerRequest() { return request; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: vertxServerRequest 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
vertxServerRequest
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 void execute(String sql, Connection connection) throws SQLException { Statement stmt = null; try { stmt = connection.createStatement(); stmt.execute(sql); } finally { if (stmt != null) { stmt.close(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: execute File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
execute
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
public void selectPopupMenuItems(int[] indices) { if (mNativeContentViewCore != 0) { nativeSelectPopupMenuItems(mNativeContentViewCore, mNativeSelectPopupSourceFrame, indices); } mNativeSelectPopupSourceFrame = 0; mSelectPopup = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectPopupMenuItems File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
selectPopupMenuItems
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
void onCallAdded(Call call);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCallAdded 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
onCallAdded
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
protected Optional<String> parseIssuerClaim(JwtClaims claims) { return parseClaimString(claims, JwtClaims.ISSUER); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseIssuerClaim File: security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java Repository: micronaut-projects/micronaut-security The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-36820
MEDIUM
6.5
micronaut-projects/micronaut-security
parseIssuerClaim
security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
9728b925221a0d87798ccf250657a3c214b7e980
0
Analyze the following code function for security vulnerabilities
private Configuration getLastReportedConfiguration() { return mLastReportedConfiguration.getMergedConfiguration(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastReportedConfiguration 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
getLastReportedConfiguration
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0