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 static DiagramFileHandler createInstance(DiagramHandler diagramHandler, File file) { return new DiagramFileHandler(diagramHandler, file); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createInstance File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java Repository: umlet The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000548
MEDIUM
6.8
umlet
createInstance
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
0
Analyze the following code function for security vulnerabilities
private void loginCurrentUser(HttpServletRequest request, HttpSession session, UsernamePassword usernamePassword) { session.invalidate(); session = request.getSession(true); session.setAttribute(CREDENTIALS_KEY, usernamePassword); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loginCurrentUser File: server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java Repository: gocd The code follows secure coding practices.
[ "CWE-200" ]
CVE-2021-43287
MEDIUM
5
gocd
loginCurrentUser
server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java
41abc210ac4e8cfa184483c9ff1c0cc04fb3511c
0
Analyze the following code function for security vulnerabilities
public void setComment(String comment) { getDoc().setComment(comment); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setComment File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
setComment
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public List<String> getTriggerGroupsToNeverDelete() { return Collections.unmodifiableList(triggerGroupsToDelete); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTriggerGroupsToNeverDelete File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
getTriggerGroupsToNeverDelete
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
private void migrate45(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Builds.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) element.element("triggerId").detach(); dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate45 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
migrate45
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
public void setTestPssMode(boolean enabled) { synchronized (this) { mTestPssMode = enabled; if (enabled) { // Whenever we enable the mode, we want to take a snapshot all of current // process mem use. requestPssAllProcsLocked(SystemClock.uptimeMillis(), true, true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTestPssMode File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
setTestPssMode
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public boolean isProfileOwner(@Nullable ComponentName who, int userId) { final ComponentName profileOwner = mInjector.binderWithCleanCallingIdentity( () -> getProfileOwnerAsUser(userId)); return who != null && who.equals(profileOwner); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProfileOwner File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
isProfileOwner
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@GetMapping("/callback/{serverId}") @ApiOperation(value = "OAuth2.0授权完成后回调", hidden = true) public RedirectView callback(@RequestParam(defaultValue = "/") String redirect, @PathVariable String serverId, @RequestParam String code, @RequestParam String state, HttpServletRequest request, HttpSession session) throws UnsupportedEncodingException { try { String cachedState = (String) session.getAttribute(STATE_SESSION_KEY); // if (!state.equals(cachedState)) throw new BusinessException("state error"); oAuth2RequestService.doEvent(serverId, new OAuth2CodeAuthBeforeEvent(code, state, request::getParameter)); return new RedirectView(URLDecoder.decode(redirect, "UTF-8")); } finally { session.removeAttribute(STATE_SESSION_KEY); } }
Vulnerability Classification: - CWE: CWE-352 - CVE: CVE-2018-20595 - Severity: MEDIUM - CVSS Score: 6.8 Description: fix #107 csrf Function: callback File: hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-web/src/main/java/org/hswebframework/web/authorization/oauth2/controller/OAuth2ClientController.java Repository: hs-web/hsweb-framework Fixed Code: @GetMapping("/callback/{serverId}") @ApiOperation(value = "OAuth2.0授权完成后回调", hidden = true) public RedirectView callback(@RequestParam(defaultValue = "/") String redirect, @PathVariable String serverId, @RequestParam String code, @RequestParam String state, HttpServletRequest request, HttpSession session) throws UnsupportedEncodingException { try { String cachedState = (String) session.getAttribute(STATE_SESSION_KEY); if (!state.equals(cachedState)) { throw new BusinessException(ErrorType.STATE_ERROR.name()); } oAuth2RequestService.doEvent(serverId, new OAuth2CodeAuthBeforeEvent(code, state, request::getParameter)); return new RedirectView(URLDecoder.decode(redirect, "UTF-8")); } finally { session.removeAttribute(STATE_SESSION_KEY); } }
[ "CWE-352" ]
CVE-2018-20595
MEDIUM
6.8
hs-web/hsweb-framework
callback
hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-web/src/main/java/org/hswebframework/web/authorization/oauth2/controller/OAuth2ClientController.java
40929e9b0d336a26281a5ed2e0e721d54dd8d2f2
1
Analyze the following code function for security vulnerabilities
@Override public void scheduleAppGcs() { synchronized (mAppProfiler.mProfilerLock) { mAppProfiler.scheduleAppGcsLPf(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scheduleAppGcs File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
scheduleAppGcs
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private void finishBarAnimations() { if (mStatusBarView != null) { mStatusBarView.getBarTransitions().finishAnimations(); } if (mNavigationBar != null) { mNavigationBar.finishBarAnimations(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishBarAnimations File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
finishBarAnimations
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Test public void parseQuery2TSUIDType() throws Exception { HttpQuery query = NettyMocks.getQuery(tsdb, "/api/query?start=1h-ago&tsuid=sum:010101&tsuid=avg:020202"); TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions); assertNotNull(tsq); assertEquals("1h-ago", tsq.getStart()); assertNotNull(tsq.getQueries()); assertEquals(2, tsq.getQueries().size()); TSSubQuery sub = tsq.getQueries().get(0); assertNotNull(sub); assertEquals("sum", sub.getAggregator()); assertEquals(1, sub.getTsuids().size()); assertEquals("010101", sub.getTsuids().get(0)); sub = tsq.getQueries().get(1); assertNotNull(sub); assertEquals("avg", sub.getAggregator()); assertEquals(1, sub.getTsuids().size()); assertEquals("020202", sub.getTsuids().get(0)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseQuery2TSUIDType File: test/tsd/TestQueryRpc.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
parseQuery2TSUIDType
test/tsd/TestQueryRpc.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
void updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) { final DisplayContent displayContent = changingTarget.getDisplayContent(); if (displayContent == null) { return; } final DisplayInfo displayInfo = displayContent.getDisplayInfo(); final int dw = displayInfo.logicalWidth; final int dh = displayInfo.logicalHeight; WindowState target = mWallpaperTarget; if (target != null) { if (target.mWallpaperX >= 0) { mLastWallpaperX = target.mWallpaperX; } else if (changingTarget.mWallpaperX >= 0) { mLastWallpaperX = changingTarget.mWallpaperX; } if (target.mWallpaperY >= 0) { mLastWallpaperY = target.mWallpaperY; } else if (changingTarget.mWallpaperY >= 0) { mLastWallpaperY = changingTarget.mWallpaperY; } if (target.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { mLastWallpaperDisplayOffsetX = target.mWallpaperDisplayOffsetX; } else if (changingTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) { mLastWallpaperDisplayOffsetX = changingTarget.mWallpaperDisplayOffsetX; } if (target.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { mLastWallpaperDisplayOffsetY = target.mWallpaperDisplayOffsetY; } else if (changingTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) { mLastWallpaperDisplayOffsetY = changingTarget.mWallpaperDisplayOffsetY; } if (target.mWallpaperXStep >= 0) { mLastWallpaperXStep = target.mWallpaperXStep; } else if (changingTarget.mWallpaperXStep >= 0) { mLastWallpaperXStep = changingTarget.mWallpaperXStep; } if (target.mWallpaperYStep >= 0) { mLastWallpaperYStep = target.mWallpaperYStep; } else if (changingTarget.mWallpaperYStep >= 0) { mLastWallpaperYStep = changingTarget.mWallpaperYStep; } } for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { WindowList windows = mWallpaperTokens.get(curTokenNdx).windows; for (int wallpaperNdx = windows.size() - 1; wallpaperNdx >= 0; wallpaperNdx--) { WindowState wallpaper = windows.get(wallpaperNdx); if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) { WindowStateAnimator winAnimator = wallpaper.mWinAnimator; winAnimator.computeShownFrameLocked(); // No need to lay out the windows - we can just set the wallpaper position // directly. winAnimator.setWallpaperOffset(wallpaper.mShownFrame); // We only want to be synchronous with one wallpaper. sync = false; } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateWallpaperOffsetLocked 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
updateWallpaperOffsetLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private Object read(InputStream in, ClassLoader classLoader) throws IOException { try { ObjectInputStream objectInputStream = newObjectInputStream(classLoader, in); if (shared) { return objectInputStream.readObject(); } return objectInputStream.readUnshared(); } catch (ClassNotFoundException e) { throw new HazelcastSerializationException(e); } }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2016-10750 - Severity: MEDIUM - CVSS Score: 6.8 Description: Add basic protection against untrusted deserialization. Function: read File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java Repository: hazelcast Fixed Code: private Object read(InputStream in, ClassLoader classLoader) throws IOException { try { ObjectInputStream objectInputStream = newObjectInputStream(classLoader, classFilter, in); if (shared) { return objectInputStream.readObject(); } return objectInputStream.readUnshared(); } catch (ClassNotFoundException e) { throw new HazelcastSerializationException(e); } }
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
read
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
1
Analyze the following code function for security vulnerabilities
void setBooting(boolean booting) { mAmInternal.setBooting(booting); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBooting File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
setBooting
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private int startActivityAsUser(IApplicationThread caller, String callingPackage, @Nullable String callingFeatureId, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId, boolean validateIncomingUser) { assertPackageMatchesCallingUid(callingPackage); enforceNotIsolatedCaller("startActivityAsUser"); if (Process.isSdkSandboxUid(Binder.getCallingUid())) { SdkSandboxManagerLocal sdkSandboxManagerLocal = LocalManagerRegistry.getManager( SdkSandboxManagerLocal.class); if (sdkSandboxManagerLocal == null) { throw new IllegalStateException("SdkSandboxManagerLocal not found when starting" + " an activity from an SDK sandbox uid."); } sdkSandboxManagerLocal.enforceAllowedToStartActivity(intent); } userId = getActivityStartController().checkTargetUser(userId, validateIncomingUser, Binder.getCallingPid(), Binder.getCallingUid(), "startActivityAsUser"); // TODO: Switch to user app stacks here. return getActivityStartController().obtainStarter(intent, "startActivityAsUser") .setCaller(caller) .setCallingPackage(callingPackage) .setCallingFeatureId(callingFeatureId) .setResolvedType(resolvedType) .setResultTo(resultTo) .setResultWho(resultWho) .setRequestCode(requestCode) .setStartFlags(startFlags) .setProfilerInfo(profilerInfo) .setActivityOptions(bOptions) .setUserId(userId) .execute(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityAsUser File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
startActivityAsUser
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private SecurityPathMatches buildSecurityConstraints() { SecurityPathMatches.Builder builder = SecurityPathMatches.builder(deployment.getDeploymentInfo()); final Set<String> urlPatterns = new HashSet<>(); for (SecurityConstraint constraint : deployment.getDeploymentInfo().getSecurityConstraints()) { builder.addSecurityConstraint(constraint); for (WebResourceCollection webResources : constraint.getWebResourceCollections()) { urlPatterns.addAll(webResources.getUrlPatterns()); } } for (final ServletInfo servlet : deployment.getDeploymentInfo().getServlets().values()) { final ServletSecurityInfo securityInfo = servlet.getServletSecurityInfo(); if (securityInfo != null) { final Set<String> mappings = new HashSet<>(servlet.getMappings()); mappings.removeAll(urlPatterns); if (!mappings.isEmpty()) { final Set<String> methods = new HashSet<>(); for (HttpMethodSecurityInfo method : securityInfo.getHttpMethodSecurityInfo()) { methods.add(method.getMethod()); if (method.getRolesAllowed().isEmpty() && method.getEmptyRoleSemantic() == EmptyRoleSemantic.PERMIT) { //this is an implict allow continue; } SecurityConstraint newConstraint = new SecurityConstraint() .addRolesAllowed(method.getRolesAllowed()) .setTransportGuaranteeType(method.getTransportGuaranteeType()) .addWebResourceCollection(new WebResourceCollection().addUrlPatterns(mappings) .addHttpMethod(method.getMethod())); builder.addSecurityConstraint(newConstraint); } //now add the constraint, unless it has all default values and method constrains where specified if (!securityInfo.getRolesAllowed().isEmpty() || securityInfo.getEmptyRoleSemantic() != EmptyRoleSemantic.PERMIT || methods.isEmpty()) { SecurityConstraint newConstraint = new SecurityConstraint() .setEmptyRoleSemantic(securityInfo.getEmptyRoleSemantic()) .addRolesAllowed(securityInfo.getRolesAllowed()) .setTransportGuaranteeType(securityInfo.getTransportGuaranteeType()) .addWebResourceCollection(new WebResourceCollection().addUrlPatterns(mappings) .addHttpMethodOmissions(methods)); builder.addSecurityConstraint(newConstraint); } } } } return builder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildSecurityConstraints File: servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
buildSecurityConstraints
servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
public String getMessage() { return message.getExpressionString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMessage File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getMessage
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public String getUniquePageName(String space) throws XWikiException { return this.xwiki.getUniquePageName(space, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUniquePageName 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
getUniquePageName
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
public void addEntry(LocalDocumentReference reference, String entryName, int action) { XarEntry entry = new XarEntry(reference, entryName, action); putEntry(entry); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addEntry 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
addEntry
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
private void askForContactsPermissions() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (checkSelfPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { if (mRequestedContactsPermission.compareAndSet(false, true)) { if (shouldShowRequestPermissionRationale(Manifest.permission.READ_CONTACTS)) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(R.string.sync_with_contacts); builder.setMessage(R.string.sync_with_contacts_long); builder.setPositiveButton(R.string.next, (dialog, which) -> requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS)); builder.setOnDismissListener(dialog -> requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS)); builder.create().show(); } else { requestPermissions(new String[]{Manifest.permission.READ_CONTACTS}, REQUEST_SYNC_CONTACTS); } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: askForContactsPermissions File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
askForContactsPermissions
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public Mono<ActionExecutionResult> executeCommon(APIConnection apiConnection, DatasourceConfiguration datasourceConfiguration, ActionConfiguration actionConfiguration, List<Map.Entry<String, String>> insertedParams) { // Initializing object for error condition ActionExecutionResult errorResult = new ActionExecutionResult(); initUtils.initializeResponseWithError(errorResult); // Initializing request URL String url = initUtils.initializeRequestUrl(actionConfiguration, datasourceConfiguration); Boolean encodeParamsToggle = headerUtils.isEncodeParamsToggleEnabled(actionConfiguration); URI uri; try { uri = uriUtils.createUriWithQueryParams(actionConfiguration, datasourceConfiguration, url, encodeParamsToggle); } catch (URISyntaxException e) { ActionExecutionRequest actionExecutionRequest = RequestCaptureFilter.populateRequestFields(actionConfiguration, null, insertedParams, objectMapper); actionExecutionRequest.setUrl(url); errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage(e)); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } ActionExecutionRequest actionExecutionRequest = RequestCaptureFilter.populateRequestFields(actionConfiguration, uri, insertedParams, objectMapper); try { if (uriUtils.isHostDisallowed(uri)) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Host not allowed.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } } catch (UnknownHostException e) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Unknown host.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } WebClient.Builder webClientBuilder = triggerUtils.getWebClientBuilder(actionConfiguration, datasourceConfiguration); String reqContentType = headerUtils.getRequestContentType(actionConfiguration, datasourceConfiguration); /* Check for content type */ final String contentTypeError = headerUtils.verifyContentType(actionConfiguration.getHeaders()); if (contentTypeError != null) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Invalid value for Content-Type.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } HttpMethod httpMethod = actionConfiguration.getHttpMethod(); if (httpMethod == null) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("HTTPMethod must be set.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } if (HttpMethod.POST.equals(httpMethod)) { /** * For content-type=application/json re-formatting is required. * Ref: https://graphql.org/learn/serving-over-http/#post-request * * Graphql reference doc also mentions that content-type=application/graphql does not require any * re-formatting. * Ref: https://graphql.org/learn/serving-over-http/#post-request * * On searching over the web I also found that there are some custom content-type in use like * `application/graphql+json` or `application/graphql-json` that expect the data in the same format * as is for `application/json`. Hence, the current check assumes that any content type that differs * from `application/graphql` would expect the data in the same format as for `application/json` */ if (!ApiContentType.GRAPHQL.getValue().equals(reqContentType)) { /** * When a GraphQL request is sent using HTTP POST method, then the request body needs to be in the * following format: * { * "query": "... graphql query body ...", * "variables": {"var1": val1, "var2": val2 ...}, * "operationName": "name of operation" // only required if multiple operations are defined in a * single query body * } * Ref: https://graphql.org/learn/serving-over-http/ */ try { actionConfiguration.setBody(convertToGraphQLPOSTBodyFormat(actionConfiguration)); } catch (AppsmithPluginException e) { return Mono.error(e); } } } else if (HttpMethod.GET.equals(httpMethod)) { /** * When a GraphQL request is sent using GET method, the GraphQL body and variables are sent as part of * query parameters in the URL. * Ref: https://graphql.org/learn/serving-over-http/ */ List<Property> additionalQueryParams = getGraphQLQueryParamsForBodyAndVariables(actionConfiguration); uri = uriUtils.addQueryParamsToURI(uri, additionalQueryParams, encodeParamsToggle); } else { /** * Only POST and GET HTTP methods are supported by GraphQL specifications. * Ref: https://graphql.org/learn/serving-over-http/ */ return Mono.error( new AppsmithPluginException( AppsmithPluginError.PLUGIN_ERROR, "Appsmith server has found an unexpected HTTP method configured with the GraphQL " + "plugin query: " + httpMethod ) ); } final RequestCaptureFilter requestCaptureFilter = new RequestCaptureFilter(objectMapper); Object requestBodyObj = dataUtils.getRequestBodyObject(actionConfiguration, reqContentType, encodeParamsToggle, httpMethod); WebClient client = triggerUtils.getWebClient(webClientBuilder, apiConnection, reqContentType, objectMapper, EXCHANGE_STRATEGIES, requestCaptureFilter); /* Triggering the actual REST API call */ Set<String> hintMessages = new HashSet<String>(); return triggerUtils.triggerApiCall(client, httpMethod, uri, requestBodyObj, actionExecutionRequest, objectMapper, hintMessages, errorResult, requestCaptureFilter); }
Vulnerability Classification: - CWE: CWE-918 - CVE: CVE-2022-4096 - Severity: MEDIUM - CVSS Score: 6.5 Description: fix: Better support for disallowed hosts (#16842) Function: executeCommon File: app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java Repository: appsmithorg/appsmith Fixed Code: public Mono<ActionExecutionResult> executeCommon(APIConnection apiConnection, DatasourceConfiguration datasourceConfiguration, ActionConfiguration actionConfiguration, List<Map.Entry<String, String>> insertedParams) { // Initializing object for error condition ActionExecutionResult errorResult = new ActionExecutionResult(); initUtils.initializeResponseWithError(errorResult); // Initializing request URL String url = initUtils.initializeRequestUrl(actionConfiguration, datasourceConfiguration); Boolean encodeParamsToggle = headerUtils.isEncodeParamsToggleEnabled(actionConfiguration); URI uri; try { uri = uriUtils.createUriWithQueryParams(actionConfiguration, datasourceConfiguration, url, encodeParamsToggle); } catch (URISyntaxException e) { ActionExecutionRequest actionExecutionRequest = RequestCaptureFilter.populateRequestFields(actionConfiguration, null, insertedParams, objectMapper); actionExecutionRequest.setUrl(url); errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage(e)); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } ActionExecutionRequest actionExecutionRequest = RequestCaptureFilter.populateRequestFields(actionConfiguration, uri, insertedParams, objectMapper); WebClient.Builder webClientBuilder = triggerUtils.getWebClientBuilder(actionConfiguration, datasourceConfiguration); String reqContentType = headerUtils.getRequestContentType(actionConfiguration, datasourceConfiguration); /* Check for content type */ final String contentTypeError = headerUtils.verifyContentType(actionConfiguration.getHeaders()); if (contentTypeError != null) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Invalid value for Content-Type.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } HttpMethod httpMethod = actionConfiguration.getHttpMethod(); if (httpMethod == null) { errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("HTTPMethod must be set.")); errorResult.setRequest(actionExecutionRequest); return Mono.just(errorResult); } if (HttpMethod.POST.equals(httpMethod)) { /** * For content-type=application/json re-formatting is required. * Ref: https://graphql.org/learn/serving-over-http/#post-request * * Graphql reference doc also mentions that content-type=application/graphql does not require any * re-formatting. * Ref: https://graphql.org/learn/serving-over-http/#post-request * * On searching over the web I also found that there are some custom content-type in use like * `application/graphql+json` or `application/graphql-json` that expect the data in the same format * as is for `application/json`. Hence, the current check assumes that any content type that differs * from `application/graphql` would expect the data in the same format as for `application/json` */ if (!ApiContentType.GRAPHQL.getValue().equals(reqContentType)) { /** * When a GraphQL request is sent using HTTP POST method, then the request body needs to be in the * following format: * { * "query": "... graphql query body ...", * "variables": {"var1": val1, "var2": val2 ...}, * "operationName": "name of operation" // only required if multiple operations are defined in a * single query body * } * Ref: https://graphql.org/learn/serving-over-http/ */ try { actionConfiguration.setBody(convertToGraphQLPOSTBodyFormat(actionConfiguration)); } catch (AppsmithPluginException e) { return Mono.error(e); } } } else if (HttpMethod.GET.equals(httpMethod)) { /** * When a GraphQL request is sent using GET method, the GraphQL body and variables are sent as part of * query parameters in the URL. * Ref: https://graphql.org/learn/serving-over-http/ */ List<Property> additionalQueryParams = getGraphQLQueryParamsForBodyAndVariables(actionConfiguration); uri = uriUtils.addQueryParamsToURI(uri, additionalQueryParams, encodeParamsToggle); } else { /** * Only POST and GET HTTP methods are supported by GraphQL specifications. * Ref: https://graphql.org/learn/serving-over-http/ */ return Mono.error( new AppsmithPluginException( AppsmithPluginError.PLUGIN_ERROR, "Appsmith server has found an unexpected HTTP method configured with the GraphQL " + "plugin query: " + httpMethod ) ); } final RequestCaptureFilter requestCaptureFilter = new RequestCaptureFilter(objectMapper); Object requestBodyObj = dataUtils.getRequestBodyObject(actionConfiguration, reqContentType, encodeParamsToggle, httpMethod); WebClient client = triggerUtils.getWebClient(webClientBuilder, apiConnection, reqContentType, objectMapper, EXCHANGE_STRATEGIES, requestCaptureFilter); /* Triggering the actual REST API call */ Set<String> hintMessages = new HashSet<>(); return triggerUtils.triggerApiCall(client, httpMethod, uri, requestBodyObj, actionExecutionRequest, objectMapper, hintMessages, errorResult, requestCaptureFilter); }
[ "CWE-918" ]
CVE-2022-4096
MEDIUM
6.5
appsmithorg/appsmith
executeCommon
app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java
769719ccfe667f059fe0b107a19ec9feb90f2e40
1
Analyze the following code function for security vulnerabilities
public static boolean shouldBeInvisible(@Nullable String path) { if (path == null) return false; final Matcher m = PATTERN_INVISIBLE.matcher(path); return m.matches(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldBeInvisible 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
shouldBeInvisible
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
public @CheckForNull Item getItemByFullName(String fullName) { return getItemByFullName(fullName,Item.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getItemByFullName 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
getItemByFullName
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
void initializeHdmiState() { boolean plugged = false; // watch for HDMI plug messages if the hdmi switch exists if (new File("/sys/devices/virtual/switch/hdmi/state").exists()) { mHDMIObserver.startObserving("DEVPATH=/devices/virtual/switch/hdmi"); final String filename = "/sys/class/switch/hdmi/state"; FileReader reader = null; try { reader = new FileReader(filename); char[] buf = new char[15]; int n = reader.read(buf); if (n > 1) { plugged = 0 != Integer.parseInt(new String(buf, 0, n-1)); } } catch (IOException ex) { Slog.w(TAG, "Couldn't read hdmi state from " + filename + ": " + ex); } catch (NumberFormatException ex) { Slog.w(TAG, "Couldn't read hdmi state from " + filename + ": " + ex); } finally { if (reader != null) { try { reader.close(); } catch (IOException ex) { } } } } // This dance forces the code in setHdmiPlugged to run. // Always do this so the sticky intent is stuck (to false) if there is no hdmi. mHdmiPlugged = !plugged; setHdmiPlugged(!mHdmiPlugged); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeHdmiState 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
initializeHdmiState
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
@Override protected Object createFilter() { List<XWikiDocumentFilter> filters = new ArrayList<>(this.children.size() + 1); for (EntityOutputFilterStream<?> child : this.children) { filters.add((XWikiDocumentFilter) child.getFilter()); } filters.add(this); this.filter = new XWikiDocumentFilterCollection(filters) { @Override public void beginWikiClass(FilterEventParameters parameters) throws FilterException { if (!objectFilter.isEnabled()) { classFilter.enable(); } super.beginWikiClass(parameters); } @Override public void endWikiClass(FilterEventParameters parameters) throws FilterException { super.endWikiClass(parameters); classFilter.disable(); } @Override public void beginWikiObject(String name, FilterEventParameters parameters) throws FilterException { objectFilter.enable(); super.beginWikiObject(name, parameters); } @Override public void endWikiObject(String name, FilterEventParameters parameters) throws FilterException { super.endWikiObject(name, parameters); objectFilter.disable(); } @Override public void onWikiAttachment(String name, InputStream content, Long size, FilterEventParameters parameters) throws FilterException { attachmentFilter.enable(); super.onWikiAttachment(name, content, size, parameters); attachmentFilter.disable(); } }; if (this.contentListener != null) { // Inject listener for the document content events return this.filterManager.createCompositeFilter(this.contentListener, this.filter); } else { return this.filter; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createFilter File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
createFilter
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
private UserManager getUserManager() { if (mUserManager == null) { mUserManager = UserManager.get(mContext); } return mUserManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserManager File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
getUserManager
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public boolean foundRoot() { return root != null && rootFound != null && rootFound.booleanValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: foundRoot File: src/main/java/org/olat/fileresource/types/FileResource.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
foundRoot
src/main/java/org/olat/fileresource/types/FileResource.java
699490be8e931af0ef1f135c55384db1f4232637
0
Analyze the following code function for security vulnerabilities
public static short toShort(@Nullable String s) throws SQLException { if (s != null) { try { s = s.trim(); return Short.parseShort(s); } catch (NumberFormatException e) { try { BigDecimal n = new BigDecimal(s); BigInteger i = n.toBigInteger(); int gt = i.compareTo(SHORTMAX); int lt = i.compareTo(SHORTMIN); if (gt > 0 || lt < 0) { throw new PSQLException(GT.tr("Bad value for type {0} : {1}", "short", s), PSQLState.NUMERIC_VALUE_OUT_OF_RANGE); } return i.shortValue(); } catch (NumberFormatException ne) { throw new PSQLException(GT.tr("Bad value for type {0} : {1}", "short", s), PSQLState.NUMERIC_VALUE_OUT_OF_RANGE); } } } return 0; // SQL NULL }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toShort File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
toShort
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public String getParamTitle() { return m_paramTitle; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParamTitle File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
getParamTitle
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public void onLockedNotificationImportanceChange(OnDismissAction dismissAction) { mLeaveOpenOnKeyguardHide = true; dismissKeyguardThenExecute(dismissAction, true /* afterKeyguardGone */); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onLockedNotificationImportanceChange File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onLockedNotificationImportanceChange
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private void realDownloadWithMultiConnectionFromBeginning(final long totalLength, final int connectionCount) throws InterruptedException { long startOffset = 0; final long eachRegion = totalLength / connectionCount; final int id = model.getId(); final List<ConnectionModel> connectionModelList = new ArrayList<>(); for (int i = 0; i < connectionCount; i++) { final long endOffset; if (i == connectionCount - 1) { // avoid float precision error endOffset = ConnectionProfile.RANGE_INFINITE; } else { // [startOffset, endOffset) endOffset = startOffset + eachRegion - 1; } final ConnectionModel connectionModel = new ConnectionModel(); connectionModel.setId(id); connectionModel.setIndex(i); connectionModel.setStartOffset(startOffset); connectionModel.setCurrentOffset(startOffset); connectionModel.setEndOffset(endOffset); connectionModelList.add(connectionModel); database.insertConnectionModel(connectionModel); startOffset += eachRegion; } model.setConnectionCount(connectionCount); database.updateConnectionCount(id, connectionCount); fetchWithMultipleConnection(connectionModelList, totalLength); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: realDownloadWithMultiConnectionFromBeginning File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
realDownloadWithMultiConnectionFromBeginning
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
public void setSendMaxConcurrentStreams(int sendMaxConcurrentStreams) { this.sendMaxConcurrentStreams = sendMaxConcurrentStreams; sendSettings(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSendMaxConcurrentStreams File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
setSendMaxConcurrentStreams
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
@Override public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme, String callingPackage, String callingFeatureId) { try { Log.startSession("TSI.gDOPA", Log.getPackageAbbreviation(callingPackage)); synchronized (mLock) { PhoneAccountHandle phoneAccountHandle = null; final UserHandle callingUserHandle = Binder.getCallingUserHandle(); long token = Binder.clearCallingIdentity(); try { phoneAccountHandle = mPhoneAccountRegistrar .getOutgoingPhoneAccountForScheme(uriScheme, callingUserHandle); } catch (Exception e) { Log.e(this, e, "getDefaultOutgoingPhoneAccount"); throw e; } finally { Binder.restoreCallingIdentity(token); } if (isCallerSimCallManager(phoneAccountHandle) || canReadPhoneState( callingPackage, callingFeatureId, "getDefaultOutgoingPhoneAccount")) { return phoneAccountHandle; } return null; } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultOutgoingPhoneAccount 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
getDefaultOutgoingPhoneAccount
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
private UserReference getCurrentUserReference(XWikiContext context) { return this.userReferenceResolver.resolve(context.getUserReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentUserReference File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-35157
MEDIUM
4.8
xwiki/xwiki-platform
getCurrentUserReference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
35e9073ffec567861e0abeea072bd97921a3decf
0
Analyze the following code function for security vulnerabilities
public static String loadFileAsString(File f) throws IOException { return loadFileAsString(f, UTF_8); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadFileAsString File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
loadFileAsString
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
@Override public void onNotificationVisibilityChanged(NotificationVisibility[] newlyVisibleKeys, NotificationVisibility[] noLongerVisibleKeys) { synchronized (mNotificationList) { for (NotificationVisibility nv : newlyVisibleKeys) { NotificationRecord r = mNotificationsByKey.get(nv.key); if (r == null) continue; r.setVisibility(true, nv.rank); nv.recycle(); } // Note that we might receive this event after notifications // have already left the system, e.g. after dismissing from the // shade. Hence not finding notifications in // mNotificationsByKey is not an exceptional condition. for (NotificationVisibility nv : noLongerVisibleKeys) { NotificationRecord r = mNotificationsByKey.get(nv.key); if (r == null) continue; r.setVisibility(false, nv.rank); nv.recycle(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNotificationVisibilityChanged File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onNotificationVisibilityChanged
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Deprecated public String getDefaultLanguage(XWikiContext xcontext) { return getDefaultLocale(xcontext).toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultLanguage 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
getDefaultLanguage
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 JSONArray remove(Object value) { this.myArrayList.remove(value); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remove 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
remove
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
final void clearFocusedActivity(ActivityRecord r) { if (mFocusedActivity == r) { ActivityStack stack = mStackSupervisor.getFocusedStack(); if (stack != null) { ActivityRecord top = stack.topActivity(); if (top != null && top.userId != mLastFocusedUserId) { mHandler.removeMessages(FOREGROUND_PROFILE_CHANGED_MSG); mHandler.sendMessage(mHandler.obtainMessage(FOREGROUND_PROFILE_CHANGED_MSG, top.userId, 0)); mLastFocusedUserId = top.userId; } } mFocusedActivity = null; EventLog.writeEvent(EventLogTags.AM_FOCUSED_ACTIVITY, -1, "NULL"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearFocusedActivity 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
clearFocusedActivity
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
public void setEndLocation(final int endLineNumber, final int endColumnNumber) { endLineNumber_ = endLineNumber; endColumnNumber_ = endColumnNumber; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEndLocation File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
setEndLocation
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
public boolean isDebugging() { return debugging; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDebugging File: samples/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
isDebugging
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
private long getPasswordExpirationLocked(ComponentName who, int userHandle, boolean parent) { long timeout = 0L; if (who != null) { ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent); return admin != null ? admin.passwordExpirationDate : timeout; } // Return the strictest policy across all participating admins. List<ActiveAdmin> admins = getActiveAdminsForLockscreenPoliciesLocked( getProfileParentUserIfRequested(userHandle, parent)); final int N = admins.size(); for (int i = 0; i < N; i++) { ActiveAdmin admin = admins.get(i); if (timeout == 0L || (admin.passwordExpirationDate != 0 && timeout > admin.passwordExpirationDate)) { timeout = admin.passwordExpirationDate; } } return timeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPasswordExpirationLocked 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
getPasswordExpirationLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public KBTemplate fetchByUuid_C_First(String uuid, long companyId, OrderByComparator<KBTemplate> orderByComparator) { List<KBTemplate> list = findByUuid_C(uuid, companyId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fetchByUuid_C_First File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
fetchByUuid_C_First
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
@OnOpen public void onOpen() { WorkbenchSplitLayoutPanel splitPanel = (WorkbenchSplitLayoutPanel)view.asWidget().getParent().getParent().getParent().getParent() .getParent().getParent().getParent().getParent().getParent().getParent().getParent(); splitPanel.setWidgetMinSize(splitPanel.getWidget(0), 500); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onOpen 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
onOpen
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
@Override public boolean shouldUpRecreateTask(IBinder token, String destAffinity) { synchronized (this) { ActivityRecord srec = ActivityRecord.forToken(token); if (srec.task != null && srec.task.stack != null) { return srec.task.stack.shouldUpRecreateTaskLocked(srec, destAffinity); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldUpRecreateTask 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
shouldUpRecreateTask
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public void startConfirmDeviceCredentialIntent(Intent intent) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "startConfirmDeviceCredentialIntent"); synchronized (this) { final long ident = Binder.clearCallingIdentity(); try { mActivityStarter.startConfirmCredentialIntent(intent); } finally { Binder.restoreCallingIdentity(ident); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startConfirmDeviceCredentialIntent File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
startConfirmDeviceCredentialIntent
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@Override public boolean enablePhoneAccount(PhoneAccountHandle accountHandle, boolean isEnabled) { try { Log.startSession("TSI.ePA"); enforceModifyPermission(); synchronized (mLock) { long token = Binder.clearCallingIdentity(); try { // enable/disable phone account return mPhoneAccountRegistrar.enablePhoneAccount(accountHandle, isEnabled); } finally { Binder.restoreCallingIdentity(token); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enablePhoneAccount 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
enablePhoneAccount
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
void handleAppCrashLocked(ProcessRecord app) { for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) { final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks; int stackNdx = stacks.size() - 1; while (stackNdx >= 0) { stacks.get(stackNdx).handleAppCrashLocked(app); stackNdx--; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleAppCrashLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
handleAppCrashLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
public Boolean getFavtagsEmailsEnabled() { return favtagsEmailsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFavtagsEmailsEnabled 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
getFavtagsEmailsEnabled
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public void setSwitchingFromSystemUserMessage(String switchingFromSystemUserMessage) { mUserController.setSwitchingFromSystemUserMessage(switchingFromSystemUserMessage); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSwitchingFromSystemUserMessage File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
setSwitchingFromSystemUserMessage
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public Object parseGroup( CodedInputStream input, ExtensionRegistryLite registry, Descriptors.FieldDescriptor field, Message defaultInstance) throws IOException { Message.Builder subBuilder = defaultInstance.newBuilderForType(); if (!field.isRepeated()) { Message originalMessage = (Message) getField(field); if (originalMessage != null) { subBuilder.mergeFrom(originalMessage); } } input.readGroup(field.getNumber(), subBuilder, registry); return subBuilder.buildPartial(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseGroup File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
parseGroup
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
0
Analyze the following code function for security vulnerabilities
public static Function<MediaPackageElement, Job> newEnrichJob(final MediaInspectionService svc) { return new Function.X<MediaPackageElement, Job>() { @Override public Job xapply(MediaPackageElement e) throws Exception { return svc.enrich(e, true); } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newEnrichJob File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
newEnrichJob
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
private boolean hasIncompatibleAccountsOrNonAdbNoLock(CallerIdentity caller, int userId, @Nullable ComponentName owner) { if (!isAdb(caller)) { return true; } wtfIfInLock(); return mInjector.binderWithCleanCallingIdentity(() -> { AccountManager am = mContext.createContextAsUser(UserHandle.of(userId), /* flags= */ 0) .getSystemService(AccountManager.class); Account[] accounts = am.getAccounts(); if (accounts.length == 0) { return false; } synchronized (getLockObject()) { if (owner == null || !isAdminTestOnlyLocked(owner, userId)) { Slogf.w(LOG_TAG, "Non test-only owner can't be installed with existing accounts."); return true; } } boolean compatible = !hasIncompatibleAccounts(userId); if (compatible) { Slogf.w(LOG_TAG, "All accounts are compatible"); } else { Slogf.e(LOG_TAG, "Found incompatible accounts"); } return !compatible; }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasIncompatibleAccountsOrNonAdbNoLock File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
hasIncompatibleAccountsOrNonAdbNoLock
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
Builder setResolvedType(String resolvedType) { mResolvedType = resolvedType; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setResolvedType File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
setResolvedType
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public SaReactorFilter addExclude(String... paths) { excludeList.addAll(Arrays.asList(paths)); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addExclude File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
addExclude
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
@Override public LoggingLevel getLoggingLevel() { return (LoggingLevel) get(PersistenceUnitProperties.LOGGING_LEVEL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLoggingLevel File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java Repository: KrailOrg/krail-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
getLoggingLevel
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { try { return toJSON(); } catch (Exception e) { throw new RuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: base/common/src/main/java/com/netscape/certsrv/account/Account.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toString
base/common/src/main/java/com/netscape/certsrv/account/Account.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public boolean grantKeyPairToApp(@Nullable ComponentName admin, @NonNull String alias, @NonNull String packageName) { throwIfParentInstance("grantKeyPairToApp"); try { return mService.setKeyGrantForApp( admin, mContext.getPackageName(), alias, packageName, true); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: grantKeyPairToApp File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
grantKeyPairToApp
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Test public void v1AuthAllowed() throws Exception { final TSDB tsdb = NettyMocks.getMockedHTTPTSDBWithAuthEnabled(AuthStatus.SUCCESS); when(tsdb.newQuery()).thenReturn(query_result); when(query_result.configureFromQuery((TSQuery)any(), anyInt())) .thenReturn(Deferred.fromResult(null)); when(query_result.runAsync()) .thenReturn(Deferred.fromResult(new DataPoints[0])); final DataPoints[] datapoints = new DataPoints[1]; datapoints[0] = new MockDataPoints().getMock(); when(query_result.runAsync()).thenReturn(Deferred.fromResult(datapoints)); final HttpQuery query = NettyMocks.postQuery(tsdb,"/api/query", "{\"start\":\"1h-ago\",\"queries\":" + "[{\"metric\":\"sys.cpu.user\",\"aggregator\":\"sum\"}]}"); NettyMocks.mockChannelFuture(query); rpc.execute(tsdb, query); final String json = query.response().getContent().toString(Charset.forName("UTF-8")); assertTrue(json.contains("\"metric\":\"system.cpu.user\"")); assertEquals(HttpResponseStatus.OK, query.response().getStatus()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: v1AuthAllowed File: test/tsd/TestQueryRpc.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
v1AuthAllowed
test/tsd/TestQueryRpc.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
@Deprecated public void setSpace(String spaces) { if (spaces != null) { DocumentReference reference = getDocumentReference(); EntityReference spaceReference = getRelativeEntityReferenceResolver().resolve(spaces, EntityType.SPACE); spaceReference = spaceReference.appendParent(getDocumentReference().getWikiReference()); setDocumentReferenceInternal( new DocumentReference(reference.getName(), new SpaceReference(spaceReference))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSpace 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
setSpace
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 boolean isCredentialsNonExpired() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCredentialsNonExpired File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-200" ]
CVE-2014-2064
MEDIUM
5
jenkinsci/jenkins
isCredentialsNonExpired
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
fbf96734470caba9364f04e0b77b0bae7293a1ec
0
Analyze the following code function for security vulnerabilities
public Class<?> checkAutoType(String typeName, Class<?> expectClass, int features) { if (typeName == null) { return null; } if (autoTypeCheckHandlers != null) { for (AutoTypeCheckHandler h : autoTypeCheckHandlers) { Class<?> type = h.handler(typeName, expectClass, features); if (type != null) { return type; } } } final int safeModeMask = Feature.SafeMode.mask; boolean safeMode = this.safeMode || (features & safeModeMask) != 0 || (JSON.DEFAULT_PARSER_FEATURE & safeModeMask) != 0; if (safeMode) { throw new JSONException("safeMode not support autoType : " + typeName); } if (typeName.length() >= 192 || typeName.length() < 3) { throw new JSONException("autoType is not support. " + typeName); } final boolean expectClassFlag; if (expectClass == null) { expectClassFlag = false; } else { long expectHash = TypeUtils.fnv1a_64(expectClass.getName()); if (expectHash == 0x90a25f5baa21529eL || expectHash == 0x2d10a5801b9d6136L || expectHash == 0xaf586a571e302c6bL || expectHash == 0xed007300a7b227c6L || expectHash == 0x295c4605fd1eaa95L || expectHash == 0x47ef269aadc650b4L || expectHash == 0x6439c4dff712ae8bL || expectHash == 0xe3dd9875a2dc5283L || expectHash == 0xe2a8ddba03e69e0dL || expectHash == 0xd734ceb4c3e9d1daL ) { expectClassFlag = false; } else { expectClassFlag = true; } } String className = typeName.replace('$', '.'); Class<?> clazz; final long h1 = (fnv1a_64_magic_hashcode ^ className.charAt(0)) * fnv1a_64_magic_prime; if (h1 == 0xaf64164c86024f1aL) { // [ throw new JSONException("autoType is not support. " + typeName); } if ((h1 ^ className.charAt(className.length() - 1)) * fnv1a_64_magic_prime == 0x9198507b5af98f0L) { throw new JSONException("autoType is not support. " + typeName); } final long h3 = (((((fnv1a_64_magic_hashcode ^ className.charAt(0)) * fnv1a_64_magic_prime) ^ className.charAt(1)) * fnv1a_64_magic_prime) ^ className.charAt(2)) * fnv1a_64_magic_prime; long fullHash = TypeUtils.fnv1a_64(className); boolean internalWhite = Arrays.binarySearch(INTERNAL_WHITELIST_HASHCODES, fullHash) >= 0; if (internalDenyHashCodes != null) { long hash = h3; for (int i = 3; i < className.length(); ++i) { hash ^= className.charAt(i); hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(internalDenyHashCodes, hash) >= 0) { throw new JSONException("autoType is not support. " + typeName); } } } if ((!internalWhite) && (autoTypeSupport || expectClassFlag)) { long hash = h3; for (int i = 3; i < className.length(); ++i) { hash ^= className.charAt(i); hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(acceptHashCodes, hash) >= 0) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); if (clazz != null) { return clazz; } } if (Arrays.binarySearch(denyHashCodes, hash) >= 0 && TypeUtils.getClassFromMapping(typeName) == null) { if (Arrays.binarySearch(acceptHashCodes, fullHash) >= 0) { continue; } throw new JSONException("autoType is not support. " + typeName); } } } clazz = TypeUtils.getClassFromMapping(typeName); if (clazz == null) { clazz = deserializers.findClass(typeName); } if (expectClass == null && clazz != null && Throwable.class.isAssignableFrom(clazz) && !autoTypeSupport) { clazz = null; } if (clazz == null) { clazz = typeMapping.get(typeName); } if (internalWhite) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); } if (clazz != null) { if (expectClass != null && clazz != java.util.HashMap.class && clazz != java.util.LinkedHashMap.class && !expectClass.isAssignableFrom(clazz)) { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } return clazz; } if (!autoTypeSupport) { long hash = h3; for (int i = 3; i < className.length(); ++i) { char c = className.charAt(i); hash ^= c; hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(denyHashCodes, hash) >= 0) { throw new JSONException("autoType is not support. " + typeName); } // white list if (Arrays.binarySearch(acceptHashCodes, hash) >= 0) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); if (clazz == null) { return expectClass; } if (expectClass != null && expectClass.isAssignableFrom(clazz)) { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } return clazz; } } } boolean jsonType = false; InputStream is = null; try { String resource = typeName.replace('.', '/') + ".class"; if (defaultClassLoader != null) { is = defaultClassLoader.getResourceAsStream(resource); } else { is = ParserConfig.class.getClassLoader().getResourceAsStream(resource); } if (is != null) { ClassReader classReader = new ClassReader(is, true); TypeCollector visitor = new TypeCollector("<clinit>", new Class[0]); classReader.accept(visitor); jsonType = visitor.hasJsonType(); } } catch (Exception e) { // skip } finally { IOUtils.close(is); } final int mask = Feature.SupportAutoType.mask; boolean autoTypeSupport = this.autoTypeSupport || (features & mask) != 0 || (JSON.DEFAULT_PARSER_FEATURE & mask) != 0; if (autoTypeSupport || jsonType || expectClassFlag) { boolean cacheClass = autoTypeSupport || jsonType; clazz = TypeUtils.loadClass(typeName, defaultClassLoader, cacheClass); } if (clazz != null) { if (jsonType) { TypeUtils.addMapping(typeName, clazz); return clazz; } if (ClassLoader.class.isAssignableFrom(clazz) // classloader is danger || javax.sql.DataSource.class.isAssignableFrom(clazz) // dataSource can load jdbc driver || javax.sql.RowSet.class.isAssignableFrom(clazz) // ) { throw new JSONException("autoType is not support. " + typeName); } if (expectClass != null) { if (expectClass.isAssignableFrom(clazz)) { TypeUtils.addMapping(typeName, clazz); return clazz; } else { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } } JavaBeanInfo beanInfo = JavaBeanInfo.build(clazz, clazz, propertyNamingStrategy); if (beanInfo.creatorConstructor != null && autoTypeSupport) { throw new JSONException("autoType is not support. " + typeName); } } if (!autoTypeSupport) { if (typeName.endsWith("Exception")) { return null; } throw new JSONException("autoType is not support. " + typeName); } if (clazz != null) { TypeUtils.addMapping(typeName, clazz); } return clazz; }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2022-25845 - Severity: MEDIUM - CVSS Score: 6.8 Description: bug fix for autotype Function: checkAutoType File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson Fixed Code: public Class<?> checkAutoType(String typeName, Class<?> expectClass, int features) { if (typeName == null) { return null; } if (autoTypeCheckHandlers != null) { for (AutoTypeCheckHandler h : autoTypeCheckHandlers) { Class<?> type = h.handler(typeName, expectClass, features); if (type != null) { return type; } } } final int safeModeMask = Feature.SafeMode.mask; boolean safeMode = this.safeMode || (features & safeModeMask) != 0 || (JSON.DEFAULT_PARSER_FEATURE & safeModeMask) != 0; if (safeMode) { throw new JSONException("safeMode not support autoType : " + typeName); } final int mask = Feature.SupportAutoType.mask; boolean autoTypeSupport = this.autoTypeSupport || (features & mask) != 0 || (JSON.DEFAULT_PARSER_FEATURE & mask) != 0; if (typeName.length() >= 192 || typeName.length() < 3) { throw new JSONException("autoType is not support. " + typeName); } final boolean expectClassFlag; if (expectClass == null) { expectClassFlag = false; } else { long expectHash = TypeUtils.fnv1a_64(expectClass.getName()); if (expectHash == 0x90a25f5baa21529eL || expectHash == 0x2d10a5801b9d6136L || expectHash == 0xaf586a571e302c6bL || expectHash == 0xed007300a7b227c6L || expectHash == 0x295c4605fd1eaa95L || expectHash == 0x47ef269aadc650b4L || expectHash == 0x6439c4dff712ae8bL || expectHash == 0xe3dd9875a2dc5283L || expectHash == 0xe2a8ddba03e69e0dL || expectHash == 0xd734ceb4c3e9d1daL ) { expectClassFlag = false; } else { expectClassFlag = true; } } String className = typeName.replace('$', '.'); Class<?> clazz; final long h1 = (fnv1a_64_magic_hashcode ^ className.charAt(0)) * fnv1a_64_magic_prime; if (h1 == 0xaf64164c86024f1aL) { // [ throw new JSONException("autoType is not support. " + typeName); } if ((h1 ^ className.charAt(className.length() - 1)) * fnv1a_64_magic_prime == 0x9198507b5af98f0L) { throw new JSONException("autoType is not support. " + typeName); } final long h3 = (((((fnv1a_64_magic_hashcode ^ className.charAt(0)) * fnv1a_64_magic_prime) ^ className.charAt(1)) * fnv1a_64_magic_prime) ^ className.charAt(2)) * fnv1a_64_magic_prime; long fullHash = TypeUtils.fnv1a_64(className); boolean internalWhite = Arrays.binarySearch(INTERNAL_WHITELIST_HASHCODES, fullHash) >= 0; if (internalDenyHashCodes != null) { long hash = h3; for (int i = 3; i < className.length(); ++i) { hash ^= className.charAt(i); hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(internalDenyHashCodes, hash) >= 0) { throw new JSONException("autoType is not support. " + typeName); } } } if ((!internalWhite) && (autoTypeSupport || expectClassFlag)) { long hash = h3; for (int i = 3; i < className.length(); ++i) { hash ^= className.charAt(i); hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(acceptHashCodes, hash) >= 0) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); if (clazz != null) { return clazz; } } if (Arrays.binarySearch(denyHashCodes, hash) >= 0 && TypeUtils.getClassFromMapping(typeName) == null) { if (Arrays.binarySearch(acceptHashCodes, fullHash) >= 0) { continue; } throw new JSONException("autoType is not support. " + typeName); } } } clazz = TypeUtils.getClassFromMapping(typeName); if (clazz == null) { clazz = deserializers.findClass(typeName); } if (expectClass == null && clazz != null && Throwable.class.isAssignableFrom(clazz) && !autoTypeSupport) { clazz = null; } if (clazz == null) { clazz = typeMapping.get(typeName); } if (internalWhite) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); } if (clazz != null) { if (expectClass != null && clazz != java.util.HashMap.class && clazz != java.util.LinkedHashMap.class && !expectClass.isAssignableFrom(clazz)) { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } return clazz; } if (!autoTypeSupport) { long hash = h3; for (int i = 3; i < className.length(); ++i) { char c = className.charAt(i); hash ^= c; hash *= fnv1a_64_magic_prime; if (Arrays.binarySearch(denyHashCodes, hash) >= 0) { if (typeName.endsWith("Exception") || typeName.endsWith("Error")) { return null; } throw new JSONException("autoType is not support. " + typeName); } // white list if (Arrays.binarySearch(acceptHashCodes, hash) >= 0) { clazz = TypeUtils.loadClass(typeName, defaultClassLoader, true); if (clazz == null) { return expectClass; } if (expectClass != null && expectClass.isAssignableFrom(clazz)) { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } return clazz; } } } boolean jsonType = false; InputStream is = null; try { String resource = typeName.replace('.', '/') + ".class"; if (defaultClassLoader != null) { is = defaultClassLoader.getResourceAsStream(resource); } else { is = ParserConfig.class.getClassLoader().getResourceAsStream(resource); } if (is != null) { ClassReader classReader = new ClassReader(is, true); TypeCollector visitor = new TypeCollector("<clinit>", new Class[0]); classReader.accept(visitor); jsonType = visitor.hasJsonType(); } } catch (Exception e) { // skip } finally { IOUtils.close(is); } if (autoTypeSupport || jsonType || expectClassFlag) { boolean cacheClass = autoTypeSupport || jsonType; clazz = TypeUtils.loadClass(typeName, defaultClassLoader, cacheClass); } if (clazz != null) { if (jsonType) { if (autoTypeSupport) { TypeUtils.addMapping(typeName, clazz); } return clazz; } if (ClassLoader.class.isAssignableFrom(clazz) // classloader is danger || javax.sql.DataSource.class.isAssignableFrom(clazz) // dataSource can load jdbc driver || javax.sql.RowSet.class.isAssignableFrom(clazz) // ) { throw new JSONException("autoType is not support. " + typeName); } if (expectClass != null) { if (expectClass.isAssignableFrom(clazz)) { if (autoTypeSupport) { TypeUtils.addMapping(typeName, clazz); } return clazz; } else { throw new JSONException("type not match. " + typeName + " -> " + expectClass.getName()); } } JavaBeanInfo beanInfo = JavaBeanInfo.build(clazz, clazz, propertyNamingStrategy); if (beanInfo.creatorConstructor != null && autoTypeSupport) { throw new JSONException("autoType is not support. " + typeName); } } if (!autoTypeSupport) { if (typeName.endsWith("Exception") || typeName.endsWith("Error")) { return null; } throw new JSONException("autoType is not support. " + typeName); } if (clazz != null) { if (autoTypeSupport) { TypeUtils.addMapping(typeName, clazz); } } return clazz; }
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
checkAutoType
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
1
Analyze the following code function for security vulnerabilities
public static Set<Class<?>> getMinimalModelClasses() { Set<Class<?>> modelClasses = new HashSet<Class<?>>(); modelClasses.add(RuleConfig.class); modelClasses.add(ProcessConfig.class); return modelClasses; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMinimalModelClasses File: kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
getMinimalModelClasses
kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
protected void resetFailedAttempts() { if (DEBUG && inLockoutMode()) { Slog.v(TAG, "Reset fingerprint lockout"); } mFailedAttempts = 0; // If we're asked to reset failed attempts externally (i.e. from Keyguard), // the alarm might still be pending; remove it. cancelLockoutReset(); notifyLockoutResetMonitors(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetFailedAttempts File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
resetFailedAttempts
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public String addMandatory(XWikiContext context) { String star = "<span class=\"mandatoryParenthesis\">&nbsp;(</span><span class=\"mandatoryDot\">&lowast;</span><span class=\"mandatoryParenthesis\">)&nbsp;</span>"; return context.getWiki().getXWikiPreference("mandatory_display", star, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addMandatory File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
addMandatory
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
static void mergeMessageFrom( Message.Builder target, UnknownFieldSet.Builder unknownFields, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { BuilderAdapter builderAdapter = new BuilderAdapter(target); Descriptor descriptorForType = target.getDescriptorForType(); while (true) { final int tag = input.readTag(); if (tag == 0) { break; } if (!mergeFieldFrom( input, unknownFields, extensionRegistry, descriptorForType, builderAdapter, tag)) { // end group tag break; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mergeMessageFrom File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
mergeMessageFrom
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
0
Analyze the following code function for security vulnerabilities
void onClick(View v, NotificationChannel channel, int appUid);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onClick File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
onClick
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
@Message(id = 707, value = "Non Http-Servlet lifecycle not defined") IllegalStateException onlyHttpServletLifecycleDefined();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onlyHttpServletLifecycleDefined File: impl/src/main/java/org/jboss/weld/logging/ServletLogger.java Repository: weld/core The code follows secure coding practices.
[ "CWE-362" ]
CVE-2014-8122
MEDIUM
4.3
weld/core
onlyHttpServletLifecycleDefined
impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
8e413202fa1af08c09c580f444e4fd16874f9c65
0
Analyze the following code function for security vulnerabilities
protected static Number stringToNumber(final String val) throws NumberFormatException { char initial = val.charAt(0); if ((initial >= '0' && initial <= '9') || initial == '-') { // decimal representation if (isDecimalNotation(val)) { // Use a BigDecimal all the time so we keep the original // representation. BigDecimal doesn't support -0.0, ensure we // keep that by forcing a decimal. try { BigDecimal bd = new BigDecimal(val); if(initial == '-' && BigDecimal.ZERO.compareTo(bd)==0) { return Double.valueOf(-0.0); } return bd; } catch (NumberFormatException retryAsDouble) { // this is to support "Hex Floats" like this: 0x1.0P-1074 try { Double d = Double.valueOf(val); if(d.isNaN() || d.isInfinite()) { throw new NumberFormatException("val ["+val+"] is not a valid number."); } return d; } catch (NumberFormatException ignore) { throw new NumberFormatException("val ["+val+"] is not a valid number."); } } } // block items like 00 01 etc. Java number parsers treat these as Octal. if(initial == '0' && val.length() > 1) { char at1 = val.charAt(1); if(at1 >= '0' && at1 <= '9') { throw new NumberFormatException("val ["+val+"] is not a valid number."); } } else if (initial == '-' && val.length() > 2) { char at1 = val.charAt(1); char at2 = val.charAt(2); if(at1 == '0' && at2 >= '0' && at2 <= '9') { throw new NumberFormatException("val ["+val+"] is not a valid number."); } } // integer representation. // This will narrow any values to the smallest reasonable Object representation // (Integer, Long, or BigInteger) // BigInteger down conversion: We use a similar bitLength compare as // BigInteger#intValueExact uses. Increases GC, but objects hold // only what they need. i.e. Less runtime overhead if the value is // long lived. BigInteger bi = new BigInteger(val); if(bi.bitLength() <= 31){ return Integer.valueOf(bi.intValue()); } if(bi.bitLength() <= 63){ return Long.valueOf(bi.longValue()); } return bi; } throw new NumberFormatException("val ["+val+"] is not a valid number."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stringToNumber File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
stringToNumber
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
@TestApi public @NonNull Set<String> getDefaultCrossProfilePackages() { throwIfParentInstance("getDefaultCrossProfilePackages"); if (mService != null) { try { return new ArraySet<>(mService.getDefaultCrossProfilePackages()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return Collections.emptySet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultCrossProfilePackages File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getDefaultCrossProfilePackages
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(android.Manifest.permission.MANAGE_USERS) @SystemApi public @Nullable UserHandle getDeviceOwnerUser() { if (mService != null) { try { int userId = mService.getDeviceOwnerUserId(); if (userId != UserHandle.USER_NULL) { return UserHandle.of(userId); } } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceOwnerUser File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getDeviceOwnerUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Deprecated public void setDatabase(String database) { if (database != null) { DocumentReference reference = getDocumentReference(); WikiReference wiki = reference.getWikiReference(); WikiReference newWiki = new WikiReference(database); if (!newWiki.equals(wiki)) { setDocumentReferenceInternal(reference.replaceParent(wiki, newWiki)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDatabase 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
setDatabase
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
@Override public void dispose() throws FactoryException { super.dispose(); datasource = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispose File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
dispose
modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
private static final native void nativeDestroy(long obj);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeDestroy File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeDestroy
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
private boolean offlineFromString(String offlineStr) { return "1".equals(offlineStr); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: offlineFromString File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java Repository: keycloak The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-6563
HIGH
7.7
keycloak
offlineFromString
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
11eb952e1df7cbb95b1e2c101dfd4839a2375695
0
Analyze the following code function for security vulnerabilities
public Path getDeployedPath() throws IOException { return FilesUtils.getDeployedPath(resourceCachePath); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeployedPath File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-18212
MEDIUM
4
eclipse/lemminx
getDeployedPath
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
e37c399aa266be1b7a43061d4afc43dc230410d2
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void onScrollBeginEventAck() { mTouchScrollInProgress = true; temporarilyHideTextHandles(); mZoomControlsDelegate.invokeZoomPicker(); updateGestureStateListener(GestureEventType.SCROLL_START); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onScrollBeginEventAck 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
onScrollBeginEventAck
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void setupVideoStreamForLayout(@Nullable MediaStream mediaStream, String session, boolean videoStreamEnabled, String videoStreamType) { String nick; if (hasExternalSignalingServer) { nick = webSocketClient.getDisplayNameForSession(session); } else { PeerConnectionWrapper peerConnectionWrapper = getPeerConnectionWrapperForSessionIdAndType(session, videoStreamType); nick = peerConnectionWrapper != null ? peerConnectionWrapper.getNick() : ""; } String userId = ""; if (hasMCU) { userId = webSocketClient.getUserIdForSession(session); } else if (participantMap.get(session).getCalculatedActorType() == Participant.ActorType.USERS) { userId = participantMap.get(session).getCalculatedActorId(); } String urlForAvatar; if (!TextUtils.isEmpty(userId)) { urlForAvatar = ApiUtils.getUrlForAvatar(baseUrl, userId, true); } else { urlForAvatar = ApiUtils.getUrlForGuestAvatar(baseUrl, nick, true); } ParticipantDisplayItem participantDisplayItem = new ParticipantDisplayItem(userId, session, nick, urlForAvatar, mediaStream, videoStreamType, videoStreamEnabled, rootEglBase); participantDisplayItems.put(session, participantDisplayItem); initGridAdapter(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setupVideoStreamForLayout File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
setupVideoStreamForLayout
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
public void decrementLoaderUseCount() { // For use by trusted code only if (System.getSecurityManager() != null) { System.getSecurityManager().checkPermission(new AllPermission()); } String uniqueKey = file.getUniqueKey(); // NB: There will only ever be one class-loader per unique-key synchronized (getUniqueKeyLock(uniqueKey)) { useCount--; if (useCount <= 0) { uniqueKeyToLoader.remove(uniqueKey); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decrementLoaderUseCount File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
decrementLoaderUseCount
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Nullable public PermissionGroupInfo getPermissionGroupInfo(@NonNull String groupName, @PackageManager.PermissionGroupInfoFlags int flags) { try { return mPermissionManager.getPermissionGroupInfo(groupName, flags); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermissionGroupInfo File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
getPermissionGroupInfo
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
@Override public boolean isSyncPendingAsUser(Account account, String authority, ComponentName cname, int userId) { mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS, "no permission to read the sync stats"); enforceCrossUserPermission(userId, "no permission to retrieve the sync settings for user " + userId); int callerUid = Binder.getCallingUid(); long identityToken = clearCallingIdentity(); SyncManager syncManager = getSyncManager(); if (syncManager == null) return false; try { SyncStorageEngine.EndPoint info; if (!(account == null || authority == null)) { info = new SyncStorageEngine.EndPoint(account, authority, userId); } else { throw new IllegalArgumentException("Invalid authority specified"); } return syncManager.getSyncStorageEngine().isSyncPending(info); } finally { restoreCallingIdentity(identityToken); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSyncPendingAsUser File: services/core/java/com/android/server/content/ContentService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2426
MEDIUM
4.3
android
isSyncPendingAsUser
services/core/java/com/android/server/content/ContentService.java
63363af721650e426db5b0bdfb8b2d4fe36abdb0
0
Analyze the following code function for security vulnerabilities
private Document loadXmlFrom(InputStream is) throws SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = null; try { builder = factory.newDocumentBuilder(); } catch (ParserConfigurationException ex) { } return builder.parse(is); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000889 - Severity: MEDIUM - CVSS Score: 6.8 Description: Force secure processing for loading circuit files This prevents issues with XXE (XML external entity) processing, particularly for untrusted circuit files. Function: loadXmlFrom File: src/com/cburch/logisim/file/XmlReader.java Repository: logisim-evolution Fixed Code: private Document loadXmlFrom(InputStream is) throws SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); try { factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); } catch (ParserConfigurationException ex) { // All implementations are required to support FEATURE_SECURE_PROCESSING. } DocumentBuilder builder = null; try { builder = factory.newDocumentBuilder(); } catch (ParserConfigurationException ex) { } return builder.parse(is); }
[ "CWE-611" ]
CVE-2018-1000889
MEDIUM
6.8
logisim-evolution
loadXmlFrom
src/com/cburch/logisim/file/XmlReader.java
90aee8f8ceef463884cc400af4f6d1f109fb0972
1
Analyze the following code function for security vulnerabilities
static Bitmap shrinkBitmap(Bitmap in, int maxSize) { // Original width/height. final int ow = in.getWidth(); final int oh = in.getHeight(); if ((ow <= maxSize) && (oh <= maxSize)) { if (DEBUG) { Slog.d(TAG, String.format("Icon size %dx%d, no need to shrink", ow, oh)); } return in; } final int longerDimension = Math.max(ow, oh); // New width and height. final int nw = ow * maxSize / longerDimension; final int nh = oh * maxSize / longerDimension; if (DEBUG) { Slog.d(TAG, String.format("Icon size %dx%d, shrinking to %dx%d", ow, oh, nw, nh)); } final Bitmap scaledBitmap = Bitmap.createBitmap(nw, nh, Bitmap.Config.ARGB_8888); final Canvas c = new Canvas(scaledBitmap); final RectF dst = new RectF(0, 0, nw, nh); c.drawBitmap(in, /*src=*/ null, dst, /* paint =*/ null); return scaledBitmap; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shrinkBitmap File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
shrinkBitmap
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void setPackageBackupPack(boolean packageBackupPack) { this.packageBackupPack = packageBackupPack; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPackageBackupPack 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
setPackageBackupPack
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
private String getGenericWipeReason( boolean calledByProfileOwnerOnOrgOwnedDevice, boolean calledOnParentInstance) { return calledByProfileOwnerOnOrgOwnedDevice && !calledOnParentInstance ? getUpdatableString( WORK_PROFILE_DELETED_ORG_OWNED_MESSAGE, R.string.device_ownership_relinquished) : getUpdatableString( WORK_PROFILE_DELETED_GENERIC_MESSAGE, R.string.work_profile_deleted_description_dpm_wipe); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGenericWipeReason 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
getGenericWipeReason
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
char getExecutableQuoteDelimiter() { return exeQuoteDelimiter; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExecutableQuoteDelimiter File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java Repository: apache/maven-shared-utils The code follows secure coding practices.
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
getExecutableQuoteDelimiter
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
2735facbbbc2e13546328cb02dbb401b3776eea3
0
Analyze the following code function for security vulnerabilities
protected String getShortcut(Map<String, Object> data) { String shortcutHtml = ""; Object[] shortcut = (Object[]) getProperty("shortcut"); if (shortcut != null && shortcut.length > 0) { for (Object o : shortcut) { Map link = (HashMap) o; String href = link.get("href").toString(); String label = link.get("label").toString(); String target = (link.get("target") == null)?"":link.get("target").toString(); boolean isPublic = "true".equalsIgnoreCase((String) link.get("isPublic")); if ((Boolean) data.get("is_logged_in") || (!((Boolean) data.get("is_logged_in")) && isPublic)) { if ("divider".equalsIgnoreCase(label)) { shortcutHtml += "<li class=\"divider\"></li>\n"; } else if (href.isEmpty()) { shortcutHtml += "<li class=\"dropdown-menu-title\"><span>" + label + "</span></li>\n"; } else { if (!href.contains("/")) { href = data.get("base_link") + href; } shortcutHtml += "<li><a href=\"" + href + "\" target=\""+target+"\">" + label + "</a></li>\n"; } } } } String html = ""; if (!shortcutHtml.isEmpty()) { html = "<li class=\"shortcut-link dropdown\">\n" + " <a data-toggle=\"dropdown\" class=\"btn dropdown-toggle\">\n" + " <i class=\"fa fa-th-list white\"></i> " + getPropertyString("shortcutLinkLabel") + "\n" + " <span class=\"caret\"></span>\n" + " </a>\n"; html += "<ul class=\"dropdown-menu\">\n"; html += shortcutHtml; html += "</ul></li>"; } return html; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShortcut File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
getShortcut
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public String getNoGrammar() { return noGrammar; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNoGrammar File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-18213
MEDIUM
6.5
eclipse/lemminx
getNoGrammar
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/settings/XMLValidationSettings.java
c8bf3245a72cace50ee2aae5eee69538c58ce056
0
Analyze the following code function for security vulnerabilities
public Object fromXML(String xml) { return fromXML(new StringReader(xml)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromXML File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
fromXML
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
@Override public boolean isApplicable(ICourse course, CourseNode courseNode) { return courseNode instanceof IQTESTCourseNode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isApplicable 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
isApplicable
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
public void userTemporarilyDisabledNetwork(String network, int uid) { int maxDisableDurationMinutes = mContext.getResources().getInteger(R.integer .config_wifiAllNonCarrierMergedWifiMaxDisableDurationMinutes); mUserTemporarilyDisabledList.add(network, USER_DISCONNECT_NETWORK_BLOCK_EXPIRY_MS, maxDisableDurationMinutes * 60 * 1000); Log.d(TAG, "Temporarily disable network: " + network + " uid=" + uid + " num=" + mUserTemporarilyDisabledList.size() + ", maxDisableDurationMinutes:" + maxDisableDurationMinutes); removeUserChoiceFromDisabledNetwork(network, uid); saveToStore(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userTemporarilyDisabledNetwork File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
userTemporarilyDisabledNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public ByteBuf getChunk(int length) throws IOException { if (file == null || length == 0) { return EMPTY_BUFFER; } if (fileChannel == null) { RandomAccessFile accessFile = new RandomAccessFile(file, "r"); fileChannel = accessFile.getChannel(); } int read = 0; ByteBuffer byteBuffer = ByteBuffer.allocate(length); try { while (read < length) { int readnow = fileChannel.read(byteBuffer); if (readnow == -1) { fileChannel.close(); fileChannel = null; break; } read += readnow; } } catch (IOException e) { fileChannel.close(); fileChannel = null; throw e; } if (read == 0) { return EMPTY_BUFFER; } byteBuffer.flip(); ByteBuf buffer = wrappedBuffer(byteBuffer); buffer.readerIndex(0); buffer.writerIndex(read); return buffer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChunk File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java Repository: netty The code follows secure coding practices.
[ "CWE-378", "CWE-379" ]
CVE-2021-21290
LOW
1.9
netty
getChunk
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
c735357bf29d07856ad171c6611a2e1a0e0000ec
0
Analyze the following code function for security vulnerabilities
public RestTestUtils rest() { return this.rest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rest 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
rest
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public TvExtender setSuppressShowOverApps(boolean suppress) { mSuppressShowOverApps = suppress; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSuppressShowOverApps File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setSuppressShowOverApps
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public static boolean hasNamedParameter(String query) { return StringUtils.hasText(query) && NAMED_PARAMETER.matcher(query).find(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasNamedParameter File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
hasNamedParameter
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
private String getUnpauseWorkAppsButtonText() { return getUpdatableString( WORK_PROFILE_TELEPHONY_PAUSED_TURN_ON_BUTTON, R.string.work_profile_telephony_paused_turn_on_button); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUnpauseWorkAppsButtonText File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getUnpauseWorkAppsButtonText
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
boolean setDiscoverableTimeout(int timeout) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return mAdapterProperties.setDiscoverableTimeout(timeout); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDiscoverableTimeout File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
setDiscoverableTimeout
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Column(name = "file_size", nullable = false) public long getFileSize() { return this.fileSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFileSize File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getFileSize
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
private static void assertCountQuery(String originalQuery, String countQuery) { assertThat(createCountQueryFor(originalQuery), is(countQuery)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assertCountQuery File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
assertCountQuery
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
b8e7fe
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; CertSearchRequest other = (CertSearchRequest) obj; return certTypeInUse == other.certTypeInUse && Objects.equals(certTypeSSLClient, other.certTypeSSLClient) && Objects.equals(certTypeSSLServer, other.certTypeSSLServer) && Objects.equals(certTypeSecureEmail, other.certTypeSecureEmail) && Objects.equals(certTypeSubEmailCA, other.certTypeSubEmailCA) && Objects.equals(certTypeSubSSLCA, other.certTypeSubSSLCA) && Objects.equals(commonName, other.commonName) && Objects.equals(country, other.country) && Objects.equals(eMail, other.eMail) && Objects.equals(issuedBy, other.issuedBy) && issuedByInUse == other.issuedByInUse && Objects.equals(issuedOnFrom, other.issuedOnFrom) && issuedOnInUse == other.issuedOnInUse && Objects.equals(issuedOnTo, other.issuedOnTo) && Objects.equals(issuerDN, other.issuerDN) && Objects.equals(locality, other.locality) && matchExactly == other.matchExactly && Objects.equals(org, other.org) && Objects.equals(orgUnit, other.orgUnit) && Objects.equals(revocationReason, other.revocationReason) && revocationReasonInUse == other.revocationReasonInUse && Objects.equals(revokedBy, other.revokedBy) && revokedByInUse == other.revokedByInUse && Objects.equals(revokedOnFrom, other.revokedOnFrom) && revokedOnInUse == other.revokedOnInUse && Objects.equals(revokedOnTo, other.revokedOnTo) && Objects.equals(serialFrom, other.serialFrom) && serialNumberRangeInUse == other.serialNumberRangeInUse && Objects.equals(serialTo, other.serialTo) && Objects.equals(state, other.state) && Objects.equals(status, other.status) && subjectInUse == other.subjectInUse && Objects.equals(userID, other.userID) && Objects.equals(validNotAfterFrom, other.validNotAfterFrom) && validNotAfterInUse == other.validNotAfterInUse && Objects.equals(validNotAfterTo, other.validNotAfterTo) && Objects.equals(validNotBeforeFrom, other.validNotBeforeFrom) && validNotBeforeInUse == other.validNotBeforeInUse && Objects.equals(validNotBeforeTo, other.validNotBeforeTo) && Objects.equals(validityCount, other.validityCount) && validityLengthInUse == other.validityLengthInUse && Objects.equals(validityOperation, other.validityOperation) && Objects.equals(validityUnit, other.validityUnit); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals 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
equals
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0