instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public FileLocation prepareFormatTestFolder(final Location... zipSources) throws IOException { if (zipSources.length == 0) { throw new IllegalArgumentException( "At least one zip source is required!"); } final byte[] bytes = Arrays.stream(zipSources).map(Object::toString).reduce( "", (a, b) -> a + b).getBytes(); final String localFolderName = DatatypeConverter.printHexBinary(DigestUtils .sha1(bytes)); // test if we already downloaded and unpacked the source FileLocation out = sources.get(localFolderName); if (out == null) { // not cached we need to download it final File basefolder = new File(sourceCache().getBaseDirectory(), localFolderName); try { if (zipSources.length == 1) { // extract directly into basedir downloadAndUnpackResource(zipSources[0], basefolder); } else { for (final Location source : zipSources) { String targetName; if (source.getName().equals(source.defaultName())) { targetName = source.getURI().getPath().substring(1).replaceAll("\\/", "-"); } else { targetName = source.getName(); } final File target = new File(basefolder, targetName); downloadAndUnpackResource(source, target); } } } catch (final IOException | InterruptedException | ExecutionException e) { // cleanup if (basefolder.exists()) { basefolder.delete(); } throw new IOException(e); } out = new FileLocation(basefolder); sources.put(localFolderName, out); } return out; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareFormatTestFolder File: src/test/java/io/scif/util/DefaultSampleFilesService.java Repository: scifio The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4493
CRITICAL
9.8
scifio
prepareFormatTestFolder
src/test/java/io/scif/util/DefaultSampleFilesService.java
fcb0dbca0ec72b22fe0c9ddc8abc9cb188a0ff31
0
Analyze the following code function for security vulnerabilities
public RequestStatus getRequestStatus() { return requestStatus; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestStatus File: base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getRequestStatus
base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void onRemoveCompleted(String packageName, boolean succeeded) { synchronized(mClearDataLock) { mClearingData = false; mClearDataLock.notifyAll(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRemoveCompleted File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
onRemoveCompleted
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public InputStream openFileInputStream(String file) throws IOException { file = removeFilePrefix(file); InputStream is = null; try{ is = createFileInputStream(file); }catch(FileNotFoundException fne){ //It is impossible to know if a path is considered an external //storage on the various android's versions. //So we try to open the path and if failed due to permission we will //ask for the permission from the user if(fne.getMessage().contains("Permission denied")){ if(!checkForPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, "This is required to access the file")){ //The user refused to give access. return null; }else{ //The user gave permission try again to access the path return openFileInputStream(file); } }else{ throw fne; } } return is; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openFileInputStream File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
openFileInputStream
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Deprecated public long getLongValue(String className, String fieldName) { return getLongValue(resolveClassReference(className), fieldName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLongValue 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
getLongValue
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 Class<? extends JiffleRuntime> getRuntimeClass() { return runtimeClass; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRuntimeClass File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java Repository: geosolutions-it/jai-ext The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-24816
HIGH
7.5
geosolutions-it/jai-ext
getRuntimeClass
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
cb1d6565d38954676b0a366da4f965fef38da1cb
0
Analyze the following code function for security vulnerabilities
public static String makeHiddenTags(final HttpServletRequest request, final Map<String,Object> additions) { return (makeHiddenTags(request, additions, EMPTY_STRING_ARRAY)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeHiddenTags File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-0869
MEDIUM
6.1
OpenNMS/opennms
makeHiddenTags
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
66b4ba96a18b9952f25a350bbccc2a7e206238d1
0
Analyze the following code function for security vulnerabilities
public static void retryUpload(@NonNull Context context, @NonNull User user, @NonNull OCUpload upload) { Intent i = new Intent(context, FileUploader.class); i.putExtra(FileUploader.KEY_RETRY, true); i.putExtra(FileUploader.KEY_ACCOUNT, user.toPlatformAccount()); i.putExtra(FileUploader.KEY_RETRY_UPLOAD, upload); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { context.startForegroundService(i); } else { context.startService(i); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: retryUpload File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
retryUpload
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
private boolean shouldSendRedrawForSync() { if (mRedrawForSyncReported) { return false; } return useBLASTSync(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldSendRedrawForSync File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
shouldSendRedrawForSync
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public String getRemoteAddress() { return transport.getRemoteAddress(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemoteAddress File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
getRemoteAddress
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public final WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage, String callingFeatureId, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId) { assertPackageMatchesCallingUid(callingPackage); final WaitResult res = new WaitResult(); enforceNotIsolatedCaller("startActivityAndWait"); userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, "startActivityAndWait"); // TODO: Switch to user app stacks here. getActivityStartController().obtainStarter(intent, "startActivityAndWait") .setCaller(caller) .setCallingPackage(callingPackage) .setCallingFeatureId(callingFeatureId) .setResolvedType(resolvedType) .setResultTo(resultTo) .setResultWho(resultWho) .setRequestCode(requestCode) .setStartFlags(startFlags) .setActivityOptions(bOptions) .setUserId(userId) .setProfilerInfo(profilerInfo) .setWaitResult(res) .execute(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityAndWait 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
startActivityAndWait
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void setAppWillBeHidden(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppWillBeHidden()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } AppWindowToken wtoken; synchronized(mWindowMap) { wtoken = findAppWindowToken(token); if (wtoken == null) { Slog.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token); return; } wtoken.willBeHidden = true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAppWillBeHidden 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
setAppWillBeHidden
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private Pattern[] getIncludedRegionsPatterns() { String[] included = getIncludedRegionsNormalized(); if (included != null) { Pattern[] patterns = new Pattern[included.length]; int i = 0; for (String includedRegion : included) { patterns[i++] = Pattern.compile(includedRegion); } return patterns; } return new Pattern[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIncludedRegionsPatterns File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
getIncludedRegionsPatterns
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
private List<String> allowedFolders() { ArrayList<String> allowed = new ArrayList<>(); for (Material material : this) { if (!StringUtils.isBlank(material.getFolder())) { allowed.add(material.getFolder()); } } allowed.add(ArtifactLogUtil.CRUISE_OUTPUT_FOLDER); return allowed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: allowedFolders File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
allowedFolders
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
protected B connection(Http2Connection connection) { enforceConstraint("connection", "maxReservedStreams", maxReservedStreams); enforceConstraint("connection", "server", isServer); enforceConstraint("connection", "codec", decoder); enforceConstraint("connection", "codec", encoder); this.connection = checkNotNull(connection, "connection"); return self(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connection File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
connection
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
public static OS getOperatingSystemType() { if (os == OS.NOT_SET) { String operSys = System.getProperty("os.name").toLowerCase(); if (operSys.contains("win")) { os = OS.WINDOWS; } else if (operSys.contains("nix") || operSys.contains("nux") || operSys.contains("aix")) { os = OS.LINUX; } else if (operSys.contains("mac")) { os = OS.MAC; } else if (operSys.contains("sunos")) { os = OS.SOLARIS; } else { os = OS.UNKNOWN; } } return os; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOperatingSystemType File: bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java Repository: openhab/openhab-addons The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-5242
HIGH
9.3
openhab/openhab-addons
getOperatingSystemType
bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
0
Analyze the following code function for security vulnerabilities
public Long getDownvotes() { return downvotes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDownvotes 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
getDownvotes
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
static SimData fromIntent(Intent intent) { State state; if (!TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(intent.getAction())) { throw new IllegalArgumentException("only handles intent ACTION_SIM_STATE_CHANGED"); } String stateExtra = intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE); int slotId = intent.getIntExtra(PhoneConstants.SLOT_KEY, 0); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.INVALID_SUBSCRIPTION_ID); if (IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals(stateExtra)) { final String absentReason = intent .getStringExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON); if (IccCardConstants.INTENT_VALUE_ABSENT_ON_PERM_DISABLED.equals( absentReason)) { state = IccCardConstants.State.PERM_DISABLED; } else { state = IccCardConstants.State.ABSENT; } } else if (IccCardConstants.INTENT_VALUE_ICC_READY.equals(stateExtra)) { state = IccCardConstants.State.READY; } else if (IccCardConstants.INTENT_VALUE_ICC_LOCKED.equals(stateExtra)) { final String lockedReason = intent .getStringExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON); if (IccCardConstants.INTENT_VALUE_LOCKED_ON_PIN.equals(lockedReason)) { state = IccCardConstants.State.PIN_REQUIRED; } else if (IccCardConstants.INTENT_VALUE_LOCKED_ON_PUK.equals(lockedReason)) { state = IccCardConstants.State.PUK_REQUIRED; } else { state = IccCardConstants.State.UNKNOWN; } } else if (IccCardConstants.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) { state = IccCardConstants.State.NETWORK_LOCKED; } else if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(stateExtra) || IccCardConstants.INTENT_VALUE_ICC_IMSI.equals(stateExtra)) { // This is required because telephony doesn't return to "READY" after // these state transitions. See bug 7197471. state = IccCardConstants.State.READY; } else { state = IccCardConstants.State.UNKNOWN; } return new SimData(state, slotId, subId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromIntent File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
fromIntent
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public MessagingStyle addHistoricMessage(Message message) { mHistoricMessages.add(message); if (mHistoricMessages.size() > MAXIMUM_RETAINED_MESSAGES) { mHistoricMessages.remove(0); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addHistoricMessage File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
addHistoricMessage
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void setPublicClient(Boolean publicClient) { this.publicClient = publicClient; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPublicClient File: services/src/main/java/org/keycloak/services/managers/ClientManager.java Repository: keycloak The code follows secure coding practices.
[ "CWE-798" ]
CVE-2019-14837
MEDIUM
6.4
keycloak
setPublicClient
services/src/main/java/org/keycloak/services/managers/ClientManager.java
9a7c1a91a59ab85e7f8889a505be04a71580777f
0
Analyze the following code function for security vulnerabilities
public boolean ensurePushAvailable() { if (isAtmosphereAvailable()) { return true; } else { if (!pushWarningEmitted) { pushWarningEmitted = true; getLogger().log(Level.WARNING, Constants.ATMOSPHERE_MISSING_ERROR); } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensurePushAvailable File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
ensurePushAvailable
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
public SolrIndexManager getSolrIndexManager() { return indexManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSolrIndexManager File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
getSolrIndexManager
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
public boolean isLaunchIntoPip() { return mLaunchIntoPipParams != null && mLaunchIntoPipParams.isLaunchIntoPip(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLaunchIntoPip File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
isLaunchIntoPip
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public boolean isUnattendedManagedKiosk() { if (!mHasFeature) { return false; } Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity()) || hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)); return mInjector.binderWithCleanCallingIdentity(() -> isUnattendedManagedKioskUnchecked()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUnattendedManagedKiosk 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
isUnattendedManagedKiosk
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private void watchPod(String namespace, String podName, AbortChecker abortChecker, TaskLogger jobLogger) { Commandline kubectl = newKubeCtl(); ObjectMapper mapper = OneDev.getInstance(ObjectMapper.class); AtomicReference<Abort> abortRef = new AtomicReference<>(null); StringBuilder json = new StringBuilder(); kubectl.addArgs("get", "pod", podName, "-n", namespace, "--watch", "-o", "json"); kubectl.timeout(POD_WATCH_TIMEOUT); Thread thread = Thread.currentThread(); while (true) { try { kubectl.execute(new LineConsumer() { @Override public void consume(String line) { if (line.startsWith("{")) { json.append("{").append("\n"); } else if (line.startsWith("}")) { json.append("}"); logger.trace("Pod watching output:\n" + json.toString()); try { process(mapper.readTree(json.toString())); } catch (Exception e) { logger.error("Error processing pod watching output", e); } json.setLength(0); } else { json.append(line).append("\n"); } } private void process(JsonNode podNode) { JsonNode statusNode = podNode.get("status"); checkConditions(statusNode, jobLogger); if (abortRef.get() == null) { String nodeName = null; JsonNode specNode = podNode.get("spec"); if (specNode != null) { JsonNode nodeNameNode = specNode.get("nodeName"); if (nodeNameNode != null) nodeName = nodeNameNode.asText(); } Collection<JsonNode> containerStatusNodes = new ArrayList<>(); JsonNode initContainerStatusesNode = statusNode.get("initContainerStatuses"); if (initContainerStatusesNode != null) { for (JsonNode containerStatusNode: initContainerStatusesNode) containerStatusNodes.add(containerStatusNode); } JsonNode containerStatusesNode = statusNode.get("containerStatuses"); if (containerStatusesNode != null) { for (JsonNode containerStatusNode: containerStatusesNode) containerStatusNodes.add(containerStatusNode); } abortRef.set(abortChecker.check(nodeName, containerStatusNodes)); if (abortRef.get() != null) thread.interrupt(); } } }, new LineConsumer() { @Override public void consume(String line) { jobLogger.error("Kubernetes: " + line); } }).checkReturnCode(); throw new ExplicitException("Unexpected end of pod watching"); } catch (Exception e) { Abort abort = abortRef.get(); if (abort != null) { if (abort.getErrorMessage() != null) throw new ExplicitException(abort.getErrorMessage()); else break; } else if (ExceptionUtils.find(e, TimeoutException.class) == null) { // If there is no output for some time, let's re-watch as sometimes // pod status update is not pushed throw ExceptionUtils.unchecked(e); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: watchPod File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-610" ]
CVE-2022-39206
CRITICAL
9.9
theonedev/onedev
watchPod
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
0052047a5b5095ac6a6b4a73a522d0272fec3a22
0
Analyze the following code function for security vulnerabilities
public void setUsageStatsManager(UsageStatsManagerInternal usageStatsManager) { mUsageStatsService = usageStatsManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUsageStatsManager 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
setUsageStatsManager
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@GET @Operation(summary = "Retrieves the forum of a group.", description = "Retrieves the forum of a group.") @ApiResponse(responseCode = "200", description = "Request was successful.", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ForumVO.class)), @Content(mediaType = "application/xml",schema = @Schema(implementation = ForumVO.class)) }) @ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient") @ApiResponse(responseCode = "404", description = "The forum not found.") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response getForum() { if(forum == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } ForumVO forumVo = new ForumVO(forum); return Response.ok(forumVo).build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getForum File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
getForum
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
private static void cacheExpiryPolicyFactoryConfigXmlGenerator(XmlGenerator gen, ExpiryPolicyFactoryConfig config) { if (config == null) { return; } if (!isNullOrEmpty(config.getClassName())) { gen.node("expiry-policy-factory", null, "class-name", config.getClassName()); } else { TimedExpiryPolicyFactoryConfig timedConfig = config.getTimedExpiryPolicyFactoryConfig(); if (timedConfig != null && timedConfig.getExpiryPolicyType() != null && timedConfig.getDurationConfig() != null) { DurationConfig duration = timedConfig.getDurationConfig(); gen.open("expiry-policy-factory") .node("timed-expiry-policy-factory", null, "expiry-policy-type", timedConfig.getExpiryPolicyType(), "duration-amount", duration.getDurationAmount(), "time-unit", duration.getTimeUnit().name()) .close(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cacheExpiryPolicyFactoryConfigXmlGenerator File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
cacheExpiryPolicyFactoryConfigXmlGenerator
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override public void handleMessage(Message msg) { switch (msg.what) { case EVENT_SEND_SMS_COMPLETE: // An outbound SMS has been successfully transferred, or failed. handleSendComplete((AsyncResult) msg.obj); break; case EVENT_SEND_RETRY: Rlog.d(TAG, "SMS retry.."); sendRetrySms((SmsTracker) msg.obj); break; case EVENT_SEND_LIMIT_REACHED_CONFIRMATION: handleReachSentLimit((SmsTracker)(msg.obj)); break; case EVENT_CONFIRM_SEND_TO_POSSIBLE_PREMIUM_SHORT_CODE: handleConfirmShortCode(false, (SmsTracker)(msg.obj)); break; case EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE: handleConfirmShortCode(true, (SmsTracker)(msg.obj)); break; case EVENT_SEND_CONFIRMED_SMS: { SmsTracker tracker = (SmsTracker) msg.obj; if (tracker.isMultipart()) { sendMultipartSms(tracker); } else { if (mPendingTrackerCount > 1) { tracker.mExpectMore = true; } else { tracker.mExpectMore = false; } sendSms(tracker); } mPendingTrackerCount--; break; } case EVENT_STOP_SENDING: { SmsTracker tracker = (SmsTracker) msg.obj; tracker.onFailed(mContext, RESULT_ERROR_LIMIT_EXCEEDED, 0/*errorCode*/); mPendingTrackerCount--; break; } case EVENT_HANDLE_STATUS_REPORT: handleStatusReport(msg.obj); break; default: Rlog.e(TAG, "handleMessage() ignoring message of unexpected type " + msg.what); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleMessage File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
handleMessage
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
protected int indexOf(char c, int pos) { for (int i = pos; pos < len; i++) if (in[i] == (byte) c) return i; return -1; }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2021-31684 - Severity: MEDIUM - CVSS Score: 5.0 Description: Fix out of bound exception Function: indexOf File: json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java Repository: netplex/json-smart-v1 Fixed Code: protected int indexOf(char c, int pos) { for (int i = pos; i < len; i++) if (in[i] == (byte) c) return i; return -1; }
[ "CWE-787" ]
CVE-2021-31684
MEDIUM
5
netplex/json-smart-v1
indexOf
json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java
c558138b3cb11f586643f95fbca4ce5c4e92a198
1
Analyze the following code function for security vulnerabilities
private List<Parameter> parseFunctionParameters(String funcName) { ParamType type = null; // Parenthesis starts at 1 since we're marking the start of a function call, the close paren will denote the // last parameter boundary int groupParen = 1, groupBracket = 0, groupBrace = 0, groupQuote = 0; boolean endOfStream = false; char priorChar = 0; List<Parameter> parameters = new ArrayList<Parameter>(); StringBuilder parameter = new StringBuilder(); while (path.inBounds() && !endOfStream) { char c = path.currentChar(); path.incrementPosition(1); // we're at the start of the stream, and don't know what type of parameter we have if (type == null) { if (isWhitespace(c)) { continue; } if (c == OPEN_BRACE || isDigit(c) || DOUBLE_QUOTE == c || MINUS == c) { type = ParamType.JSON; } else if (isPathContext(c)) { type = ParamType.PATH; // read until we reach a terminating comma and we've reset grouping to zero } } switch (c) { case DOUBLE_QUOTE: if (priorChar != '\\' && groupQuote > 0) { groupQuote--; } else { groupQuote++; } break; case OPEN_PARENTHESIS: groupParen++; break; case OPEN_BRACE: groupBrace++; break; case OPEN_SQUARE_BRACKET: groupBracket++; break; case CLOSE_BRACE: if (0 == groupBrace) { throw new InvalidPathException("Unexpected close brace '}' at character position: " + path.position()); } groupBrace--; break; case CLOSE_SQUARE_BRACKET: if (0 == groupBracket) { throw new InvalidPathException("Unexpected close bracket ']' at character position: " + path.position()); } groupBracket--; break; // In either the close paren case where we have zero paren groups left, capture the parameter, or where // we've encountered a COMMA do the same case CLOSE_PARENTHESIS: groupParen--; //CS304 Issue link: https://github.com/json-path/JsonPath/issues/620 if (0 > groupParen || priorChar == '(') { parameter.append(c); } case COMMA: // In this state we've reach the end of a function parameter and we can pass along the parameter string // to the parser if ((0 == groupQuote && 0 == groupBrace && 0 == groupBracket && ((0 == groupParen && CLOSE_PARENTHESIS == c) || 1 == groupParen))) { endOfStream = (0 == groupParen); if (null != type) { Parameter param = null; switch (type) { case JSON: // parse the json and set the value param = new Parameter(parameter.toString()); break; case PATH: LinkedList<Predicate> predicates = new LinkedList<>(); PathCompiler compiler = new PathCompiler(parameter.toString(), predicates); param = new Parameter(compiler.compile()); break; } if (null != param) { parameters.add(param); } parameter.delete(0, parameter.length()); type = null; } } break; } if (type != null && !(c == COMMA && 0 == groupBrace && 0 == groupBracket && 1 == groupParen)) { parameter.append(c); } priorChar = c; } if (0 != groupBrace || 0 != groupParen || 0 != groupBracket) { throw new InvalidPathException("Arguments to function: '" + funcName + "' are not closed properly."); } return parameters; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseFunctionParameters File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java Repository: json-path/JsonPath The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-51074
MEDIUM
5.3
json-path/JsonPath
parseFunctionParameters
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
f49ff25e3bad8c8a0c853058181f2c00b5beb305
0
Analyze the following code function for security vulnerabilities
@Nonnull @Override public <E extends KrailEntity<ID, VER>> List<E> findAll(@Nonnull Class<E> entityClass) { checkNotNull(entityClass); EntityManager entityManager = entityManagerProvider.get(); TypedQuery<E> query = entityManager.createQuery("SELECT e FROM " + entityName(entityClass) + " e", entityClass); query.setFlushMode(FlushModeType.AUTO); return query.getResultList(); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2016-15018 - Severity: MEDIUM - CVSS Score: 5.2 Description: Fix #18 SQLInjection vulnerability cleared Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key. Function: findAll File: src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java Repository: KrailOrg/krail-jpa Fixed Code: @SuppressFBWarnings("SQL_INJECTION_JPA") // The only parameter is entityName(), which is limited to either the simple class name of the entity, or its annotation @Nonnull @Override public <E extends KrailEntity<ID, VER>> List<E> findAll(@Nonnull Class<E> entityClass) { checkNotNull(entityClass); EntityManager entityManager = entityManagerProvider.get(); TypedQuery<E> query = entityManager.createQuery("SELECT e FROM " + entityName(entityClass) + " e", entityClass); query.setFlushMode(FlushModeType.AUTO); return query.getResultList(); }
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
findAll
src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
1
Analyze the following code function for security vulnerabilities
public Attachment addAttachment(String fileName, byte[] data) { try { return new Attachment(this, this.getDoc().addAttachment(fileName, data, getXWikiContext()), getXWikiContext()); } catch (XWikiException e) { // TODO Log the error and let the user know about it } finally { updateAuthor(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAttachment 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
addAttachment
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 static BufferedImage getCharlieImage() { return getImage("charlie.png"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCharlieImage File: src/net/sourceforge/plantuml/version/PSystemVersion.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
getCharlieImage
src/net/sourceforge/plantuml/version/PSystemVersion.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
public ComponentName getCallingActivity(IBinder token) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallingActivity File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getCallingActivity
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private int toBrightnessOverride(float value) { return (int)(value * PowerManager.BRIGHTNESS_ON); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toBrightnessOverride 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
toBrightnessOverride
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public boolean postNeedsApproval(Profile authUser) { return postsNeedApproval() && authUser.getVotes() < CONF.postsReputationThreshold() && !isMod(authUser); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postNeedsApproval File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
postNeedsApproval
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public LBMember updateMember(LBMember member) { members.put(member.id, member); return member; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateMember File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java Repository: floodlight The code follows secure coding practices.
[ "CWE-362", "CWE-476" ]
CVE-2015-6569
MEDIUM
4.3
floodlight
updateMember
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
7f5bedb625eec3ff4d29987c31cef2553a962b36
0
Analyze the following code function for security vulnerabilities
protected Element elementImpl(String name, String namespaceURI) { assertElementContainsNoOrWhitespaceOnlyTextNodes(this.xmlNode); if (namespaceURI == null) { return getDocument().createElement(name); } else { return getDocument().createElementNS(namespaceURI, name); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: elementImpl File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
elementImpl
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
private static ConsoleResult execute(CommandLine hgCmd, NamedProcessTag processTag) { return hgCmd.runOrBomb(processTag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: execute File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2022-29184
MEDIUM
6.5
gocd
execute
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
37d35115db2ada2190173f9413cfe1bc6c295ecb
0
Analyze the following code function for security vulnerabilities
protected Boolean _coerceBooleanFromInt(JsonParser p, DeserializationContext ctxt, Class<?> rawTargetType) throws IOException { CoercionAction act = ctxt.findCoercionAction(LogicalType.Boolean, rawTargetType, CoercionInputShape.Integer); switch (act) { case Fail: _checkCoercionFail(ctxt, act, rawTargetType, p.getNumberValue(), "Integer value ("+p.getText()+")"); return Boolean.FALSE; case AsNull: return null; case AsEmpty: return Boolean.FALSE; default: } // 13-Oct-2016, tatu: As per [databind#1324], need to be careful wrt // degenerate case of huge integers, legal in JSON. // Also note that number tokens can not have WS to trim: if (p.getNumberType() == NumberType.INT) { // but minor optimization for common case is possible: return p.getIntValue() != 0; } return !"0".equals(p.getText()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _coerceBooleanFromInt File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42003
HIGH
7.5
FasterXML/jackson-databind
_coerceBooleanFromInt
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
d78d00ee7b5245b93103fef3187f70543d67ca33
0
Analyze the following code function for security vulnerabilities
private void unfreezePackage(String packageName) { synchronized (mPackages) { final PackageSetting ps = mSettings.mPackages.get(packageName); if (ps != null) { ps.frozen = false; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unfreezePackage File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
unfreezePackage
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public void onResume() { super.onResume(); updateStage(mUiStage); if (mSaveAndFinishWorker != null) { setRightButtonEnabled(false); mSaveAndFinishWorker.setListener(this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onResume File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
onResume
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
void getEffectiveTouchableRegion(Region outRegion) { final DisplayContent dc = getDisplayContent(); if (mAttrs.isModal() && dc != null) { outRegion.set(dc.getBounds()); cropRegionToRootTaskBoundsIfNeeded(outRegion); subtractTouchExcludeRegionIfNeeded(outRegion); } else { getTouchableRegion(outRegion); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEffectiveTouchableRegion File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getEffectiveTouchableRegion
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Test public void selectStreamParamTrans(TestContext context) { postgresClient = createNumbers(context, 31, 32, 33); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.selectStream(trans, "SELECT i FROM numbers WHERE i IN (?, ?, ?) ORDER BY i", new JsonArray().add(31).add(33).add(35), context.asyncAssertSuccess(select -> { intsAsString(select, context.asyncAssertSuccess(string -> { postgresClient.endTx(trans, context.asyncAssertSuccess()); context.assertEquals("31, 33", string); })); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectStreamParamTrans File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
selectStreamParamTrans
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
final static private XMLStreamReader createXMLStreamReader(InputStream inputStream) throws XMLStreamException, IOException { XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.IS_COALESCING, true); factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, true); return factory.createXMLStreamReader(wrapPrefixRemovingInputStream(inputStream)); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-20157 - Severity: MEDIUM - CVSS Score: 5.0 Description: Disable DTDs in XML importer. Closes #1907. Function: createXMLStreamReader File: main/src/com/google/refine/importers/XmlImporter.java Repository: OpenRefine Fixed Code: final static private XMLStreamReader createXMLStreamReader(InputStream inputStream) throws XMLStreamException, IOException { XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.IS_COALESCING, true); factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, true); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); return factory.createXMLStreamReader(wrapPrefixRemovingInputStream(inputStream)); }
[ "CWE-611" ]
CVE-2018-20157
MEDIUM
5
OpenRefine
createXMLStreamReader
main/src/com/google/refine/importers/XmlImporter.java
6a0d7d56e4ffb420316ce7849fde881344fbf881
1
Analyze the following code function for security vulnerabilities
private static void parseCSSRules(Element root, Map<String, Property> cssRules1, Map<String, AntiSamyPattern> commonRegularExpressions1) throws PolicyException { for (Element ele : getByTagName(root, "property")){ String name = getAttributeValue(ele, "name"); String description = getAttributeValue(ele, "description"); List<Pattern> allowedRegexp3 = getAllowedRegexp3(commonRegularExpressions1, ele, name); List<String> allowedValue = new ArrayList<String>(); for (Element literalNode : getGrandChildrenByTagName(ele, "literal-list", "literal")) { allowedValue.add(getAttributeValue(literalNode, "value")); } List<String> shortHandRefs = new ArrayList<String>(); for (Element shorthandNode : getGrandChildrenByTagName(ele, "shorthand-list", "shorthand")) { shortHandRefs.add(getAttributeValue(shorthandNode, "name")); } String onInvalid = getAttributeValue(ele, "onInvalid"); final String onInvalidStr; if (onInvalid != null && onInvalid.length() > 0) { onInvalidStr = onInvalid; } else { onInvalidStr = DEFAULT_ONINVALID; } Property property = new Property(name,allowedRegexp3, allowedValue, shortHandRefs, description, onInvalidStr ); cssRules1.put(name.toLowerCase(), property); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseCSSRules File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
parseCSSRules
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
public Tag createTag(ShaarliAccount masterAccount, String value) { Tag tag = new Tag(); tag.setMasterAccount(masterAccount); tag.setValue(value.trim()); ContentValues values = new ContentValues(); values.put(MySQLiteHelper.TAGS_COLUMN_ID_ACCOUNT, masterAccount.getId()); values.put(MySQLiteHelper.TAGS_COLUMN_TAG, tag.getValue()); // If existing, do nothing : Cursor cursor = db.query(MySQLiteHelper.TABLE_TAGS, allColumns, MySQLiteHelper.TAGS_COLUMN_ID_ACCOUNT + " = " + tag.getMasterAccountId() + " AND " + MySQLiteHelper.TAGS_COLUMN_TAG + " = '" + tag.getValue() + "'", null, null, null, null); try { cursor.moveToFirst(); if (cursor.isAfterLast()) { long insertId = db.insert(MySQLiteHelper.TABLE_TAGS, null, values); tag.setId(insertId); return tag; } else { tag = cursorToTag(cursor); } } catch (Exception e){ tag = null; } finally { cursor.close(); } return tag; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2015-10076 - Severity: MEDIUM - CVSS Score: 5.2 Description: Solve bug with tags (possible sql injection) Function: createTag File: app/src/main/java/com/dimtion/shaarlier/TagsSource.java Repository: dimtion/Shaarlier Fixed Code: public Tag createTag(ShaarliAccount masterAccount, String value) { Tag tag = new Tag(); tag.setMasterAccount(masterAccount); tag.setValue(value.trim()); ContentValues values = new ContentValues(); values.put(MySQLiteHelper.TAGS_COLUMN_ID_ACCOUNT, masterAccount.getId()); values.put(MySQLiteHelper.TAGS_COLUMN_TAG, tag.getValue()); // If existing, do nothing : String[] getTagArgs = {String.valueOf(tag.getMasterAccountId()), tag.getValue()}; Cursor cursor = db.query(MySQLiteHelper.TABLE_TAGS, allColumns, MySQLiteHelper.TAGS_COLUMN_ID_ACCOUNT + " = ? AND " + MySQLiteHelper.TAGS_COLUMN_TAG + " = ?", getTagArgs, null, null, null); try { cursor.moveToFirst(); if (cursor.isAfterLast()) { long insertId = db.insert(MySQLiteHelper.TABLE_TAGS, null, values); tag.setId(insertId); return tag; } else { tag = cursorToTag(cursor); } } catch (Exception e){ tag = null; } finally { cursor.close(); } return tag; }
[ "CWE-89" ]
CVE-2015-10076
MEDIUM
5.2
dimtion/Shaarlier
createTag
app/src/main/java/com/dimtion/shaarlier/TagsSource.java
3d1d9b239d9b3cd87e8bed45a0f02da583ad371e
1
Analyze the following code function for security vulnerabilities
@JsonProperty("IssuedBy") public String getIssuedBy() { return issuedBy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIssuedBy File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getIssuedBy
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public void setTestEmergencyPhoneAccountPackageNameFilter(String packageName) { try { Log.startSession("TSI.sTPAPNF"); enforceModifyPermission(); enforceShellOnly(Binder.getCallingUid(), "setTestEmergencyPhoneAccountPackageNameFilter"); synchronized (mLock) { long token = Binder.clearCallingIdentity(); try { mPhoneAccountRegistrar.setTestPhoneAccountPackageNameFilter(packageName); } finally { Binder.restoreCallingIdentity(token); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTestEmergencyPhoneAccountPackageNameFilter 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
setTestEmergencyPhoneAccountPackageNameFilter
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
@Override public void onNetworkUnwanted() { // Ignore if we're not the current networkAgent. if (!isThisCallbackActive()) return; if (mVerboseLoggingEnabled) { logd("WifiNetworkAgent -> Wifi unwanted score " + mWifiInfo.getScore()); } unwantedNetwork(NETWORK_STATUS_UNWANTED_DISCONNECT); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNetworkUnwanted File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
onNetworkUnwanted
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void disconnect() { disconnect(DisconnectReason.BY_APPLICATION); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: disconnect File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
disconnect
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
private boolean getAutoTime() { try { return Settings.Global.getInt(mCr, Settings.Global.AUTO_TIME) > 0; } catch (SettingNotFoundException snfe) { return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAutoTime File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
getAutoTime
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
public ScanDetailCache getScanDetailCacheForNetwork(int networkId) { return mScanDetailCaches.get(networkId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScanDetailCacheForNetwork 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
getScanDetailCacheForNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public void write(byte[] b, int offset, int length) throws IOException { if (b == null) { throw new NullPointerException(); } if (offset < 0 || offset + length > b.length) { throw new ArrayIndexOutOfBoundsException(); } write(fd, b, offset, length); }
Vulnerability Classification: - CWE: CWE-190, CWE-787 - CVE: CVE-2020-28371 - Severity: HIGH - CVSS Score: 7.5 Description: Fix integer overflow leading to out-of-bounds read/write Function: write File: classpath/java/io/FileOutputStream.java Repository: ReadyTalk/avian Fixed Code: public void write(byte[] b, int offset, int length) throws IOException { if (b == null) { throw new NullPointerException(); } if (offset < 0 || length < 0 || length > b.length || offset > b.length - length) { throw new ArrayIndexOutOfBoundsException(); } write(fd, b, offset, length); }
[ "CWE-190", "CWE-787" ]
CVE-2020-28371
HIGH
7.5
ReadyTalk/avian
write
classpath/java/io/FileOutputStream.java
0871979b298add320ca63f65060acb7532c8a0dd
1
Analyze the following code function for security vulnerabilities
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("MinHomeDownlinkBandwidth: ").append(mMinHomeDownlinkBandwidth) .append("\n"); builder.append("MinHomeUplinkBandwidth: ").append(mMinHomeUplinkBandwidth).append("\n"); builder.append("MinRoamingDownlinkBandwidth: ").append(mMinRoamingDownlinkBandwidth) .append("\n"); builder.append("MinRoamingUplinkBandwidth: ").append(mMinRoamingUplinkBandwidth) .append("\n"); builder.append("ExcludedSSIDList: ").append(mExcludedSsidList).append("\n"); builder.append("RequiredProtoPortMap: ").append(mRequiredProtoPortMap).append("\n"); builder.append("MaximumBSSLoadValue: ").append(mMaximumBssLoadValue).append("\n"); builder.append("PreferredRoamingPartnerList: ").append(mPreferredRoamingPartnerList) .append("\n"); if (mPolicyUpdate != null) { builder.append("PolicyUpdate Begin ---\n"); builder.append(mPolicyUpdate); builder.append("PolicyUpdate End ---\n"); } return builder.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: framework/java/android/net/wifi/hotspot2/pps/Policy.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21240
MEDIUM
5.5
android
toString
framework/java/android/net/wifi/hotspot2/pps/Policy.java
69119d1d3102e27b6473c785125696881bce9563
0
Analyze the following code function for security vulnerabilities
@GET @Path("{userId}/tokens") @ApiOperation("Retrieves the list of access tokens for a user") public TokenList listTokens(@ApiParam(name = "userId", required = true) @PathParam("userId") String userId) { final User user = loadUserById(userId); final String username = user.getName(); if (!isPermitted(USERS_TOKENLIST, username)) { throw new ForbiddenException("Not allowed to list tokens for user " + username); } final ImmutableList.Builder<TokenSummary> tokenList = ImmutableList.builder(); for (AccessToken token : accessTokenService.loadAll(user.getName())) { tokenList.add(TokenSummary.create(token.getId(), token.getName(), token.getLastAccess())); } return TokenList.create(tokenList.build()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listTokens File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-613" ]
CVE-2023-41041
LOW
3.1
Graylog2/graylog2-server
listTokens
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
0
Analyze the following code function for security vulnerabilities
public Builder withPrivateKey(byte[] privateKeyVal, XMSSParameters xmssVal) { privateKey = XMSSUtil.cloneArray(privateKeyVal); xmss = xmssVal; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withPrivateKey File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
withPrivateKey
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
public void privateMessageWith(final Jid counterpart) { if (conversation.setOutgoingChatState(Config.DEFAULT_CHATSTATE)) { activity.xmppConnectionService.sendChatState(conversation); } this.binding.textinput.setText(""); this.conversation.setNextCounterpart(counterpart); updateChatMsgHint(); updateSendButton(); updateEditablity(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: privateMessageWith File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
privateMessageWith
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err, String[] args, ShellCallback callback, ResultReceiver resultReceiver) { (new ActivityManagerShellCommand(this, false)).exec( this, in, out, err, args, callback, resultReceiver); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onShellCommand 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
onShellCommand
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private static boolean hasValidDomains(ActivityIntentInfo filter) { return filter.hasCategory(Intent.CATEGORY_BROWSABLE) && (filter.hasDataScheme(IntentFilter.SCHEME_HTTP) || filter.hasDataScheme(IntentFilter.SCHEME_HTTPS)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasValidDomains File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
hasValidDomains
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public V get(K key) { Jedis jedis = jedisPool.getResource(); V value = valueSerializer.deserialize(jedis.get(getKey(key))); jedis.close(); return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-46990
CRITICAL
9.8
sanluan/PublicCMS
get
publiccms-parent/publiccms-cache/src/main/java/com/publiccms/common/redis/RedisCacheEntity.java
c7bf58bf07fdc60a71134c6a73a4947c7709abf7
0
Analyze the following code function for security vulnerabilities
@Test public void gexp() throws Exception { final DataPoints[] datapoints = new DataPoints[1]; datapoints[0] = new MockDataPoints().getMock(); when(query_result.runAsync()).thenReturn( Deferred.fromResult(datapoints)); final HttpQuery query = NettyMocks.getQuery(tsdb, "/api/query/gexp?start=1h-ago&exp=scale(sum:sys.cpu.user,1)"); NettyMocks.mockChannelFuture(query); rpc.execute(tsdb, query); assertEquals(query.response().getStatus(), HttpResponseStatus.OK); final String json = query.response().getContent().toString(Charset.forName("UTF-8")); assertTrue(json.contains("\"metric\":\"system.cpu.user\"")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gexp File: test/tsd/TestQueryRpc.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
gexp
test/tsd/TestQueryRpc.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
public <T extends Item> List<T> getAllItems(Class<T> type) { List<T> r = new ArrayList<T>(); Stack<ItemGroup> q = new Stack<ItemGroup>(); q.push(this); while(!q.isEmpty()) { ItemGroup<?> parent = q.pop(); for (Item i : parent.getItems()) { if(type.isInstance(i)) { if (i.hasPermission(Item.READ)) r.add(type.cast(i)); } if(i instanceof ItemGroup) q.push((ItemGroup)i); } } return r; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllItems 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
getAllItems
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public void loadDataWithBaseUrlAsync(final AwContents awContents, final String data, final String mimeType, final boolean isBase64Encoded, final String baseUrl, final String historyUrl) throws Throwable { runTestOnUiThread(new Runnable() { @Override public void run() { awContents.loadDataWithBaseURL( baseUrl, data, mimeType, isBase64Encoded ? "base64" : null, historyUrl); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadDataWithBaseUrlAsync File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
loadDataWithBaseUrlAsync
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
protected void copyFile(File file, OutputStream os) throws IOException { final int buffersize = 4096; FileInputStream fis = new FileInputStream(file); try { byte[] buf = new byte[buffersize]; int count; while ((count = fis.read(buf, 0, buffersize)) != -1) { os.write(buf, 0, count); } } finally { fis.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyFile File: main/src/com/google/refine/io/FileProjectManager.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-37476
HIGH
7.8
OpenRefine
copyFile
main/src/com/google/refine/io/FileProjectManager.java
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
0
Analyze the following code function for security vulnerabilities
public Set<String> getRepositories() { return repositories; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-41967 - Severity: HIGH - CVSS Score: 7.5 Description: fix: CVE-2022-41967 Dragonfly v0.3.0-SNAPSHOT fails to properly configure the DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when parsing maven-metadata.xml files provided by external Maven repositories during "SNAPSHOT" version resolution. This patches CVE-2022-41967 by disabling features which may lead to XXE. If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to update Dragonfly to v0.3.1-SNAPSHOT just to be safe. Function: getRepositories File: src/main/java/dev/hypera/dragonfly/Dragonfly.java Repository: HyperaDev/Dragonfly Fixed Code: public @NotNull Set<String> getRepositories() { return repositories; }
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
getRepositories
src/main/java/dev/hypera/dragonfly/Dragonfly.java
9661375e1135127ca6cdb5712e978bec33cc06b3
1
Analyze the following code function for security vulnerabilities
@Override protected void deinitialize() { act.runOnUiThread(new Runnable() { @Override public void run() { if(android.os.Build.VERSION.SDK_INT == 21) { // bugfix for Android 5.0.x web.setLayerType(View.LAYER_TYPE_SOFTWARE, null); //setting layer type to software to prevent the sigseg 11 crash } } }); super.deinitialize(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deinitialize File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
deinitialize
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private static boolean isSuccessfulLaunch(int result) { return result == ActivityManager.START_SUCCESS || result == ActivityManager.START_DELIVERED_TO_TOP || result == ActivityManager.START_TASK_TO_FRONT; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSuccessfulLaunch File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isSuccessfulLaunch
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public boolean isGPSDetectionSupported() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isGPSDetectionSupported File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isGPSDetectionSupported
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected long gracefulShutdownTimeoutMillis() { return gracefulShutdownTimeoutMillis; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gracefulShutdownTimeoutMillis File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
gracefulShutdownTimeoutMillis
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
@Override public void setConferenceableConnections(String callId, List<String> conferenceableCallIds, Session.Info sessionInfo) { Log.startSession(sessionInfo, "CSW.sCC", mPackageAbbreviation); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { Call call = mCallIdMapper.getCall(callId); if (call != null) { logIncoming("setConferenceableConnections %s %s", callId, conferenceableCallIds); List<Call> conferenceableCalls = new ArrayList<>(conferenceableCallIds.size()); for (String otherId : conferenceableCallIds) { Call otherCall = mCallIdMapper.getCall(otherId); if (otherCall != null && otherCall != call) { conferenceableCalls.add(otherCall); } } call.setConferenceableCalls(conferenceableCalls); } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setConferenceableConnections File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setConferenceableConnections
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public Socket getSocket() { return mSocket; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSocket File: src/main/java/com/neovisionaries/ws/client/SocketConnector.java Repository: TakahikoKawasaki/nv-websocket-client The code follows secure coding practices.
[ "CWE-295" ]
CVE-2017-1000209
MEDIUM
4.3
TakahikoKawasaki/nv-websocket-client
getSocket
src/main/java/com/neovisionaries/ws/client/SocketConnector.java
feb9c8302757fd279f4cfc99cbcdfb6ee709402d
0
Analyze the following code function for security vulnerabilities
private Object getUserDescription(Profile showUser, Long questions, Long answers) { if (showUser == null) { return ""; } return showUser.getVotes() + " points, " + showUser.getBadgesMap().size() + " badges, " + questions + " questions, " + answers + " answers " + Utils.abbreviate(showUser.getAboutme(), 150); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserDescription File: src/main/java/com/erudika/scoold/controllers/ProfileController.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getUserDescription
src/main/java/com/erudika/scoold/controllers/ProfileController.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); if (drawerToggle != null) { drawerToggle.syncState(); } // Fragments are not ready when calling the method below in onCreate() updateButtonLayout(); //Start auto sync if enabled if (mPrefs.getBoolean(SettingsActivity.CB_SYNCONSTARTUP_STRING, true)) { startSync(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPostCreate File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
onPostCreate
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
private int runPath() { String pkg = nextArg(); if (pkg == null) { System.err.println("Error: no package specified"); return 1; } return displayPackageFilePath(pkg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runPath File: cmds/pm/src/com/android/commands/pm/Pm.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3833
HIGH
9.3
android
runPath
cmds/pm/src/com/android/commands/pm/Pm.java
4e4743a354e26467318b437892a9980eb9b8328a
0
Analyze the following code function for security vulnerabilities
protected byte[] decrypt(byte[] src) { try { byte[] zipsrc = codec.decode(src); Inflater decompressor = new Inflater(); byte[] uncompressed = new byte[zipsrc.length * 5]; decompressor.setInput(zipsrc); int totalOut = decompressor.inflate(uncompressed); byte[] out = new byte[totalOut]; System.arraycopy(uncompressed, 0, out, 0, totalOut); decompressor.end(); return out; } catch (Exception e) { throw new FacesException("Error decode resource data", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decrypt File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
decrypt
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
@Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOutputStream File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java Repository: spring-projects/spring-framework The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-4152
MEDIUM
6.8
spring-projects/spring-framework
getOutputStream
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
0
Analyze the following code function for security vulnerabilities
@Override public byte getByteProperty(String name) throws JMSException { Object o = this.getObjectProperty(name); if (o == null) throw new NumberFormatException("Null is not a valid byte"); else if (o instanceof String) { return Byte.parseByte((String) o); } else if (o instanceof Byte) { return (Byte) o; } else throw new MessageFormatException(String.format("Unable to convert from class [%s]", o.getClass().getName())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getByteProperty File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
getByteProperty
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
private void parseRepairCosts(final RepairRule rule, final List<Element> elements) throws GameParseException { if (elements.size() == 0) { throw newGameParseException("no costs for rule:" + rule.getName()); } for (final Element current : elements) { final Resource resource = getResource(current, "resource", true); final int quantity = Integer.parseInt(current.getAttribute("quantity")); rule.addCost(resource, quantity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseRepairCosts File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
parseRepairCosts
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
public void setRequestHeader(String header, String value) { if (getReadyState() != ReadyState.OPEN) { throw new IllegalStateException("The HttpRequestImpl must be opened prior to setting a request header"); } // TODO // if the header argument doesn't match the "field-name production", // throw an illegal argument exception // if the value argument doesn't match the "field-value production", // throw an illegal argument exception if (header == null || value == null) { throw new IllegalArgumentException("Neither the header, nor value, may be null"); } // NOTE: The spec says, nothing should be done if the header argument // matches: // Accept-Charset, Accept-Encoding, Content-Length, Expect, Date, Host, // Keep-Alive, // Referer, TE, Trailer, Transfer-Encoding, Upgrade // The spec says this for security reasons, but I don't understand why? // I'll follow // the spec's suggestion until I know more (can always allow more // headers, but // restricting them is more painful). Note that Session doesn't impose // any such // restrictions, so you can always set "Accept-Encoding" etc on the // Session... // except that Session has no way to set these at the moment, except via // a Request. switch (header.toUpperCase()) { case "AUTHORIZATION": case "CONTENT-BASE": case "CONTENT-LOCATION": case "CONTENT-MD5": case "CONTENT-RANGE": case "CONTENT-TYPE": case "CONTENT-VERSION": case "DELTA-BASE": case "DEPTH": case "DESTINATION": case "ETAG": case "EXPECT": case "FROM": case "IF-MODIFIED-SINCE": case "IF-RANGE": case "IF-UNMODIFIED-SINCE": case "MAX-FORWARDS": case "MIME-VERSION": case "OVERWRITE": case "PROXY-AUTHORIZATION": case "SOAPACTION": case "TIMEOUT": for (Header h : req.getHeaders()) { if (h.getName().equalsIgnoreCase(header)) { req.removeHeader(h); req.setHeader(new Header(header, value)); break; } } break; case "ACCEPT-CHARSET": case "ACCEPT-ENCODING": case "CONTENT-LENGTH": case "DATE": case "HOST": case "KEEP-ALIVE": case "REFERER": case "TE": case "TRAILER": case "TRANSFER-ENCODING": case "UPGRADE": break; default: boolean appended = false; for (Header h : req.getHeaders()) { if (h.getName().equalsIgnoreCase(header)) { req.removeHeader(h); req.setHeader(new Header(header, h.getValue() + ", " + value)); appended = true; break; } } if (!appended) { req.setHeader(new Header(header, value)); } break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequestHeader File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java Repository: LoboEvolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000540
MEDIUM
6.8
LoboEvolution
setRequestHeader
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
public void record(StatusBarNotification nr) { if (mBuffer.size() == mBufferSize) { mBuffer.removeFirst(); } // We don't want to store the heavy bits of the notification in the archive, // but other clients in the system process might be using the object, so we // store a (lightened) copy. mBuffer.addLast(nr.cloneLight()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: record 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
record
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { StringBuffer sb = new StringBuffer(); for (String key : mFields.keySet()) { sb.append(key).append(" ").append(mFields.get(key)).append("\n"); } return sb.toString(); }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2016-3897 - Severity: MEDIUM - CVSS Score: 4.3 Description: WifiEnterpriseConfiguration: Do not print credentials in toString BUG:25624963 Change-Id: I939a12a27d6b915d8a9cc8b142f645fba0ee42ec Function: toString File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android Fixed Code: @Override public String toString() { StringBuffer sb = new StringBuffer(); for (String key : mFields.keySet()) { // Don't display password in toString(). String value = (key == PASSWORD_KEY) ? "<removed>" : mFields.get(key); sb.append(key).append(" ").append(value).append("\n"); } return sb.toString(); }
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
toString
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
55271d454881b67ff38485fdd97598c542cc2d55
1
Analyze the following code function for security vulnerabilities
public void setCaseId(String argCaseId) { this.caseId = argCaseId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCaseId File: src/main/java/emissary/pickup/WorkBundle.java Repository: NationalSecurityAgency/emissary The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-32634
MEDIUM
6.5
NationalSecurityAgency/emissary
setCaseId
src/main/java/emissary/pickup/WorkBundle.java
40260b1ec1f76cc92361702cc14fa1e4388e19d7
0
Analyze the following code function for security vulnerabilities
public void UpdateItemList() { try { NewsReaderDetailFragment nrD = getNewsReaderDetailFragment(); if (nrD != null && nrD.getRecyclerView() != null) { nrD.getRecyclerView().getAdapter().notifyDataSetChanged(); } } catch (Exception ex) { ex.printStackTrace(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: UpdateItemList File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
UpdateItemList
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@Override public final Set<AsciiString> names() { if (isEmpty()) { return ImmutableSet.of(); } final ImmutableSet.Builder<AsciiString> builder = ImmutableSet.builder(); HeaderEntry e = head.after; while (e != head) { builder.add(e.getKey()); e = e.after; } return builder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: names File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
names
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public static String getEnterpriseGroupName(String subsystemname) { return "Enterprise " + subsystemname + " Administrators"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnterpriseGroupName File: base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getEnterpriseGroupName
base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
protected void internalGetPartitionedStats(AsyncResponse asyncResponse, boolean authoritative, boolean perPartition, boolean getPreciseBacklog, boolean subscriptionBacklogSize) { if (topicName.isGlobal()) { try { validateGlobalNamespaceOwnership(namespaceName); } catch (Exception e) { log.error("[{}] Failed to get partitioned stats for {}", clientAppId(), topicName, e); resumeAsyncResponseExceptionally(asyncResponse, e); return; } } getPartitionedTopicMetadataAsync(topicName, authoritative, false).thenAccept(partitionMetadata -> { if (partitionMetadata.partitions == 0) { asyncResponse.resume(new RestException(Status.NOT_FOUND, "Partitioned Topic not found")); return; } PartitionedTopicStatsImpl stats = new PartitionedTopicStatsImpl(partitionMetadata); List<CompletableFuture<TopicStats>> topicStatsFutureList = Lists.newArrayList(); for (int i = 0; i < partitionMetadata.partitions; i++) { try { topicStatsFutureList .add(pulsar().getAdminClient().topics().getStatsAsync( (topicName.getPartition(i).toString()), getPreciseBacklog, subscriptionBacklogSize)); } catch (PulsarServerException e) { asyncResponse.resume(new RestException(e)); return; } } FutureUtil.waitForAll(topicStatsFutureList).handle((result, exception) -> { CompletableFuture<TopicStats> statFuture = null; for (int i = 0; i < topicStatsFutureList.size(); i++) { statFuture = topicStatsFutureList.get(i); if (statFuture.isDone() && !statFuture.isCompletedExceptionally()) { try { stats.add(statFuture.get()); if (perPartition) { stats.getPartitions().put(topicName.getPartition(i).toString(), (TopicStatsImpl) statFuture.get()); } } catch (Exception e) { asyncResponse.resume(new RestException(e)); return null; } } } if (perPartition && stats.partitions.isEmpty()) { String path = ZkAdminPaths.partitionedTopicPath(topicName); try { boolean zkPathExists = namespaceResources().getPartitionedTopicResources().exists(path); if (zkPathExists) { stats.getPartitions().put(topicName.toString(), new TopicStatsImpl()); } else { asyncResponse.resume( new RestException(Status.NOT_FOUND, "Internal topics have not been generated yet")); return null; } } catch (Exception e) { asyncResponse.resume(new RestException(e)); return null; } } asyncResponse.resume(stats); return null; }); }).exceptionally(ex -> { log.error("[{}] Failed to get partitioned stats for {}", clientAppId(), topicName, ex); resumeAsyncResponseExceptionally(asyncResponse, ex); return null; }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalGetPartitionedStats File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalGetPartitionedStats
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
@Override public String getNotNullConditionSQL(String column) { return column + " IS NOT NULL"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotNullConditionSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getNotNullConditionSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
boolean configHciSnoopLog(boolean enable) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); return configHciSnoopLogNative(enable); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: configHciSnoopLog 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
configHciSnoopLog
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
private static String userRestrictionSourceToString(@UserRestrictionSource int source) { return DebugUtils.flagsToString(UserManager.class, "RESTRICTION_", source); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userRestrictionSourceToString 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
userRestrictionSourceToString
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected List<String> getRawCommandLine( String executable, String[] arguments ) { List<String> commandLine = new ArrayList<String>(); StringBuilder sb = new StringBuilder(); if ( executable != null ) { String preamble = getExecutionPreamble(); if ( preamble != null ) { sb.append( preamble ); } if ( isQuotedExecutableEnabled() ) { char[] escapeChars = getEscapeChars( isSingleQuotedExecutableEscaped(), isDoubleQuotedExecutableEscaped() ); sb.append( StringUtils.quoteAndEscape( getExecutable(), getExecutableQuoteDelimiter(), escapeChars, getQuotingTriggerChars(), '\\', false ) ); } else { sb.append( getExecutable() ); } } for ( int i = 0; i < arguments.length; i++ ) { if ( sb.length() > 0 ) { sb.append( " " ); } if ( isQuotedArgumentsEnabled() ) { char[] escapeChars = getEscapeChars( isSingleQuotedArgumentEscaped(), isDoubleQuotedArgumentEscaped() ); sb.append( StringUtils.quoteAndEscape( arguments[i], getArgumentQuoteDelimiter(), escapeChars, getQuotingTriggerChars(), getArgumentEscapePattern(), false ) ); } else { sb.append( arguments[i] ); } } commandLine.add( sb.toString() ); return commandLine; }
Vulnerability Classification: - CWE: CWE-78 - CVE: CVE-2017-1000487 - Severity: HIGH - CVSS Score: 7.5 Description: [PLXUTILS-161] Commandline shell injection problems Patch by Charles Duffy, applied unmodified Function: getRawCommandLine File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java Repository: codehaus-plexus/plexus-utils Fixed Code: protected List<String> getRawCommandLine( String executable, String[] arguments ) { List<String> commandLine = new ArrayList<String>(); StringBuilder sb = new StringBuilder(); if ( executable != null ) { String preamble = getExecutionPreamble(); if ( preamble != null ) { sb.append( preamble ); } if ( isQuotedExecutableEnabled() ) { sb.append( quoteOneItem( getOriginalExecutable(), true ) ); } else { sb.append( getExecutable() ); } } for ( int i = 0; i < arguments.length; i++ ) { if ( sb.length() > 0 ) { sb.append( " " ); } if ( isQuotedArgumentsEnabled() ) { sb.append( quoteOneItem( arguments[i], false ) ); } else { sb.append( arguments[i] ); } } commandLine.add( sb.toString() ); return commandLine; }
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getRawCommandLine
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
1
Analyze the following code function for security vulnerabilities
public void updateBlob(@Positive int columnIndex, @Nullable InputStream inputStream) throws SQLException { throw org.postgresql.Driver.notImplemented(this.getClass(), "updateBlob(int, InputStream)"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateBlob 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
updateBlob
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public Credential getCredential(SVNURL url, String realm) { for (SubversionCredentialProvider p : SubversionCredentialProvider.all()) { Credential c = p.getCredential(url,realm); if(c!=null) { LOGGER.fine(String.format("getCredential(%s)=>%s by %s",realm,c,p)); return c; } } LOGGER.fine(String.format("getCredential(%s)=>%s",realm,credentials.get(realm))); return credentials.get(realm); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCredential File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
getCredential
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
Looper getMyLooper() { return Looper.myLooper(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMyLooper 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
getMyLooper
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@GetMapping("/notifications") public String notifications() { return render("notifications"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifications File: src/main/java/co/yiiu/pybbs/controller/front/IndexController.java Repository: atjiu/pybbs The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-23391
MEDIUM
4.3
atjiu/pybbs
notifications
src/main/java/co/yiiu/pybbs/controller/front/IndexController.java
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
0
Analyze the following code function for security vulnerabilities
@Override public void write(int value) { digest.update((byte) value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: core/java/android/util/jar/StrictJarVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
write
core/java/android/util/jar/StrictJarVerifier.java
84df68840b6f2407146e722ebd95a7d8bc6e3529
0
Analyze the following code function for security vulnerabilities
private long getScreenshotChordLongPressDelay() { if (mKeyguardDelegate.isShowing()) { // Double the time it takes to take a screenshot from the keyguard return (long) (KEYGUARD_SCREENSHOT_CHORD_DELAY_MULTIPLIER * ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout()); } return ViewConfiguration.get(mContext).getDeviceGlobalActionKeyTimeout(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScreenshotChordLongPressDelay 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
getScreenshotChordLongPressDelay
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
@Override public InputStream getResourceAsStream(Class cls, String resource) { try { if (resource.startsWith("/")) { resource = resource.substring(1); } return getContext().getAssets().open(resource); } catch (IOException ex) { Log.i("Codename One", "Resource not found: " + resource); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourceAsStream File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getResourceAsStream
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
void notifyCometJoined(String remoteOortId, String remoteOortURL) { if (_logger.isDebugEnabled()) { _logger.debug("Comet joined: {}|{}", remoteOortId, remoteOortURL); } CometListener.Event event = new CometListener.Event(this, remoteOortId, remoteOortURL); for (CometListener cometListener : _cometListeners) { try { cometListener.cometJoined(event); } catch (Throwable x) { _logger.info("Exception while invoking listener " + cometListener, x); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyCometJoined File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
notifyCometJoined
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
bb445a143fbf320f17c62e340455cd74acfb5929
0