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 void onAccountsUpdated(Account[] accounts) { // Review current upload, and cancel it if its account doesn't exist if (mCurrentUpload != null && !accountManager.exists(mCurrentUpload.getUser().toPlatformAccount())) { mCurrentUpload.cancel(ResultCode.ACCOUNT_NOT_FOUND); } // The rest of uploads are cancelled when they try to start }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAccountsUpdated File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-39210
MEDIUM
5.5
nextcloud/android
onAccountsUpdated
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
cd3bd0845a97e1d43daa0607a122b66b0068c751
0
Analyze the following code function for security vulnerabilities
public void incrementServerId() { serverSyncId++; if (getLogger().isTraceEnabled()) { getLogger().trace("Increment syncId {} -> {}:\n{}", (serverSyncId - 1), serverSyncId, Arrays.stream(Thread.currentThread().getStackTrace()) .skip(1).map(String::valueOf).collect(Collectors .joining(System.lineSeparator()))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: incrementServerId File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
incrementServerId
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Override public int getStatus() { return status; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStatus File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
getStatus
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
public Vector<Object> getObjects(String classname, String key, String value) { Vector<Object> result = new Vector<Object>(); if (StringUtils.isBlank(key) || value == null) { return getObjects(classname); } try { Vector<BaseObject> allObjects = this.getDoc().getObjects(classname); if (allObjects == null || allObjects.size() == 0) { return result; } else { for (BaseObject obj : allObjects) { if (obj != null) { BaseProperty prop = (BaseProperty) obj.get(key); if (prop == null || prop.getValue() == null) { continue; } if (value.equals(prop.getValue().toString())) { result.add(newObjectApi(obj, getXWikiContext())); } } } } } catch (Exception e) { } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObjects 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
getObjects
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
private BluetoothSocket acceptSocket(String RemoteAddr) throws IOException { BluetoothSocket as = new BluetoothSocket(this); as.mSocketState = SocketState.CONNECTED; FileDescriptor[] fds = mSocket.getAncillaryFileDescriptors(); if (DBG) Log.d(TAG, "socket fd passed by stack fds: " + fds); if(fds == null || fds.length != 1) { Log.e(TAG, "socket fd passed from stack failed, fds: " + fds); as.close(); throw new IOException("bt socket acept failed"); } as.mSocket = new LocalSocket(fds[0]); try { as.mSocket.closeExternalFd(); } catch (IOException e) { Log.e(TAG, "closeExternalFd failed"); } as.mSocketIS = as.mSocket.getInputStream(); as.mSocketOS = as.mSocket.getOutputStream(); as.mAddress = RemoteAddr; as.mDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(RemoteAddr); as.mPort = mPort; return as; }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2014-9908 - Severity: LOW - CVSS Score: 3.3 Description: FPII-2473: Denial of service vulnerability in Bluetooth CVE-2014-9908 A-28672558 A denial of service vulnerability in Bluetooth could enable a proximate attacker to block Bluetooth access to an affected device. This issue is rated as High due to the possibility of remote denial of service. Change-Id: I1c0db02e2773d65c30df785d5db6f2765d737cfc Function: acceptSocket File: core/java/android/bluetooth/BluetoothSocket.java Repository: Genymobile/f2ut_platform_frameworks_base Fixed Code: private BluetoothSocket acceptSocket(String RemoteAddr) throws IOException { BluetoothSocket as = new BluetoothSocket(this); as.mSocketState = SocketState.CONNECTED; FileDescriptor[] fds = mSocket.getAncillaryFileDescriptors(); if (DBG) Log.d(TAG, "socket fd passed by stack fds: " + fds); if(fds == null || fds.length != 1) { Log.e(TAG, "socket fd passed from stack failed, fds: " + fds); as.close(); throw new IOException("bt socket acept failed"); } as.mSocket = new LocalSocket(fds[0]); as.mPfd = new ParcelFileDescriptor(fds[0]); try { as.mSocket.closeExternalFd(); } catch (IOException e) { Log.e(TAG, "closeExternalFd failed"); } as.mSocketIS = as.mSocket.getInputStream(); as.mSocketOS = as.mSocket.getOutputStream(); as.mAddress = RemoteAddr; as.mDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(RemoteAddr); as.mPort = mPort; return as; }
[ "CWE-Other" ]
CVE-2014-9908
LOW
3.3
Genymobile/f2ut_platform_frameworks_base
acceptSocket
core/java/android/bluetooth/BluetoothSocket.java
f24cec326f5f65c693544fb0b92c37f633bacda2
1
Analyze the following code function for security vulnerabilities
@Override public PortForward portForward(int port, ReadableByteChannel in, WritableByteChannel out) { try { return new PortForwarderWebsocket(client).forward(getResourceUrl(), port, in, out); } catch (Throwable t) { throw KubernetesClientException.launderThrowable(t); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: portForward File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java Repository: fabric8io/kubernetes-client The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-20218
MEDIUM
5.8
fabric8io/kubernetes-client
portForward
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
325d67cc80b73f049a5d0cea4917c1f2709a8d86
0
Analyze the following code function for security vulnerabilities
@Override public void removeOnRuntimePermissionStateChangedListener( OnRuntimePermissionStateChangedListener listener) { mPermissionManagerServiceImpl.removeOnRuntimePermissionStateChangedListener(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeOnRuntimePermissionStateChangedListener File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
removeOnRuntimePermissionStateChangedListener
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
public Set<String> getRoleNames() { return getRoles().stream().map(r -> r.getName()).collect(Collectors.toSet()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRoleNames File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
getRoleNames
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0
Analyze the following code function for security vulnerabilities
public void deleteStorageFile(String name) { getContext().deleteFile(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteStorageFile 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
deleteStorageFile
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = MANAGE_DEVICE_POLICY_WIPE_DATA, conditional = true) public void wipeDevice(int flags) { wipeDataInternal(flags, /* wipeReasonForUser= */ "", /* factoryReset= */ true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wipeDevice File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
wipeDevice
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void setColumnReorderingAllowed(boolean columnReorderingAllowed) { if (isColumnReorderingAllowed() != columnReorderingAllowed) { getState().columnReorderingAllowed = columnReorderingAllowed; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setColumnReorderingAllowed File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
setColumnReorderingAllowed
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
@Override public boolean isStaticResourceRequest(HttpServletRequest request) { URL resource; String requestFilename = getRequestFilename(request); if (requestFilename.endsWith("/")) { // Directories are not static resources although // servletContext.getResource will return a URL for them, at // least with Jetty return false; } if (requestFilename.startsWith("/" + VAADIN_STATIC_FILES_PATH) || requestFilename.startsWith("/" + VAADIN_BUILD_FILES_PATH)) { // The path is reserved for internal resources only // We rather serve 404 than let it fall through return true; } resource = servletService.getStaticResource(requestFilename); if (resource == null && shouldFixIncorrectWebjarPaths() && isIncorrectWebjarPath(requestFilename)) { // Flow issue #4601 return true; } return resource != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isStaticResourceRequest File: flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
isStaticResourceRequest
flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
@Override public void writeBytes(byte[] value, int offset, int length) throws JMSException { byte[] buf = new byte[length]; System.arraycopy(value, offset, buf, 0, length); writePrimitive(buf); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeBytes File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
writeBytes
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public void doException() { throw new RuntimeException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doException 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
doException
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private static native @Nullable ParcelFileDescriptor nativeOpenAssetFd(long ptr, @NonNull String fileName, long[] outOffsets) throws IOException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeOpenAssetFd File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeOpenAssetFd
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public void moveTasksToFullscreenStack(int fromStackId, boolean onTop) { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTasksToFullscreenStack()"); if (fromStackId == HOME_STACK_ID) { throw new IllegalArgumentException("You can't move tasks from the home stack."); } synchronized (this) { final long origId = Binder.clearCallingIdentity(); try { mStackSupervisor.moveTasksToFullscreenStackLocked(fromStackId, onTop); } finally { Binder.restoreCallingIdentity(origId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveTasksToFullscreenStack File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
moveTasksToFullscreenStack
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@GetMapping(value = "/buckets/{dayDateStr}") @Loggable @Operation(description = "Request the available release batch times for a given day") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "zipped export.bin and export.sig of all keys in that interval"), @ApiResponse(responseCode = "400", description = "invalid starting key date, points outside of the retention range")}) public @ResponseBody ResponseEntity<DayBuckets> getBuckets( @PathVariable @Parameter(description = "Starting date for exposed key retrieval, as ISO-8601 format", example = "2020-06-27") String dayDateStr) { var atStartOfDay = LocalDate.parse(dayDateStr).atStartOfDay().toInstant(ZoneOffset.UTC) .atOffset(ZoneOffset.UTC); var end = atStartOfDay.plusDays(1); var now = Instant.now().atOffset(ZoneOffset.UTC); if (!validationUtils.isDateInRange(atStartOfDay)) { return ResponseEntity.notFound().build(); } var relativeUrls = new ArrayList<String>(); var dayBuckets = new DayBuckets(); String controllerMapping = this.getClass().getAnnotation(RequestMapping.class).value()[0]; dayBuckets.setDay(dayDateStr).setRelativeUrls(relativeUrls).setDayTimestamp(atStartOfDay.toInstant().toEpochMilli()); while (atStartOfDay.toInstant().toEpochMilli() < Math.min(now.toInstant().toEpochMilli(), end.toInstant().toEpochMilli())) { relativeUrls.add(controllerMapping + "/exposed" + "/" + atStartOfDay.toInstant().toEpochMilli()); atStartOfDay = atStartOfDay.plus(this.releaseBucketDuration); } return ResponseEntity.ok(dayBuckets); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBuckets File: dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java Repository: RadarCOVID/radar-covid-backend-dp3t-server The code follows secure coding practices.
[ "CWE-200" ]
CVE-2020-26230
LOW
2.6
RadarCOVID/radar-covid-backend-dp3t-server
getBuckets
dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
6d30c92cc8fcbde3ded7e9518853ef278080344d
0
Analyze the following code function for security vulnerabilities
@Override public void setOrganizationColor(@NonNull ComponentName who, int color) { if (!mHasFeature) { return; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallingUser(isManagedProfile(caller.getUserId())); Preconditions.checkCallAuthorization(isProfileOwner(caller)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); admin.organizationColor = color; saveSettingsLocked(caller.getUserId()); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_ORGANIZATION_COLOR) .setAdmin(caller.getComponentName()) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOrganizationColor File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setOrganizationColor
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public boolean enableRoaming(boolean enabled) { int status = mWifiNative.enableFirmwareRoaming( mInterfaceName, enabled ? WifiNative.ENABLE_FIRMWARE_ROAMING : WifiNative.DISABLE_FIRMWARE_ROAMING); return status == WifiNative.SET_FIRMWARE_ROAMING_SUCCESS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableRoaming 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
enableRoaming
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setNumber(int number) { mN.number = number; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNumber File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setNumber
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void initDeserializers() { deserializers.put(SimpleDateFormat.class, MiscCodec.instance); deserializers.put(Calendar.class, CalendarCodec.instance); deserializers.put(XMLGregorianCalendar.class, CalendarCodec.instance); deserializers.put(JSONObject.class, MapDeserializer.instance); deserializers.put(JSONArray.class, CollectionCodec.instance); deserializers.put(Map.class, MapDeserializer.instance); deserializers.put(HashMap.class, MapDeserializer.instance); deserializers.put(LinkedHashMap.class, MapDeserializer.instance); deserializers.put(TreeMap.class, MapDeserializer.instance); deserializers.put(ConcurrentMap.class, MapDeserializer.instance); deserializers.put(ConcurrentHashMap.class, MapDeserializer.instance); deserializers.put(Collection.class, CollectionCodec.instance); deserializers.put(List.class, CollectionCodec.instance); deserializers.put(ArrayList.class, CollectionCodec.instance); deserializers.put(Object.class, JavaObjectDeserializer.instance); deserializers.put(String.class, StringCodec.instance); deserializers.put(StringBuffer.class, StringCodec.instance); deserializers.put(StringBuilder.class, StringCodec.instance); deserializers.put(char.class, CharacterCodec.instance); deserializers.put(Character.class, CharacterCodec.instance); deserializers.put(byte.class, NumberDeserializer.instance); deserializers.put(Byte.class, NumberDeserializer.instance); deserializers.put(short.class, NumberDeserializer.instance); deserializers.put(Short.class, NumberDeserializer.instance); deserializers.put(int.class, IntegerCodec.instance); deserializers.put(Integer.class, IntegerCodec.instance); deserializers.put(long.class, LongCodec.instance); deserializers.put(Long.class, LongCodec.instance); deserializers.put(BigInteger.class, BigIntegerCodec.instance); deserializers.put(BigDecimal.class, BigDecimalCodec.instance); deserializers.put(float.class, FloatCodec.instance); deserializers.put(Float.class, FloatCodec.instance); deserializers.put(double.class, NumberDeserializer.instance); deserializers.put(Double.class, NumberDeserializer.instance); deserializers.put(boolean.class, BooleanCodec.instance); deserializers.put(Boolean.class, BooleanCodec.instance); deserializers.put(Class.class, MiscCodec.instance); deserializers.put(char[].class, new CharArrayCodec()); deserializers.put(AtomicBoolean.class, BooleanCodec.instance); deserializers.put(AtomicInteger.class, IntegerCodec.instance); deserializers.put(AtomicLong.class, LongCodec.instance); deserializers.put(AtomicReference.class, ReferenceCodec.instance); deserializers.put(WeakReference.class, ReferenceCodec.instance); deserializers.put(SoftReference.class, ReferenceCodec.instance); deserializers.put(UUID.class, MiscCodec.instance); deserializers.put(TimeZone.class, MiscCodec.instance); deserializers.put(Locale.class, MiscCodec.instance); deserializers.put(Currency.class, MiscCodec.instance); deserializers.put(Inet4Address.class, MiscCodec.instance); deserializers.put(Inet6Address.class, MiscCodec.instance); deserializers.put(InetSocketAddress.class, MiscCodec.instance); deserializers.put(File.class, MiscCodec.instance); deserializers.put(URI.class, MiscCodec.instance); deserializers.put(URL.class, MiscCodec.instance); deserializers.put(Pattern.class, MiscCodec.instance); deserializers.put(Charset.class, MiscCodec.instance); deserializers.put(JSONPath.class, MiscCodec.instance); deserializers.put(Number.class, NumberDeserializer.instance); deserializers.put(AtomicIntegerArray.class, AtomicCodec.instance); deserializers.put(AtomicLongArray.class, AtomicCodec.instance); deserializers.put(StackTraceElement.class, StackTraceElementDeserializer.instance); deserializers.put(Serializable.class, JavaObjectDeserializer.instance); deserializers.put(Cloneable.class, JavaObjectDeserializer.instance); deserializers.put(Comparable.class, JavaObjectDeserializer.instance); deserializers.put(Closeable.class, JavaObjectDeserializer.instance); deserializers.put(JSONPObject.class, new JSONPDeserializer()); ModuleUtil.callWhenHasJavaSql(initDeserializersWithJavaSql); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initDeserializers File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
initDeserializers
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
final void showLaunchWarningLocked(final ActivityRecord cur, final ActivityRecord next) { if (!mLaunchWarningShown) { mLaunchWarningShown = true; mHandler.post(new Runnable() { @Override public void run() { synchronized (ActivityManagerService.this) { final Dialog d = new LaunchWarningWindow(mContext, cur, next); d.show(); mHandler.postDelayed(new Runnable() { @Override public void run() { synchronized (ActivityManagerService.this) { d.dismiss(); mLaunchWarningShown = false; } } }, 4000); } } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showLaunchWarningLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
showLaunchWarningLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public void onNotificationClear(StatusBarNotification notification) { try { mBarService.onNotificationClear( notification.getPackageName(), notification.getTag(), notification.getId(), notification.getUserId()); } catch (android.os.RemoteException ex) { // oh well } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNotificationClear File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onNotificationClear
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@NonNull public CallStyle setVerificationText(@Nullable CharSequence verificationText) { mVerificationText = safeCharSequence(verificationText); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVerificationText File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setVerificationText
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public static String readFile(String path) throws IOException { return Files.readString(Paths.get(path)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFile File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
readFile
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Deprecated public String getBaseSkin(String skin, XWikiContext context) { String baseSkin = getInternalSkinManager().getParentSkin(skin); return baseSkin != null ? baseSkin : ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseSkin File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getBaseSkin
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public <T> void get(String table, Class<T> clazz, String filter, boolean returnCount, boolean setId, Handler<AsyncResult<Results<T>>> replyHandler) { String where = ""; if(filter != null){ where = filter; } get(table, clazz, new String[]{DEFAULT_JSONB_FIELD_NAME}, where, returnCount, setId, replyHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.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
get
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private String getEntryType(LocalDocumentReference reference) { String entryType = null; XarEntry packageFile = this.packageFiles.get(reference); if (packageFile != null) { entryType = packageFile.getEntryType(); } return entryType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEntryType File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-27480
HIGH
7.7
xwiki/xwiki-platform
getEntryType
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
e3527b98fdd8dc8179c24dc55e662b2c55199434
0
Analyze the following code function for security vulnerabilities
@Deprecated public void addToZip(ZipOutputStream zos, String zipname, boolean withVersions, XWikiContext context) throws XWikiException, IOException { ZipEntry zipentry = new ZipEntry(zipname); zos.putNextEntry(zipentry); toXML(zos, true, false, true, withVersions, context); zos.closeEntry(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addToZip 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
addToZip
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Override protected boolean allowFilterResult( BroadcastFilter filter, List<BroadcastFilter> dest) { IBinder target = filter.receiverList.receiver.asBinder(); for (int i = dest.size() - 1; i >= 0; i--) { if (dest.get(i).receiverList.receiver.asBinder() == target) { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: allowFilterResult File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
allowFilterResult
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private void resetNotificationHeader(RemoteViews contentView) { // Small icon doesn't need to be reset, as it's always set. Resetting would prevent // re-using the drawable when the notification is updated. contentView.setBoolean(R.id.expand_button, "setExpanded", false); contentView.setViewVisibility(R.id.app_name_text, View.GONE); contentView.setTextViewText(R.id.app_name_text, null); contentView.setViewVisibility(R.id.chronometer, View.GONE); contentView.setViewVisibility(R.id.header_text, View.GONE); contentView.setTextViewText(R.id.header_text, null); contentView.setViewVisibility(R.id.header_text_secondary, View.GONE); contentView.setTextViewText(R.id.header_text_secondary, null); contentView.setViewVisibility(R.id.header_text_divider, View.GONE); contentView.setViewVisibility(R.id.header_text_secondary_divider, View.GONE); contentView.setViewVisibility(R.id.time_divider, View.GONE); contentView.setViewVisibility(R.id.time, View.GONE); contentView.setImageViewIcon(R.id.profile_badge, null); contentView.setViewVisibility(R.id.profile_badge, View.GONE); mN.mUsesStandardHeader = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetNotificationHeader File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
resetNotificationHeader
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String getURLToLoginAsSuperAdminAndGotoPage(final String pageURL) { return getURLToLoginAndGotoPage(SUPER_ADMIN_CREDENTIALS.getUserName(), SUPER_ADMIN_CREDENTIALS.getPassword(), pageURL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURLToLoginAsSuperAdminAndGotoPage File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getURLToLoginAsSuperAdminAndGotoPage
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public ApiClient setClientConfig(ClientConfig clientConfig) { this.clientConfig = clientConfig; // Rebuild HTTP Client according to the new "clientConfig" value. this.httpClient = buildHttpClient(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setClientConfig File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setClientConfig
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override public void appNotRespondingViaProvider(IBinder connection) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(connection); mRemote.transact(APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appNotRespondingViaProvider File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
appNotRespondingViaProvider
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public String getTitle() { final String[] retVal = new String[1]; final boolean[] complete = new boolean[1]; act.runOnUiThread(new Runnable() { public void run() { try { retVal[0] = web.getTitle(); } finally { complete[0] = true; } } }); while (!complete[0]) { Display.getInstance().invokeAndBlock(new Runnable() { @Override public void run() { if (!complete[0]) { try { Thread.sleep(20); } catch (InterruptedException ex) { } } } }); } return retVal[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitle 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
getTitle
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public static void copyMemory(byte[] src, int srcIndex, byte[] dst, int dstIndex, long length) { PlatformDependent0.copyMemory(src, BYTE_ARRAY_BASE_OFFSET + srcIndex, dst, BYTE_ARRAY_BASE_OFFSET + dstIndex, length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyMemory File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
copyMemory
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public boolean isMediaNotification() { Class<? extends Style> style = getNotificationStyle(); boolean isMediaStyle = (MediaStyle.class.equals(style) || DecoratedMediaCustomViewStyle.class.equals(style)); boolean hasMediaSession = extras.getParcelable(Notification.EXTRA_MEDIA_SESSION, MediaSession.Token.class) != null; return isMediaStyle && hasMediaSession; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMediaNotification File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
isMediaNotification
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override boolean check(CacheSimpleEntryListenerConfig c1, CacheSimpleEntryListenerConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getCacheEntryListenerFactory(), c2.getCacheEntryListenerFactory()) && nullSafeEqual(c1.getCacheEntryEventFilterFactory(), c2.getCacheEntryEventFilterFactory()) && nullSafeEqual(c1.isOldValueRequired(), c2.isOldValueRequired()) && nullSafeEqual(c1.isSynchronous(), c2.isSynchronous()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void killApplicationWithAppId(String pkg, int appid, String reason) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(pkg); data.writeInt(appid); data.writeString(reason); mRemote.transact(KILL_APPLICATION_WITH_APPID_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killApplicationWithAppId File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
killApplicationWithAppId
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void inflateCameraPreview() { View previewBefore = mCameraPreview; boolean visibleBefore = false; if (previewBefore != null) { mPreviewContainer.removeView(previewBefore); visibleBefore = previewBefore.getVisibility() == View.VISIBLE; } mCameraPreview = mPreviewInflater.inflatePreview(getCameraIntent()); if (mCameraPreview != null) { mPreviewContainer.addView(mCameraPreview); mCameraPreview.setVisibility(visibleBefore ? View.VISIBLE : View.INVISIBLE); } if (mAffordanceHelper != null) { mAffordanceHelper.updatePreviews(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inflateCameraPreview 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
inflateCameraPreview
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public synchronized AMQContentHeader getContentHeader() { return this.contentHeader; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentHeader File: src/main/java/com/rabbitmq/client/impl/CommandAssembler.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
getContentHeader
src/main/java/com/rabbitmq/client/impl/CommandAssembler.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override public String getDescription() { return "A JNDI based DataSource locator. Provide the JDNI location of a DataSource object in order to make it work"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDescription File: modules/library/jdbc/src/main/java/org/geotools/data/jdbc/datasource/JNDIDataSourceFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
getDescription
modules/library/jdbc/src/main/java/org/geotools/data/jdbc/datasource/JNDIDataSourceFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
boolean allPausedActivitiesComplete() { boolean pausing = true; for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) { ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks; for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = stacks.get(stackNdx); final ActivityRecord r = stack.mPausingActivity; if (r != null && r.state != PAUSED && r.state != STOPPED && r.state != STOPPING) { if (DEBUG_STATES) { Slog.d(TAG_STATES, "allPausedActivitiesComplete: r=" + r + " state=" + r.state); pausing = false; } else { return false; } } } } return pausing; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: allPausedActivitiesComplete File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
allPausedActivitiesComplete
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
@Override public SSLSessionContext getSessionContext() { return sessionContext; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSessionContext File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
getSessionContext
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
@Override public int size() { return xObjects.size(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: size File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
size
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
public String getFilterAsString() { return filter().getStringForDisplay(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFilterAsString File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
getFilterAsString
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public void sendHeader(int major, int minor) throws IOException { synchronized (_outputStream) { _outputStream.write("AMQP".getBytes("US-ASCII")); _outputStream.write(1); _outputStream.write(1); _outputStream.write(major); _outputStream.write(minor); try { _outputStream.flush(); } catch (SSLHandshakeException e) { LOGGER.error("TLS connection failed: {}", e.getMessage()); throw e; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendHeader File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
sendHeader
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override protected void finalize() { try { reset(); } catch (Throwable t) { t.printStackTrace(System.err); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finalize File: android/guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
finalize
android/guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
private ComponentManager getComponentManager(XWikiDocument document, Scope scope, boolean create) { String hint; switch (scope) { case WIKI: hint = "wiki:" + document.getDocumentReference().getWikiReference().getName(); break; case USER: hint = "user:" + this.serializer.serialize(document.getAuthorReference()); break; default: hint = null; break; } return this.cmManager.getComponentManager(hint, create); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getComponentManager File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29510
HIGH
8.8
xwiki/xwiki-platform
getComponentManager
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
d06ff8a58480abc7f63eb1d4b8b366024d990643
0
Analyze the following code function for security vulnerabilities
public boolean isAllowMultipleDelete() { return myAllowMultipleDelete; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAllowMultipleDelete File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isAllowMultipleDelete
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public static int getInt(int[] data, long index) { return PlatformDependent0.getInt(data, index); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInt File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
getInt
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Override public void conference(String conferenceCallId, String callId, Session.Info info) throws RemoteException { mConnectionServiceDelegateAdapter.conference(conferenceCallId, callId, info); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: conference File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
conference
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
void testSetup(SolrServer server, SolrRequester requester, SolrIndexManager manager) { this.solrServer = server; this.solrRequester = requester; this.indexManager = manager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testSetup 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
testSetup
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
@Override public synchronized void write(byte[] b, int off, int len) throws IOException { update(len); out.write(b, off, len); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
write
guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public void post(int what, Object obj) { obtainMessage(what, obj).sendToTarget(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: post File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
post
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
public String getNumericPin(final User user) throws IOException { return getContactInfo(user, ContactType.numericPage.toString()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNumericPin File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352" ]
CVE-2021-25931
MEDIUM
6.8
OpenNMS/opennms
getNumericPin
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
private int resolveOwningUserIdLocked(int userId, Set<String> keys, String name) { final int parentId = getGroupParentLocked(userId); if (parentId != userId && keys.contains(name)) { return parentId; } return userId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveOwningUserIdLocked File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
resolveOwningUserIdLocked
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
private Object convertValueToTypeIfNecessary(String name, Object value, PropertyDescriptor[] propertyDescriptors, ExpressionFactory expressionFactory) { for (PropertyDescriptor propertyDescriptor : propertyDescriptors) { if (propertyDescriptor.getName().equals(name)) { value = expressionFactory.coerceToType(value, propertyDescriptor.getPropertyType()); break; } } return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertValueToTypeIfNecessary File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
convertValueToTypeIfNecessary
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
boolean isState(State state) { return state == mState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isState File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
isState
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private void scheduleStrongAuthTimeout() { long when = SystemClock.elapsedRealtime() + FINGERPRINT_UNLOCK_TIMEOUT_MS; Intent intent = new Intent(ACTION_STRONG_AUTH_TIMEOUT); intent.putExtra(USER_ID, sCurrentUser); PendingIntent sender = PendingIntent.getBroadcast(mContext, sCurrentUser, intent, PendingIntent.FLAG_CANCEL_CURRENT); mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, when, sender); notifyStrongAuthStateChanged(sCurrentUser); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scheduleStrongAuthTimeout 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
scheduleStrongAuthTimeout
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Override public void registerScreenObserver(ScreenObserver observer) { mScreenObservers.add(observer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerScreenObserver 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
registerScreenObserver
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public boolean isProviderInCallerOrInProfileAndWhitelListed(String packageName, int profileId) { final int callerId = UserHandle.getCallingUserId(); if (profileId == callerId) { return true; } final int parentId = getProfileParent(profileId); if (parentId != callerId) { return false; } return isProviderWhitelListed(packageName, profileId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProviderInCallerOrInProfileAndWhitelListed File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
isProviderInCallerOrInProfileAndWhitelListed
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Override public HttpServerExchange sendOutOfBandResponse(HttpServerExchange exchange) { throw UndertowMessages.MESSAGES.outOfBandResponseNotSupported(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendOutOfBandResponse File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
sendOutOfBandResponse
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
@GET @Path("io/{size}") @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response io(@PathParam("size") long size) { return Response.ok(new NullInputStream(size)).build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: io File: server-adapters/resteasy-undertow/src/test/java/org/jboss/resteasy/test/undertow/AsyncIOResource.java Repository: resteasy The code follows secure coding practices.
[ "CWE-378" ]
CVE-2023-0482
MEDIUM
5.5
resteasy
io
server-adapters/resteasy-undertow/src/test/java/org/jboss/resteasy/test/undertow/AsyncIOResource.java
807d7456f2137cde8ef7c316707211bf4e542d56
0
Analyze the following code function for security vulnerabilities
public void setShutdownExecutor(ExecutorService executor) { this.shutdownExecutor = executor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setShutdownExecutor File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
setShutdownExecutor
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public Builder addTag(String tag) { if (!ClickHouseChecker.isNullOrEmpty(tag)) { tags.add(tag); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addTag File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
addTag
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
public static MappedByteBuffer map(File file, MapMode mode, long size) throws IOException { checkArgument(size >= 0, "size (%s) may not be negative", size); return mapInternal(file, mode, size); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: map File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
map
android/guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public UpdateSection addField(String field){ fieldHierarchy.add(field); return this; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2019-15534 - Severity: HIGH - CVSS Score: 7.5 Description: RMB-200: Single quote SQL Injection in PostgresClient.update(table, updateSection, ...) Function: addField File: domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java Repository: folio-org/raml-module-builder Fixed Code: public UpdateSection addField(String field){ if (! fieldPattern.matcher(field).matches()) { throw new IllegalArgumentException("Field name with illegal character: '" + field + "'"); } fieldHierarchy.add(field); return this; }
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
addField
domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java
b7ef741133e57add40aa4cb19430a0065f378a94
1
Analyze the following code function for security vulnerabilities
@Override public int hashCode() { return mHashCode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCode File: src/main/java/com/android/apksig/ApkVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
hashCode
src/main/java/com/android/apksig/ApkVerifier.java
039f815895f62c9f8af23df66622b66246f3f61e
0
Analyze the following code function for security vulnerabilities
@Override public void deleteIssue(String id) { IssuesService issuesService = CommonBeanFactory.getBean(IssuesService.class); issuesService.deleteIssue(id); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteIssue File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
deleteIssue
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
@Override protected void engineSetSeed(byte[] bytes) { random.setSeed(bytes); }
Vulnerability Classification: - CWE: CWE-310 - CVE: CVE-2016-1000339 - Severity: MEDIUM - CVSS Score: 5.0 Description: Added table use obfuscation to AESFastEngine JDK 1.4 compiler updates. Function: engineSetSeed File: prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java Repository: bcgit/bc-java Fixed Code: protected void engineSetSeed(byte[] bytes) { random.setSeed(bytes); }
[ "CWE-310" ]
CVE-2016-1000339
MEDIUM
5
bcgit/bc-java
engineSetSeed
prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
8a73f08931450c17c749af067b6a8185abdfd2c0
1
Analyze the following code function for security vulnerabilities
@Override public Destination getJMSDestination() throws JMSException { return (Destination) this.getObjectProperty(JMS_MESSAGE_DESTINATION); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJMSDestination 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
getJMSDestination
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public void alias(String name, Class type, Class defaultImplementation) { alias(name, type); addDefaultImplementation(defaultImplementation, type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: alias File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
alias
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public List<IssuesDao> getIssuesByPlanId(String planId) { IssuesRequest issueRequest = new IssuesRequest(); issueRequest.setPlanId(planId); List<IssuesDao> planIssues = extIssuesMapper.getPlanIssues(issueRequest); buildCustomField(planIssues); replaceStatus(planIssues, planId); return DistinctKeyUtil.distinctByKey(planIssues, IssuesDao::getId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIssuesByPlanId File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getIssuesByPlanId
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public Job add(MediaPackage mediaPackage) throws SearchException, MediaPackageException, IllegalArgumentException, UnauthorizedException, ServiceRegistryException { try { return serviceRegistry.createJob(JOB_TYPE, Operation.Add.toString(), Arrays.asList(MediaPackageParser.getAsXml(mediaPackage)), addJobLoad); } catch (ServiceRegistryException e) { throw new SearchException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: add 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
add
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
@Override public boolean isRequestPinItemSupported(int callingUserId, int requestType) { return ShortcutService.this.isRequestPinItemSupported(callingUserId, requestType); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRequestPinItemSupported File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
isRequestPinItemSupported
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public void onVrStateChanged(boolean enabled) { mVrMode = enabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onVrStateChanged File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onVrStateChanged
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unchecked") public List<Question> getAllUnapprovedQuestions(Pager pager) { if (getId() == null) { return new ArrayList<Question>(); } return (List<Question>) getPostsForUser(Utils.type(UnapprovedQuestion.class), pager); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllUnapprovedQuestions 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
getAllUnapprovedQuestions
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public abstract BaseXMLBuilder namespace(String namespaceURI);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: namespace 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
namespace
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public String getDescription() { return "Importer for the MS Office 2007 XML bibliography format."; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDescription File: src/main/java/org/jabref/logic/importer/fileformat/MsBibImporter.java Repository: JabRef/jabref The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000652
HIGH
7.5
JabRef/jabref
getDescription
src/main/java/org/jabref/logic/importer/fileformat/MsBibImporter.java
89f855d76713b4cd25ac0830c719cd61c511851e
0
Analyze the following code function for security vulnerabilities
void dump(PrintWriter pw, String prefix) { pw.print(prefix); pw.print("mCurrentUser="); pw.println(mRootWindowContainer.mCurrentUser); pw.print(prefix); pw.print("mLastStartReason="); pw.println(mLastStartReason); pw.print(prefix); pw.print("mLastStartActivityTimeMs="); pw.println(DateFormat.getDateTimeInstance().format(new Date(mLastStartActivityTimeMs))); pw.print(prefix); pw.print("mLastStartActivityResult="); pw.println(mLastStartActivityResult); if (mLastStartActivityRecord != null) { pw.print(prefix); pw.println("mLastStartActivityRecord:"); mLastStartActivityRecord.dump(pw, prefix + " ", true /* dumpAll */); } if (mStartActivity != null) { pw.print(prefix); pw.println("mStartActivity:"); mStartActivity.dump(pw, prefix + " ", true /* dumpAll */); } if (mIntent != null) { pw.print(prefix); pw.print("mIntent="); pw.println(mIntent); } if (mOptions != null) { pw.print(prefix); pw.print("mOptions="); pw.println(mOptions); } pw.print(prefix); pw.print("mLaunchSingleTop="); pw.print(LAUNCH_SINGLE_TOP == mLaunchMode); pw.print(" mLaunchSingleInstance="); pw.print(LAUNCH_SINGLE_INSTANCE == mLaunchMode); pw.print(" mLaunchSingleTask="); pw.println(LAUNCH_SINGLE_TASK == mLaunchMode); pw.print(prefix); pw.print("mLaunchFlags=0x"); pw.print(Integer.toHexString(mLaunchFlags)); pw.print(" mDoResume="); pw.print(mDoResume); pw.print(" mAddingToTask="); pw.print(mAddingToTask); pw.print(" mInTaskFragment="); pw.println(mInTaskFragment); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
dump
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
public void onMicrophoneClick() { if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_MICROPHONE)) { if (!appPreferences.getPushToTalkIntroShown()) { spotlightView = new SpotlightView.Builder(this) .introAnimationDuration(300) .enableRevealAnimation(true) .performClick(false) .fadeinTextDuration(400) .headingTvColor(getResources().getColor(R.color.colorPrimary)) .headingTvSize(20) .headingTvText(getResources().getString(R.string.nc_push_to_talk)) .subHeadingTvColor(getResources().getColor(R.color.bg_default)) .subHeadingTvSize(16) .subHeadingTvText(getResources().getString(R.string.nc_push_to_talk_desc)) .maskColor(Color.parseColor("#dc000000")) .target(binding.microphoneButton) .lineAnimDuration(400) .lineAndArcColor(getResources().getColor(R.color.colorPrimary)) .enableDismissAfterShown(true) .dismissOnBackPress(true) .usageId("pushToTalk") .show(); appPreferences.setPushToTalkIntroShown(true); } if (!isPTTActive) { microphoneOn = !microphoneOn; if (microphoneOn) { binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_white_24px); updatePictureInPictureActions(R.drawable.ic_mic_white_24px, getResources().getString(R.string.nc_pip_microphone_mute), MICROPHONE_PIP_REQUEST_MUTE); } else { binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_off_white_24px); updatePictureInPictureActions(R.drawable.ic_mic_off_white_24px, getResources().getString(R.string.nc_pip_microphone_unmute), MICROPHONE_PIP_REQUEST_UNMUTE); } toggleMedia(microphoneOn, false); } else { binding.microphoneButton.getHierarchy().setPlaceholderImage(R.drawable.ic_mic_white_24px); pulseAnimation.start(); toggleMedia(true, false); } if (isVoiceOnlyCall && !isConnectionEstablished()) { fetchSignalingSettings(); } } else if (EffortlessPermissions.somePermissionPermanentlyDenied(this, PERMISSIONS_MICROPHONE)) { // Microphone permission is permanently denied so we cannot request it normally. OpenAppDetailsDialogFragment.show( R.string.nc_microphone_permission_permanently_denied, R.string.nc_permissions_settings, (AppCompatActivity) this); } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { requestPermissions(PERMISSIONS_MICROPHONE, 100); } else { onRequestPermissionsResult(100, PERMISSIONS_MICROPHONE, new int[]{1}); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onMicrophoneClick File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
onMicrophoneClick
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private static int jmsDeliveryMode(Integer rmqDeliveryMode) { return ( ( rmqDeliveryMode != null && rmqDeliveryMode == 2 ) ? javax.jms.DeliveryMode.PERSISTENT : javax.jms.DeliveryMode.NON_PERSISTENT); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jmsDeliveryMode 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
jmsDeliveryMode
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public String asString(Properties outputProperties) throws TransformerException { StringWriter writer = new StringWriter(); toWriter(writer, outputProperties); return writer.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asString 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
asString
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
public CarExtender setColor(@ColorInt int color) { mColor = color; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setColor File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setColor
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public boolean hasAnchor() throws IndexUnreachableException { return getTopDocument().isAnchorChild(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasAnchor File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
hasAnchor
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
protected void recover() { boolean recovered = false; File[] files = _workspaceDir.listFiles(); if (files == null) return; for (File file : files) { if (file == null) continue; if (file.isDirectory() && !file.isHidden()) { String dirName = file.getName(); if (file.getName().endsWith(PROJECT_DIR_SUFFIX)) { String idString = dirName.substring(0, dirName.length() - PROJECT_DIR_SUFFIX.length()); long id = -1; try { id = Long.parseLong(idString); } catch (NumberFormatException e) { // ignore } if (id > 0 && !_projectsMetadata.containsKey(id)) { if (loadProjectMetadata(id)) { logger.info("Recovered project named " + getProjectMetadata(id).getName() + " in directory " + dirName); recovered = true; } else { logger.warn("Failed to recover project in directory " + dirName); file.renameTo(new File(file.getParentFile(), dirName + ".corrupted")); } } } } } if (recovered) { saveWorkspace(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recover 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
recover
main/src/com/google/refine/io/FileProjectManager.java
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
0
Analyze the following code function for security vulnerabilities
private String buildUrl() { Long timestamp = System.currentTimeMillis(); return String.format("%s&timestamp=%s&sign=%s", webhookUrl, timestamp, getSign(timestamp)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
buildUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
private int getProfileParentUserIfRequested(int userHandle, boolean parent) { if (parent) { return getProfileParentId(userHandle); } return userHandle; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileParentUserIfRequested 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
getProfileParentUserIfRequested
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public ServerBuilder accessLogWriter(AccessLogWriter accessLogWriter, boolean shutdownOnStop) { virtualHostTemplate.accessLogWriter(accessLogWriter, shutdownOnStop); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: accessLogWriter File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
accessLogWriter
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
private void setStatusParameter( DeduplicationStatus status, Query<?> hibernateQuery ) { if ( status == DeduplicationStatus.ALL ) { hibernateQuery.setParameterList( "status", Arrays.stream( DeduplicationStatus.values() ) .filter( s -> s != DeduplicationStatus.ALL ).collect( Collectors.toSet() ) ); } else { hibernateQuery.setParameterList( "status", Collections.singletonList( status ) ); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStatusParameter File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java Repository: dhis2/dhis2-core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
setStatusParameter
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/deduplication/hibernate/HibernatePotentialDuplicateStore.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
0
Analyze the following code function for security vulnerabilities
private void setmGoogleApiClient(GoogleApiClient mGoogleApiClient) { this.mGoogleApiClient = mGoogleApiClient; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setmGoogleApiClient 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
setmGoogleApiClient
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void sendResponse(HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson) throws IOException { String callback = pReq.getParameter(ConfigKey.CALLBACK.getKeyValue()); setContentType(pResp, callback != null ? "text/javascript" : getMimeType(pReq)); pResp.setStatus(HttpServletResponse.SC_OK); setNoCacheHeaders(pResp); if (pJson == null) { pResp.setContentLength(-1); } else { if (isStreamingEnabled(pReq)) { sendStreamingResponse(pResp, callback, (JSONStreamAware) pJson); } else { // Fallback, send as one object // TODO: Remove for 2.0 where should support only streaming sendAllJSON(pResp, callback, pJson); } } }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2018-1000129 - Severity: MEDIUM - CVSS Score: 4.3 Description: fix: Verify a given 'mimeType' and/or 'callback' request parameter So that only fixed values are possible, in order to avoid XSS attack vectors. Function: sendResponse File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia Fixed Code: private void sendResponse(HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson) throws IOException { String callback = pReq.getParameter(ConfigKey.CALLBACK.getKeyValue()); setContentType(pResp, MimeTypeUtil.getResponseMimeType( pReq.getParameter(ConfigKey.MIME_TYPE.getKeyValue()), configMimeType, callback )); pResp.setStatus(HttpServletResponse.SC_OK); setNoCacheHeaders(pResp); if (pJson == null) { pResp.setContentLength(-1); } else { if (isStreamingEnabled(pReq)) { sendStreamingResponse(pResp, callback, (JSONStreamAware) pJson); } else { // Fallback, send as one object // TODO: Remove for 2.0 where should support only streaming sendAllJSON(pResp, callback, pJson); } } }
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
sendResponse
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
1
Analyze the following code function for security vulnerabilities
void setSizeConfigurations(SizeConfigurationBuckets sizeConfigurations) { mSizeConfigurations = sizeConfigurations; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSizeConfigurations File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
setSizeConfigurations
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void setSchemaResourceResolver(LSResourceResolver schemaResourceResolver) { this.schemaResourceResolver = schemaResourceResolver; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSchemaResourceResolver 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
setSchemaResourceResolver
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
0
Analyze the following code function for security vulnerabilities
public static String formatDate(Calendar cal) { return new SimpleDateFormat("dd-MM-yyyy HH:mm:ss").format(cal.getTime()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formatDate File: src/main/java/com/openkm/util/FormatUtil.java Repository: openkm/document-management-system The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-40317
MEDIUM
5.4
openkm/document-management-system
formatDate
src/main/java/com/openkm/util/FormatUtil.java
870d518f7de349c3fa4c7b9883789fdca4590c4e
0
Analyze the following code function for security vulnerabilities
public void setReadOnly(boolean readOnly) { this.isReadOnly = readOnly; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setReadOnly File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
setReadOnly
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public List<UserInfo> getProfiles(int userId, boolean enabledOnly) { if (userId != UserHandle.getCallingUserId()) { checkManageUsersPermission("getting profiles related to user " + userId); } final long ident = Binder.clearCallingIdentity(); try { synchronized (mPackagesLock) { return getProfilesLocked(userId, enabledOnly); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfiles File: services/core/java/com/android/server/pm/UserManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2457
LOW
2.1
android
getProfiles
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
@Override protected void afterSuccessfulLogin(final boolean resumed) throws NotConnectedException, InterruptedException { // Reset the flag in case it was set disconnectedButResumeable = false; super.afterSuccessfulLogin(resumed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: afterSuccessfulLogin File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
afterSuccessfulLogin
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public static String validateRedirectUriWildcard(String redirectUri) { if (redirectUri == null) return null; int idx = redirectUri.indexOf("/*"); if (idx > -1) { redirectUri = redirectUri.substring(0, idx); } return redirectUri; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateRedirectUriWildcard File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java Repository: keycloak The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4361
MEDIUM
6.1
keycloak
validateRedirectUriWildcard
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
0