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
|
protected String getPostCharset() {
return "UTF-8";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPostCharset
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
|
getPostCharset
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerUserSwitchObserver(IUserSwitchObserver observer) {
mUserController.registerUserSwitchObserver(observer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerUserSwitchObserver
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
|
registerUserSwitchObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
void startCoreServices()
{
debugLog("startCoreServices()");
Class[] supportedProfileServices = Config.getSupportedProfiles();
//Start profile services
if (!mProfilesStarted && supportedProfileServices.length >0) {
//Startup all profile services
setProfileServiceState(supportedProfileServices,BluetoothAdapter.STATE_ON);
}else {
debugLog("startCoreProfiles(): Profile Services alreay started");
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BREDR_STARTED));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startCoreServices
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
|
startCoreServices
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isStyle(@NonNull Class<? extends Style> styleClass) {
String templateClass = extras.getString(Notification.EXTRA_TEMPLATE);
return Objects.equals(templateClass, styleClass.getName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isStyle
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
isStyle
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native void nativeThemeCopy(long dstAssetManagerPtr, long dstThemePtr,
long srcAssetManagerPtr, long srcThemePtr);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeThemeCopy
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
|
nativeThemeCopy
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startActivitiesInPackage(int uid, int realCallingPid, int realCallingUid,
String callingPackage, @Nullable String callingFeatureId, Intent[] intents,
String[] resolvedTypes, IBinder resultTo, SafeActivityOptions options, int userId,
boolean validateIncomingUser, PendingIntentRecord originatingPendingIntent,
boolean allowBackgroundActivityStart) {
assertPackageMatchesCallingUid(callingPackage);
return getActivityStartController().startActivitiesInPackage(uid, realCallingPid,
realCallingUid, callingPackage, callingFeatureId, intents, resolvedTypes,
resultTo, options, userId, validateIncomingUser, originatingPendingIntent,
allowBackgroundActivityStart);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivitiesInPackage
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
|
startActivitiesInPackage
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String escapeURL(String url)
{
String encodedURL;
try {
encodedURL = URLEncoder.encode(url, "UTF-8");
} catch (Exception e) {
// Should not happen (UTF-8 is always available)
throw new RuntimeException("Missing charset [UTF-8]", e);
}
// The previous call will convert " " into "+" (and "+" into "%2B") so we need to convert "+" into "%20"
// It's ok since %20 is allowed in both the URL path and the query string (and anchor).
encodedURL = encodedURL.replaceAll("\\+", "%20");
return encodedURL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeURL
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
|
escapeURL
|
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 void setSubjectEventFormDataTypesExpected() {
this.unsetTypeExpected();
this.setTypeExpected(1, TypeNames.STRING);// study_subject_oid;
this.setTypeExpected(2, TypeNames.INT);// definition_order;
this.setTypeExpected(3, TypeNames.STRING);// definition_oid;
this.setTypeExpected(4, TypeNames.BOOL);// definition_repeating
this.setTypeExpected(5, TypeNames.INT);// sample_ordinal
this.setTypeExpected(6, TypeNames.INT);// crf_order;
this.setTypeExpected(7, TypeNames.STRING);// crf_version_oid
this.setTypeExpected(8, TypeNames.INT);// event_crf_id
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubjectEventFormDataTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setSubjectEventFormDataTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return Objects.hash(certId, requestId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
hashCode
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void installFinish() {
configPlugin(plugins);
List<IPlugin> pluginList = plugins.getPluginList();
for (IPlugin plugin : pluginList) {
plugin.start();
}
initDatabaseVersion();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installFinish
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
installFinish
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public ComponentName getDeviceOwnerComponentOnCallingUser() {
return getDeviceOwnerComponentInner(/* callingUserOnly =*/ true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerComponentOnCallingUser
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
|
getDeviceOwnerComponentOnCallingUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void rejectValidationError(
ConstraintViolation<Object> violation,
BindingResult result,
final ValidationError error,
final String field) {
final String keyPrefix = (field == null || field.isEmpty() ? "" : field + ".");
result.rejectValue(
error.key() != null && !error.key().isEmpty() ? keyPrefix + error.key() : error.key(),
violation.getConstraintDescriptor().getAnnotation().annotationType().getSimpleName(),
error.arguments() != null ? error.arguments().toArray() : new Object[0],
error.message());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rejectValidationError
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
rejectValidationError
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<ActiveAdmin> getActiveAdminsForLockscreenPoliciesLocked(int userHandle) {
if (isSeparateProfileChallengeEnabled(userHandle)) {
// If this user has a separate challenge, only return its restrictions.
return getUserDataUnchecked(userHandle).mAdminList;
}
// If isSeparateProfileChallengeEnabled is false and userHandle points to a managed profile
// we need to query the parent user who owns the credential.
return getActiveAdminsForUserAndItsManagedProfilesLocked(getProfileParentId(userHandle),
(user) -> !mLockPatternUtils.isSeparateProfileChallengeEnabled(user.id));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminsForLockscreenPoliciesLocked
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
|
getActiveAdminsForLockscreenPoliciesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void write(byte[] from, File to) throws IOException {
asByteSink(to).write(from);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
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
|
write
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canLaunchVoiceAssist() {
return mAssistManager.canVoiceAssistBeLaunchedFromKeyguard();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canLaunchVoiceAssist
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
|
canLaunchVoiceAssist
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroySession() throws RemoteException {
final long token = Binder.clearCallingIdentity();
try {
mService.onSessionDied(MediaSessionRecord.this);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroySession
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
|
destroySession
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
void restartProcessIfVisible() {
Slog.i(TAG, "Request to restart process of " + this);
// Reset the existing override configuration so it can be updated according to the latest
// configuration.
clearSizeCompatMode();
if (!attachedToProcess()) {
return;
}
// The restarting state avoids removing this record when process is died.
setState(RESTARTING_PROCESS, "restartActivityProcess");
if (!mVisibleRequested || mHaveState) {
// Kill its process immediately because the activity should be in background.
// The activity state will be update to {@link #DESTROYED} in
// {@link ActivityStack#cleanUp} when handling process died.
mAtmService.mH.post(() -> {
final WindowProcessController wpc;
synchronized (mAtmService.mGlobalLock) {
if (!hasProcess()
|| app.getReportedProcState() <= PROCESS_STATE_IMPORTANT_FOREGROUND) {
return;
}
wpc = app;
}
mAtmService.mAmInternal.killProcess(wpc.mName, wpc.mUid, "resetConfig");
});
return;
}
if (getParent() != null) {
startFreezingScreen();
}
// The process will be killed until the activity reports stopped with saved state (see
// {@link ActivityTaskManagerService.activityStopped}).
try {
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
StopActivityItem.obtain(0 /* configChanges */));
} catch (RemoteException e) {
Slog.w(TAG, "Exception thrown during restart " + this, e);
}
mTaskSupervisor.scheduleRestartTimeout(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restartProcessIfVisible
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
|
restartProcessIfVisible
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beginFormat(Format format, Map<String, String> parameters)
{
// Right now, the only difference with the super class is about the "monospace" format
if (format == Format.MONOSPACE) {
Map<String, String> attributes = new HashMap<>();
attributes.putAll(parameters);
String cssClass = "monospace";
// The element may already have a class
if (attributes.containsKey(PROP_CLASS)) {
cssClass = String.format("%s %s", cssClass, attributes.get(PROP_CLASS));
}
attributes.put(PROP_CLASS, cssClass);
getXHTMLWikiPrinter().printXMLStartElement(ELEM_SPAN, attributes);
} else {
// Call the super class
super.beginFormat(format, parameters);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-32070
- Severity: MEDIUM
- CVSS Score: 6.1
Description: XRENDERING-663: Restrict allowed attributes in HTML rendering
* Change HTML renderers to only print allowed attributes and elements.
* Add prefix to forbidden attributes to preserve them in XWiki syntax.
* Adapt tests to expect that invalid attributes get a prefix.
Function: beginFormat
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
Repository: xwiki/xwiki-rendering
Fixed Code:
@Override
public void beginFormat(Format format, Map<String, String> parameters)
{
// Right now, the only difference with the super class is about the "monospace" format
if (format == Format.MONOSPACE) {
Map<String, String> attributes = new LinkedHashMap<>(parameters);
String cssClass = "monospace";
// The element may already have a class
if (attributes.containsKey(PROP_CLASS)) {
cssClass = String.format("%s %s", cssClass, attributes.get(PROP_CLASS));
}
attributes.put(PROP_CLASS, cssClass);
getXHTMLWikiPrinter().printXMLStartElement(ELEM_SPAN, attributes);
} else {
// Call the super class
super.beginFormat(format, parameters);
}
}
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
beginFormat
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int checkAudioOperation(int code, int usage, int uid, String packageName,
QuadFunction<Integer, Integer, Integer, String, Integer> superImpl) {
if (uid == mTargetUid && isTargetOp(code)) {
final int shellUid = UserHandle.getUid(UserHandle.getUserId(uid),
Process.SHELL_UID);
final long identity = Binder.clearCallingIdentity();
try {
return superImpl.apply(code, usage, shellUid, "com.android.shell");
} finally {
Binder.restoreCallingIdentity(identity);
}
}
return superImpl.apply(code, usage, uid, packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAudioOperation
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
checkAudioOperation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAlpha(Object graphics, int alpha) {
((AndroidGraphics) graphics).setAlpha(alpha);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlpha
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
|
setAlpha
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String normalizeOs(String value) {
value = normalize(value);
if (value.startsWith("aix")) {
return "aix";
}
if (value.startsWith("hpux")) {
return "hpux";
}
if (value.startsWith("os400")) {
// Avoid the names such as os4000
if (value.length() <= 5 || !Character.isDigit(value.charAt(5))) {
return "os400";
}
}
if (value.startsWith("linux")) {
return "linux";
}
if (value.startsWith("macosx") || value.startsWith("osx") || value.startsWith("darwin")) {
return "osx";
}
if (value.startsWith("freebsd")) {
return "freebsd";
}
if (value.startsWith("openbsd")) {
return "openbsd";
}
if (value.startsWith("netbsd")) {
return "netbsd";
}
if (value.startsWith("solaris") || value.startsWith("sunos")) {
return "sunos";
}
if (value.startsWith("windows")) {
return "windows";
}
return "unknown";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalizeOs
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
|
normalizeOs
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
private <E> Registration addListener(Class<E> handler, E listener) {
session.checkHasLock();
List<E> list = (List<E>) listeners.computeIfAbsent(handler,
key -> new ArrayList<>());
list.add(listener);
list.sort((o1, o2) -> {
Class<?> o1Class = o1.getClass();
Class<?> o2Class = o2.getClass();
final ListenerPriority listenerPriority1 = o1Class
.getAnnotation(ListenerPriority.class);
final ListenerPriority listenerPriority2 = o2Class
.getAnnotation(ListenerPriority.class);
final int priority1 = listenerPriority1 != null
? listenerPriority1.value()
: 0;
final int priority2 = listenerPriority2 != null
? listenerPriority2.value()
: 0;
// we want to have a descending order
return Integer.compare(priority2, priority1);
});
return () -> list.remove(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addListener
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
|
addListener
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void setTreeState(@Nonnull final JTree tree, @Nonnull final TreePath path, final boolean recursively, final boolean unfold) {
final Object lastNode = path.getLastPathComponent();
for (int i = 0; i < tree.getModel().getChildCount(lastNode); i++) {
final Object child = tree.getModel().getChild(lastNode, i);
final TreePath pathToChild = path.pathByAddingChild(child);
if (recursively) {
setTreeState(tree, pathToChild, recursively, unfold);
}
}
if (unfold) {
tree.expandPath(path);
} else {
tree.collapsePath(path);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTreeState
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
setTreeState
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String computeDefaultTlsProtocol(String[] supportedProtocols) {
if(supportedProtocols != null) {
for (String supportedProtocol : supportedProtocols) {
if(PREFERRED_TLS_PROTOCOL.equalsIgnoreCase(supportedProtocol)) {
return supportedProtocol;
}
}
}
return FALLBACK_TLS_PROTOCOL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeDefaultTlsProtocol
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
|
computeDefaultTlsProtocol
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void throwAlreadyLoggedInExceptionIfAppropriate() throws AlreadyLoggedInException {
if (isAuthenticated()) {
throw new AlreadyLoggedInException();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: throwAlreadyLoggedInExceptionIfAppropriate
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
throwAlreadyLoggedInExceptionIfAppropriate
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
private void revokeUriPermissionLocked(int callingUid, GrantUri grantUri, final int modeFlags) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Revoking all granted permissions to " + grantUri);
final IPackageManager pm = AppGlobals.getPackageManager();
final String authority = grantUri.uri.getAuthority();
final ProviderInfo pi = getProviderInfoLocked(authority, grantUri.sourceUserId);
if (pi == null) {
Slog.w(TAG, "No content provider found for permission revoke: "
+ grantUri.toSafeString());
return;
}
// Does the caller have this permission on the URI?
if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
// If they don't have direct access to the URI, then revoke any
// ownerless URI permissions that have been granted to them.
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(callingUid);
if (perms != null) {
boolean persistChanged = false;
for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) {
final UriPermission perm = it.next();
if (perm.uri.sourceUserId == grantUri.sourceUserId
&& perm.uri.uri.isPathPrefixMatch(grantUri.uri)) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Revoking non-owned " + perm.targetUid
+ " permission to " + perm.uri);
persistChanged |= perm.revokeModes(
modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, false);
if (perm.modeFlags == 0) {
it.remove();
}
}
}
if (perms.isEmpty()) {
mGrantedUriPermissions.remove(callingUid);
}
if (persistChanged) {
schedulePersistUriGrants();
}
}
return;
}
boolean persistChanged = false;
// Go through all of the permissions and remove any that match.
int N = mGrantedUriPermissions.size();
for (int i = 0; i < N; i++) {
final int targetUid = mGrantedUriPermissions.keyAt(i);
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.valueAt(i);
for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) {
final UriPermission perm = it.next();
if (perm.uri.sourceUserId == grantUri.sourceUserId
&& perm.uri.uri.isPathPrefixMatch(grantUri.uri)) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Revoking " + perm.targetUid + " permission to " + perm.uri);
persistChanged |= perm.revokeModes(
modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, true);
if (perm.modeFlags == 0) {
it.remove();
}
}
}
if (perms.isEmpty()) {
mGrantedUriPermissions.remove(targetUid);
N--;
i--;
}
}
if (persistChanged) {
schedulePersistUriGrants();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revokeUriPermissionLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
revokeUriPermissionLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public void showRepostFormWarningDialog(ContentViewCore contentViewCore) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showRepostFormWarningDialog
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
showRepostFormWarningDialog
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasResponseFilters() {
return !responseFilters.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasResponseFilters
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
hasResponseFilters
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean doRemoveInternal(int pid, ProcessRecord app) {
final ProcessRecord existingApp = mPidMap.get(pid);
if (existingApp != null && existingApp.getStartSeq() == app.getStartSeq()) {
mPidMap.remove(pid);
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doRemoveInternal
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
doRemoveInternal
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
void observe() {
ContentResolver resolver = getContext().getContentResolver();
resolver.registerContentObserver(NOTIFICATION_LIGHT_PULSE_URI,
false, this, UserHandle.USER_ALL);
resolver.registerContentObserver(NOTIFICATION_RATE_LIMIT_URI,
false, this, UserHandle.USER_ALL);
update(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: observe
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
|
observe
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deletePage(String space, String page, Locale locale) throws Exception
{
delete(new LocalDocumentReference(space, page, locale));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deletePage
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
|
deletePage
|
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 void startBackgroundUserLocked(int userId, UserState uss) {
mStartingBackgroundUsers.add(uss);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startBackgroundUserLocked
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
|
startBackgroundUserLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testSingleIncomingCallRemoteDisconnect() throws Exception {
IdPair ids = startAndMakeActiveIncomingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
when(mClockProxy.currentTimeMillis()).thenReturn(TEST_DISCONNECT_TIME);
when(mClockProxy.elapsedRealtime()).thenReturn(TEST_DISCONNECT_ELAPSED_TIME);
mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.LOCAL);
assertEquals(Call.STATE_DISCONNECTED,
mInCallServiceFixtureX.getCall(ids.mCallId).getState());
assertEquals(Call.STATE_DISCONNECTED,
mInCallServiceFixtureY.getCall(ids.mCallId).getState());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSingleIncomingCallRemoteDisconnect
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testSingleIncomingCallRemoteDisconnect
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public ContentProviderHolder getContentProviderExternal(String name, int userId, IBinder token)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(name);
data.writeInt(userId);
data.writeStrongBinder(token);
mRemote.transact(GET_CONTENT_PROVIDER_EXTERNAL_TRANSACTION, data, reply, 0);
reply.readException();
int res = reply.readInt();
ContentProviderHolder cph = null;
if (res != 0) {
cph = ContentProviderHolder.CREATOR.createFromParcel(reply);
}
data.recycle();
reply.recycle();
return cph;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentProviderExternal
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getContentProviderExternal
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeRecords(final Object iRecords, final String iFetchPlan, String iFormat, final String accept,
final Map<String, Object> iAdditionalProperties) throws IOException {
if (iRecords == null)
return;
final Iterator<Object> it = OMultiValue.getMultiValueIterator(iRecords);
if (accept != null && accept.contains("text/csv")) {
sendStream(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, "data.csv", new OCallable<Void, OChunkedResponse>() {
@Override
public Void call(final OChunkedResponse iArgument) {
final LinkedHashSet<String> colNames = new LinkedHashSet<String>();
final List<ODocument> records = new ArrayList<ODocument>();
// BROWSE ALL THE RECORD TO HAVE THE COMPLETE COLUMN
// NAMES LIST
while (it.hasNext()) {
final Object r = it.next();
if (r != null && r instanceof OIdentifiable) {
final ORecord rec = ((OIdentifiable) r).getRecord();
if (rec != null) {
if (rec instanceof ODocument) {
final ODocument doc = (ODocument) rec;
records.add(doc);
for (String fieldName : doc.fieldNames()) {
colNames.add(fieldName);
}
}
}
}
}
final List<String> orderedColumns = new ArrayList<String>(colNames);
try {
// WRITE THE HEADER
for (int col = 0; col < orderedColumns.size(); ++col) {
if (col > 0)
iArgument.write(',');
iArgument.write(orderedColumns.get(col).getBytes());
}
iArgument.write(OHttpUtils.EOL);
// WRITE EACH RECORD
for (ODocument doc : records) {
for (int col = 0; col < orderedColumns.size(); ++col) {
if (col > 0) {
iArgument.write(',');
}
Object value = doc.field(orderedColumns.get(col));
if (value != null) {
if (!(value instanceof Number))
value = "\"" + value + "\"";
iArgument.write(value.toString().getBytes());
}
}
iArgument.write(OHttpUtils.EOL);
}
iArgument.flush();
} catch (IOException e) {
OLogManager.instance().error(this, "HTTP response: error on writing records", e);
}
return null;
}
});
} else {
if (iFormat == null)
iFormat = JSON_FORMAT;
else
iFormat = JSON_FORMAT + "," + iFormat;
final StringWriter buffer = new StringWriter();
final OJSONWriter json = new OJSONWriter(buffer, iFormat);
json.beginObject();
final String format = iFetchPlan != null ? iFormat + ",fetchPlan:" + iFetchPlan : iFormat;
// WRITE RECORDS
json.beginCollection(-1, true, "result");
formatMultiValue(it, buffer, format);
json.endCollection(-1, true);
if (iAdditionalProperties != null) {
for (Map.Entry<String, Object> entry : iAdditionalProperties.entrySet()) {
final Object v = entry.getValue();
if (OMultiValue.isMultiValue(v)) {
json.beginCollection(-1, true, entry.getKey());
formatMultiValue(OMultiValue.getMultiValueIterator(v), buffer, format);
json.endCollection(-1, true);
} else
json.writeAttribute(entry.getKey(), v);
}
}
json.endObject();
send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeRecords
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
writeRecords
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition neq(Function<T> value) {
Condition conditionLocal = new NotEqualCondition<T>(selector, selector.generateParameter(value));
return getOnGoingLogicalCondition(conditionLocal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: neq
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
neq
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder timeZone(String tz) {
if (!ClickHouseChecker.isNullOrEmpty(tz)) {
options.put(ClickHouseClientOption.SERVER_TIME_ZONE.getKey(), tz);
} else {
options.remove(ClickHouseClientOption.SERVER_TIME_ZONE.getKey());
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: timeZone
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
|
timeZone
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DomNodeList<DomNode> getChildNodes() {
return new SiblingDomNodeList(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChildNodes
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getChildNodes
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasDelegatingCreator() {
return _creators[C_DELEGATE] != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasDelegatingCreator
File: src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hasDelegatingCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean setReplacementWindowIfNeeded(WindowState replacementCandidate) {
boolean replacementSet = false;
if (mWillReplaceWindow && mReplacementWindow == null
&& getWindowTag().toString().equals(replacementCandidate.getWindowTag().toString())) {
mReplacementWindow = replacementCandidate;
replacementCandidate.mSkipEnterAnimationForSeamlessReplacement = !mAnimateReplacingWindow;
replacementSet = true;
}
for (int i = mChildren.size() - 1; i >= 0; --i) {
final WindowState c = mChildren.get(i);
replacementSet |= c.setReplacementWindowIfNeeded(replacementCandidate);
}
return replacementSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReplacementWindowIfNeeded
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
|
setReplacementWindowIfNeeded
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String validateAddLinkInputs(String sourceNodeName, String linkId, String targetNodeName,
String targetNodeCapabilityName, String sourceNodeId) {
List<String> errList = new ArrayList<>();
if (sourceNodeName == null) {
errList.add("Source Node name missing" + " ");
}
if (linkId == null) {
errList.add("Link missing" + " ");
}
if (targetNodeName == null) {
errList.add("target Node name missing" + " ");
}
if (targetNodeCapabilityName == null) {
errList.add("targetNodeCapabilityName mising" + " ");
if (sourceNodeId == null) {
errList.add("sourceNodeId mising" + " ");
}
}
return errList.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateAddLinkInputs
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
validateAddLinkInputs
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends Output<E>, E extends Exception> void append(A a, CharSequence csq, int start, int end) throws E {
csq = csq == null ? "null" : csq;
for (int i = start; i < end; i++) {
char c = csq.charAt(i);
switch (c) {
case '&' -> {
a.append(csq, start, i);
start = i + 1;
a.append(AMP);
}
case '<' -> {
a.append(csq, start, i);
start = i + 1;
a.append(LT);
}
case '>' -> {
a.append(csq, start, i);
start = i + 1;
a.append(GT);
}
case '"' -> {
a.append(csq, start, i);
start = i + 1;
a.append(QUOT);
}
}
}
a.append(csq, start, end);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-33962
- Severity: MEDIUM
- CVSS Score: 6.1
Description: Fix #157 add more aggressive html5 escaping
Function: append
File: api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
Repository: jstachio
Fixed Code:
@Override
public <A extends Output<E>, E extends Exception> void append(A a, CharSequence csq, int start, int end) throws E {
csq = csq == null ? "null" : csq;
for (int i = start; i < end; i++) {
char c = csq.charAt(i);
switch (c) {
case '"' -> { // 34
a.append(csq, start, i);
start = i + 1;
a.append(QUOT);
}
case '&' -> { // 38
a.append(csq, start, i);
start = i + 1;
a.append(AMP);
}
case '\'' -> { // 39
a.append(csq, start, i);
start = i + 1;
a.append(APOS);
}
case '<' -> { // 60
a.append(csq, start, i);
start = i + 1;
a.append(LT);
}
case '=' -> { // 61
a.append(csq, start, i);
start = i + 1;
a.append(EQUAL);
}
case '>' -> { // 62
a.append(csq, start, i);
start = i + 1;
a.append(GT);
}
case '`' -> { // 96
a.append(csq, start, i);
start = i + 1;
a.append(BACK_TICK);
}
}
}
a.append(csq, start, end);
}
|
[
"CWE-79"
] |
CVE-2023-33962
|
MEDIUM
| 6.1
|
jstachio
|
append
|
api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
|
7b2f78377d1284df14c580be762a25af5f8dcd66
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String getXSITypeValue(StartElement startElement) {
Attribute xsiType = startElement.getAttributeByName(new QName(JBossSAMLURIConstants.XSI_NSURI.get(),
JBossSAMLConstants.TYPE.get()));
if (xsiType == null)
throw logger.parserExpectedXSI(ErrorCodes.EXPECTED_XSI);
return StaxParserUtil.getAttributeValue(xsiType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXSITypeValue
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getXSITypeValue
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearClearableFlagsLw() {
int newVal = mResettingSystemUiFlags | View.SYSTEM_UI_CLEARABLE_FLAGS;
if (newVal != mResettingSystemUiFlags) {
mResettingSystemUiFlags = newVal;
mWindowManagerFuncs.reevaluateStatusBarVisibility();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearClearableFlagsLw
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
|
clearClearableFlagsLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void checkV4Signer(List<Result.V3SchemeSignerInfo> v3Signers,
List<X509Certificate> v4Certs, byte[] digestFromV4, Result result) {
if (v3Signers.size() != 1) {
result.addError(Issue.V4_SIG_MULTIPLE_SIGNERS);
}
// Compare certificates.
checkV4Certificate(v4Certs, v3Signers.get(0).mCerts, result);
// Compare digests.
final byte[] digestFromV3 = pickBestDigestForV4(v3Signers.get(0).getContentDigests());
if (!Arrays.equals(digestFromV4, digestFromV3)) {
result.addError(Issue.V4_SIG_V2_V3_DIGESTS_MISMATCH);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkV4Signer
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
|
checkV4Signer
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean hasActivity() {
// I am an activity!
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasActivity
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
|
hasActivity
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object setUserData(String key, Object data, UserDataHandler handler) {
return doc.setUserData(key, data, handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserData
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
setUserData
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public FormValidation doCheck(@AncestorInPath Item project, @QueryParameter String value ) {
// Require CONFIGURE permission on this project
if(!project.hasPermission(Item.CONFIGURE)) return FormValidation.ok();
StringTokenizer tokens = new StringTokenizer(Util.fixNull(value),",");
boolean hasProjects = false;
while(tokens.hasMoreTokens()) {
String projectName = tokens.nextToken().trim();
if (StringUtils.isNotBlank(projectName)) {
Item item = Jenkins.getInstance().getItem(projectName,project,Item.class);
if(item==null)
return FormValidation.error(Messages.BuildTrigger_NoSuchProject(projectName,
AbstractProject.findNearest(projectName,project.getParent()).getRelativeNameFrom(project)));
if(!(item instanceof AbstractProject))
return FormValidation.error(Messages.BuildTrigger_NotBuildable(projectName));
hasProjects = true;
}
}
if (!hasProjects) {
return FormValidation.error(Messages.BuildTrigger_NoProjectSpecified());
}
return FormValidation.ok();
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2013-7330
- Severity: MEDIUM
- CVSS Score: 4.0
Description: [SECURITY-55]
This patch makes standard post-build action refuse to let you configure a downstream project you cannot currently build.
The one from parameterized-trigger will show an error in the configure screen but still lets you save the configuration; needs an analogous patch to that plugin.
Does not yet protect against POSTing config.xml with the trigger.
(cherry picked from commit 757bc8a53956e6fbab267214e6e0896f03c3c262)
Conflicts:
core/src/main/java/hudson/model/Descriptor.java
Function: doCheck
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
Fixed Code:
public FormValidation doCheck(@AncestorInPath Item project, @QueryParameter String value, @QueryParameter boolean upstream) {
// Require CONFIGURE permission on this project
if(!project.hasPermission(Item.CONFIGURE)) return FormValidation.ok();
StringTokenizer tokens = new StringTokenizer(Util.fixNull(value),",");
boolean hasProjects = false;
while(tokens.hasMoreTokens()) {
String projectName = tokens.nextToken().trim();
if (StringUtils.isNotBlank(projectName)) {
Item item = Jenkins.getInstance().getItem(projectName,project,Item.class);
if(item==null)
return FormValidation.error(Messages.BuildTrigger_NoSuchProject(projectName,
AbstractProject.findNearest(projectName,project.getParent()).getRelativeNameFrom(project)));
if(!(item instanceof AbstractProject))
return FormValidation.error(Messages.BuildTrigger_NotBuildable(projectName));
if (!upstream && !item.hasPermission(Item.BUILD)) {
return FormValidation.error(Messages.BuildTrigger_you_have_no_permission_to_build_(projectName));
}
hasProjects = true;
}
}
if (!hasProjects) {
return FormValidation.error(Messages.BuildTrigger_NoProjectSpecified());
}
return FormValidation.ok();
}
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
doCheck
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean isInterestingToUserLocked() {
return mVisibleRequested || nowVisible || mState == PAUSING || mState == RESUMED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInterestingToUserLocked
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
|
isInterestingToUserLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setWifiRequired(Boolean wifiRequired) {
isWifiRequired = wifiRequired;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWifiRequired
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
setWifiRequired
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDeviceOwnerLockScreenInfo(@NonNull ComponentName admin, CharSequence info) {
throwIfParentInstance("setDeviceOwnerLockScreenInfo");
if (mService != null) {
try {
mService.setDeviceOwnerLockScreenInfo(admin, info);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceOwnerLockScreenInfo
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
|
setDeviceOwnerLockScreenInfo
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNavbarMenuLink1Enabled() {
return !StringUtils.isBlank(getNavbarMenuLink1URL());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNavbarMenuLink1Enabled
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
|
isNavbarMenuLink1Enabled
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public IBinder asBinder()
{
return mRemote;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asBinder
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
asBinder
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 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/CmdZip.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/CmdZip.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
static ObjectStreamClass lookupStreamClass(Class<?> cl) {
WeakHashMap<Class<?>, ObjectStreamClass> tlc = getCache();
ObjectStreamClass cachedValue = tlc.get(cl);
if (cachedValue == null) {
cachedValue = createClassDesc(cl);
tlc.put(cl, cachedValue);
}
return cachedValue;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2014-7911
- Severity: HIGH
- CVSS Score: 7.2
Description: Add additional checks in ObjectInputStream
Thanks to Jann Horn for reporting a bug in ObjectInputStream
and sending the initial patch.
Add some checks that the class of an object
being deserialized still conforms to the requirements
for serialization.
Add some checks that the class being deserialized matches
the type information (enum, serializable, externalizable)
held in the stream.
Delayed static initialization of classes until the
type of the class has been validated against the stream
content in some cases.
Added more tests.
Bug: 15874291
Change-Id: I0f0fe68e0d21e041c5160482113ae847c357b8f5
Function: lookupStreamClass
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
Fixed Code:
static ObjectStreamClass lookupStreamClass(Class<?> cl) {
WeakHashMap<Class<?>, ObjectStreamClass> tlc = getCache();
ObjectStreamClass cachedValue = tlc.get(cl);
if (cachedValue == null) {
cachedValue = createClassDesc(cl);
tlc.put(cl, cachedValue);
}
return cachedValue;
}
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
lookupStreamClass
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRenderThread(int tid) {
synchronized (this) {
ProcessRecord proc;
int pid = Binder.getCallingPid();
if (pid == Process.myPid()) {
demoteSystemServerRenderThread(tid);
return;
}
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(pid);
if (proc != null && proc.renderThreadTid == 0 && tid > 0) {
// ensure the tid belongs to the process
if (!isThreadInProcess(pid, tid)) {
throw new IllegalArgumentException(
"Render thread does not belong to process");
}
proc.renderThreadTid = tid;
if (DEBUG_OOM_ADJ) {
Slog.d("UI_FIFO", "Set RenderThread tid " + tid + " for pid " + pid);
}
// promote to FIFO now
if (proc.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP) {
if (DEBUG_OOM_ADJ) Slog.d("UI_FIFO", "Promoting " + tid + "out of band");
if (mUseFifoUiScheduling) {
setThreadScheduler(proc.renderThreadTid,
SCHED_FIFO | SCHED_RESET_ON_FORK, 1);
} else {
setThreadPriority(proc.renderThreadTid, TOP_APP_PRIORITY_BOOST);
}
}
} else {
if (DEBUG_OOM_ADJ) {
Slog.d("UI_FIFO", "Didn't set thread from setRenderThread? " +
"PID: " + pid + ", TID: " + tid + " FIFO: " +
mUseFifoUiScheduling);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRenderThread
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
|
setRenderThread
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void closeSession(VaadinSession session) {
session.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeSession
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
closeSession
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public float getFloatProperty(String name) throws JMSException {
Object o = this.getObjectProperty(name);
if (o == null)
throw new NumberFormatException("Null is not a valid float");
else if (o instanceof String) {
return Float.parseFloat((String) o);
} else if (o instanceof Float) {
return (Float) 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: getFloatProperty
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
|
getFloatProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void logout() {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logout
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
logout
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setDeviceOwnerTypeLocked(ComponentName admin,
@DeviceOwnerType int deviceOwnerType) {
String packageName = admin.getPackageName();
boolean isAdminTestOnly;
verifyDeviceOwnerTypePreconditionsLocked(admin);
isAdminTestOnly = isAdminTestOnlyLocked(admin, mOwners.getDeviceOwnerUserId());
Preconditions.checkState(isAdminTestOnly
|| !mOwners.isDeviceOwnerTypeSetForDeviceOwner(packageName),
"Test only admins can only set the device owner type more than once");
mOwners.setDeviceOwnerType(packageName, deviceOwnerType, isAdminTestOnly);
setGlobalSettingDeviceOwnerType(deviceOwnerType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceOwnerTypeLocked
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
|
setDeviceOwnerTypeLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean cancelPotentialWork(Message message, ImageView imageView) {
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
if (bitmapWorkerTask != null) {
final Message oldMessage = bitmapWorkerTask.message;
if (oldMessage == null || message != oldMessage) {
bitmapWorkerTask.cancel(true);
} else {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelPotentialWork
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
cancelPotentialWork
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public void taskForward(String procInsId, Map<String, Object> variables) {
taskForward(getCurrentTask(procInsId), variables);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: taskForward
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
taskForward
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void engineSetMode(String modeStr) throws NoSuchAlgorithmException {
final Mode mode;
try {
mode = Mode.valueOf(modeStr.toUpperCase(Locale.US));
} catch (IllegalArgumentException e) {
NoSuchAlgorithmException newE = new NoSuchAlgorithmException("No such mode: " + modeStr);
newE.initCause(e);
throw newE;
}
checkSupportedMode(mode);
this.mode = mode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineSetMode
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
engineSetMode
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getTimestampEpochSeconds() {
return mTimestamp;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimestampEpochSeconds
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
|
getTimestampEpochSeconds
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpBroadcastsLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
boolean needSep = false;
boolean onlyHistory = false;
boolean printedAnything = false;
if ("history".equals(dumpPackage)) {
if (opti < args.length && "-s".equals(args[opti])) {
dumpAll = false;
}
onlyHistory = true;
dumpPackage = null;
}
pw.println("ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)");
if (!onlyHistory && dumpAll) {
if (mRegisteredReceivers.size() > 0) {
boolean printed = false;
Iterator it = mRegisteredReceivers.values().iterator();
while (it.hasNext()) {
ReceiverList r = (ReceiverList)it.next();
if (dumpPackage != null && (r.app == null ||
!dumpPackage.equals(r.app.info.packageName))) {
continue;
}
if (!printed) {
pw.println(" Registered Receivers:");
needSep = true;
printed = true;
printedAnything = true;
}
pw.print(" * "); pw.println(r);
r.dump(pw, " ");
}
}
if (mReceiverResolver.dump(pw, needSep ?
"\n Receiver Resolver Table:" : " Receiver Resolver Table:",
" ", dumpPackage, false, false)) {
needSep = true;
printedAnything = true;
}
}
for (BroadcastQueue q : mBroadcastQueues) {
needSep = q.dumpLocked(fd, pw, args, opti, dumpAll, dumpPackage, needSep);
printedAnything |= needSep;
}
needSep = true;
if (!onlyHistory && mStickyBroadcasts != null && dumpPackage == null) {
for (int user=0; user<mStickyBroadcasts.size(); user++) {
if (needSep) {
pw.println();
}
needSep = true;
printedAnything = true;
pw.print(" Sticky broadcasts for user ");
pw.print(mStickyBroadcasts.keyAt(user)); pw.println(":");
StringBuilder sb = new StringBuilder(128);
for (Map.Entry<String, ArrayList<Intent>> ent
: mStickyBroadcasts.valueAt(user).entrySet()) {
pw.print(" * Sticky action "); pw.print(ent.getKey());
if (dumpAll) {
pw.println(":");
ArrayList<Intent> intents = ent.getValue();
final int N = intents.size();
for (int i=0; i<N; i++) {
sb.setLength(0);
sb.append(" Intent: ");
intents.get(i).toShortString(sb, false, true, false, false);
pw.println(sb.toString());
Bundle bundle = intents.get(i).getExtras();
if (bundle != null) {
pw.print(" ");
pw.println(bundle.toString());
}
}
} else {
pw.println("");
}
}
}
}
if (!onlyHistory && dumpAll) {
pw.println();
for (BroadcastQueue queue : mBroadcastQueues) {
pw.println(" mBroadcastsScheduled [" + queue.mQueueName + "]="
+ queue.mBroadcastsScheduled);
}
pw.println(" mHandler:");
mHandler.dump(new PrintWriterPrinter(pw), " ");
needSep = true;
printedAnything = true;
}
if (!printedAnything) {
pw.println(" (nothing)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpBroadcastsLocked
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
|
dumpBroadcastsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkTimestamp(String timestamp) {
long requestTimeMillis = 0L;
try {
requestTimeMillis = Long.parseLong(timestamp);
} catch (NumberFormatException e) {
// nothing to do
}
long x = System.currentTimeMillis() - requestTimeMillis;
return x >= -TIMESTAMP_INTERVAL && x <= TIMESTAMP_INTERVAL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkTimestamp
File: apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/filter/ClientAuthenticationFilter.java
Repository: apolloconfig/apollo
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-15170
|
MEDIUM
| 6.8
|
apolloconfig/apollo
|
checkTimestamp
|
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/filter/ClientAuthenticationFilter.java
|
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateCompatDisplayInsets() {
if (mCompatDisplayInsets != null || !shouldCreateCompatDisplayInsets()) {
// The override configuration is set only once in size compatibility mode.
return;
}
Configuration overrideConfig = getRequestedOverrideConfiguration();
final Configuration fullConfig = getConfiguration();
// Ensure the screen related fields are set. It is used to prevent activity relaunch
// when moving between displays. For screenWidthDp and screenWidthDp, because they
// are relative to bounds and density, they will be calculated in
// {@link Task#computeConfigResourceOverrides} and the result will also be
// relatively fixed.
overrideConfig.colorMode = fullConfig.colorMode;
overrideConfig.densityDpi = fullConfig.densityDpi;
// The smallest screen width is the short side of screen bounds. Because the bounds
// and density won't be changed, smallestScreenWidthDp is also fixed.
overrideConfig.smallestScreenWidthDp = fullConfig.smallestScreenWidthDp;
if (info.isFixedOrientation()) {
// lock rotation too. When in size-compat, onConfigurationChanged will watch for and
// apply runtime rotation changes.
overrideConfig.windowConfiguration.setRotation(
fullConfig.windowConfiguration.getRotation());
}
// The role of CompatDisplayInsets is like the override bounds.
mCompatDisplayInsets =
new CompatDisplayInsets(
mDisplayContent, this, mLetterboxBoundsForFixedOrientationAndAspectRatio);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCompatDisplayInsets
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
|
updateCompatDisplayInsets
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public PropertyChangeListener[] getReadyStateChangeListeners() {
return super.getPropertyChangeListeners("readyState");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReadyStateChangeListeners
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
|
getReadyStateChangeListeners
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAddComment(AjaxRequestTarget target, PlanarRange range) {
state.commentId = null;
state.position = SourceRendererProvider.getPosition(range);
pushState(target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAddComment
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
onAddComment
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOldFormat() {
return this.markHead.isOldFormat();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOldFormat
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2022-23596
|
MEDIUM
| 5
|
junrar
|
isOldFormat
|
src/main/java/com/github/junrar/Archive.java
|
7b16b3d90b91445fd6af0adfed22c07413d4fab7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onCreate
|
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String makeHiddenTags(final HttpServletRequest request) {
return (makeHiddenTags(request, EMPTY_MAP, 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
|
private PersistentReplicator getReplicatorReference(String replName, PersistentTopic topic) {
try {
String remoteCluster = PersistentReplicator.getRemoteCluster(replName);
PersistentReplicator repl = (PersistentReplicator) topic.getPersistentReplicator(remoteCluster);
return checkNotNull(repl);
} catch (Exception e) {
throw new RestException(Status.NOT_FOUND, "Replicator not found");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReplicatorReference
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
|
getReplicatorReference
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateCallsManagerState() {
updateForegroundCall();
updateCanAddCall();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCallsManagerState
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
updateCallsManagerState
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private void unlinkRecursive(String dir, boolean deleteRootToo) {
File dh = new File(dir);
File fileOrDir = null;
if (dh.exists()) {
String[] objects = dh.list();
for (int i = 0; i < objects.length; i++) {
fileOrDir = new File(dir + "/" + objects[i]);
if (fileOrDir.isDirectory()) {
if (!objects[i].equals(".") && !objects[i].equals("..")) {
unlinkRecursive(dir + "/" + objects[i], true);
}
}
fileOrDir.delete();
}
if (deleteRootToo) {
dh.delete();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unlinkRecursive
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
unlinkRecursive
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void process(EntityReference source)
{
this.progressManager.pushLevelProgress(2, this);
AttachmentReference destination = this.request.getProperty(MoveAttachmentRequest.DESTINATION);
boolean autoRedirect = this.request.getProperty(MoveAttachmentRequest.AUTO_REDIRECT);
XWiki wiki = this.xcontextProvider.get().getWiki();
// Update the author for the attribution of the attachment uploader.
this.modelBridge.setContextUserReference(this.request.getUserReference());
try {
this.progressManager.startStep(this);
moveAttachment(source, destination, autoRedirect, wiki);
this.progressManager.endStep(this);
this.progressManager.startStep(this);
this.observationManager.notify(new AttachmentMovedEvent((AttachmentReference) source, destination), this,
this.request);
this.progressManager.endStep(this);
} finally {
this.progressManager.popLevelProgress(this);
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2023-37910
- Severity: HIGH
- CVSS Score: 8.1
Description: XWIKI-20334: Add rights check to MoveAttachmentJob
Function: process
File: xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
protected void process(EntityReference source)
{
this.progressManager.pushLevelProgress(2, this);
AttachmentReference destination = this.request.getProperty(MoveAttachmentRequest.DESTINATION);
boolean autoRedirect = this.request.getProperty(MoveAttachmentRequest.AUTO_REDIRECT);
XWiki wiki = this.xcontextProvider.get().getWiki();
// Update the author for the attribution of the attachment uploader.
this.modelBridge.setContextUserReference(this.request.getUserReference());
try {
if (checkMoveRights(source, destination)) {
this.progressManager.startStep(this);
moveAttachment(source, destination, autoRedirect, wiki);
this.progressManager.endStep(this);
this.progressManager.startStep(this);
this.observationManager.notify(new AttachmentMovedEvent((AttachmentReference) source, destination),
this,
this.request);
this.progressManager.endStep(this);
}
} finally {
this.progressManager.popLevelProgress(this);
}
}
|
[
"CWE-862"
] |
CVE-2023-37910
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
process
|
xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
|
d7720219d60d7201c696c3196c9d4a86d0881325
| 1
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public String getAttributeNamespace(int index) {
final int id = nativeGetAttributeNamespace(mParseState, index);
if (id == ERROR_NULL_DOCUMENT) {
throw new NullPointerException("Null document");
}
if (DEBUG) System.out.println("getAttributeNamespace of " + index + " = " + id);
if (id >= 0) return getSequenceString(mStrings.getSequence(id));
else if (id == -1) return "";
throw new IndexOutOfBoundsException(String.valueOf(index));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeNamespace
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getAttributeNamespace
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpActivitiesLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, boolean dumpClient, String dumpPackage) {
pw.println("ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)");
boolean printedAnything = mStackSupervisor.dumpActivitiesLocked(fd, pw, dumpAll, dumpClient,
dumpPackage);
boolean needSep = printedAnything;
boolean printed = ActivityStackSupervisor.printThisActivity(pw, mFocusedActivity,
dumpPackage, needSep, " mFocusedActivity: ");
if (printed) {
printedAnything = true;
needSep = false;
}
if (dumpPackage == null) {
if (needSep) {
pw.println();
}
needSep = true;
printedAnything = true;
mStackSupervisor.dump(pw, " ");
}
if (!printedAnything) {
pw.println(" (nothing)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpActivitiesLocked
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
|
dumpActivitiesLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getDownloadFinishMessage() {
return FileDownloader.class.getName() + DOWNLOAD_FINISH_MESSAGE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDownloadFinishMessage
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
getDownloadFinishMessage
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static Predicate<File> isDirectory() {
return FilePredicate.IS_DIRECTORY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDirectory
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
isDirectory
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setAttribute(@Nonnull final String name, @Nullable final String value, @Nonnull @MustNotContainNull final Topic[] topics) {
for (final Topic t : topics) {
t.setAttribute(name, value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttribute
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
setAttribute
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void writeDesign(Element trElement,
DesignContext designContext) {
super.writeDesign(trElement, designContext);
if (section.grid.getDefaultHeaderRow() == this) {
DesignAttributeHandler.writeAttribute("default",
trElement.attributes(), true, null, boolean.class);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeDesign
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
|
writeDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Deprecated
@RequiresPermissions(RestPermissions.USERS_LIST)
@ApiOperation(value = "List all users", notes = "Permissions and session data included by default")
public UserList listUsers(
@ApiParam(name = "include_permissions") @QueryParam("include_permissions") @DefaultValue("true") boolean includePermissions,
@ApiParam(name = "include_sessions") @QueryParam("include_sessions") @DefaultValue("true") boolean includeSessions) {
return listUsersSelective(includePermissions, includeSessions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listUsers
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
|
listUsers
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showBootMessage(final CharSequence msg, final boolean always) {
if (Binder.getCallingUid() != myUid()) {
throw new SecurityException();
}
mWindowManager.showBootMessage(msg, always);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showBootMessage
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
|
showBootMessage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public View getView(String name) {
return viewGroupMixIn.getView(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getView
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
|
getView
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@ParameterizedTest
@MethodSource("testsParameters")
@Order(3)
void registerPasswordTooShort(boolean useLiveValidation, boolean isModal, TestUtils testUtils) throws Exception
{
AbstractRegistrationPage registrationPage = setUp(testUtils, useLiveValidation, isModal);
registrationPage.fillRegisterForm(null, null, null, "short", "short", null);
assertFalse(validateAndRegister(testUtils, useLiveValidation, isModal, registrationPage));
assertTrue(
registrationPage.validationFailureMessagesInclude("Your new password must be at least 6 characters long."));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerPasswordTooShort
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
registerPasswordTooShort
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 0
|
Analyze the following code function for security vulnerabilities
|
@HiddenApiEnforcementPolicy int getPolicy() {
return mPolicy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPolicy
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getPolicy
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
final void runInBackgroundDisabled(int uid) {
synchronized (this) {
UidRecord uidRec = mActiveUids.get(uid);
if (uidRec != null) {
// This uid is actually running... should it be considered background now?
if (uidRec.idle) {
doStopUidLocked(uidRec.uid, uidRec);
}
} else {
// This uid isn't actually running... still send a report about it being "stopped".
doStopUidLocked(uid, null);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runInBackgroundDisabled
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
|
runInBackgroundDisabled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public File downloadFileFromResponse(Response response) throws ApiException {
try {
File file = prepareDownloadFile(response);
Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
return file;
} catch (IOException e) {
throw new ApiException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: downloadFileFromResponse
File: samples/client/petstore/java/resteasy/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
|
downloadFileFromResponse
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean convertToTranslucent(IBinder token, ActivityOptions options)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
if (options == null) {
data.writeInt(0);
} else {
data.writeInt(1);
data.writeBundle(options.toBundle());
}
mRemote.transact(CONVERT_TO_TRANSLUCENT_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToTranslucent
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
convertToTranslucent
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean canAffectSystemUiFlags() {
if (isFullyTransparent()) {
return false;
}
if (mActivityRecord == null) {
final boolean shown = mWinAnimator.getShown();
final boolean exiting = mAnimatingExit || mDestroying;
return shown && !exiting;
} else {
final Task task = getTask();
final boolean canFromTask = task != null && task.canAffectSystemUiFlags();
return canFromTask && mActivityRecord.isVisible();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canAffectSystemUiFlags
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
|
canAffectSystemUiFlags
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getOffsetAtStartOf(int offset) {
// XXX this probably should skip local reorderings and
// zero-width characters, look at callers
if (offset == 0)
return 0;
CharSequence text = mText;
char c = text.charAt(offset);
if (c >= '\uDC00' && c <= '\uDFFF') {
char c1 = text.charAt(offset - 1);
if (c1 >= '\uD800' && c1 <= '\uDBFF')
offset -= 1;
}
if (mSpannedText) {
ReplacementSpan[] spans = ((Spanned) text).getSpans(offset, offset,
ReplacementSpan.class);
for (int i = 0; i < spans.length; i++) {
int start = ((Spanned) text).getSpanStart(spans[i]);
int end = ((Spanned) text).getSpanEnd(spans[i]);
if (start < offset && end > offset)
offset = start;
}
}
return offset;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOffsetAtStartOf
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getOffsetAtStartOf
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<SFile> getPath() {
final List<SFile> result = new ArrayList<>(imported);
// ::comment when __CORE__
result.addAll(includePath());
result.addAll(SecurityUtils.getPath(SecurityUtils.PATHS_CLASSES));
// ::done
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPath
File: src/net/sourceforge/plantuml/preproc/ImportedFiles.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getPath
|
src/net/sourceforge/plantuml/preproc/ImportedFiles.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CharSequence getOrganizationName(@Nullable ComponentName who, String callerPackageName) {
if (!mHasFeature) {
return null;
}
CallerIdentity caller = getCallerIdentity(who);
ActiveAdmin admin;
if (isPermissionCheckFlagEnabled()) {
EnforcingAdmin enforcingAdmin = enforceCanQueryAndGetEnforcingAdmin(
who,
MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY,
caller.getPackageName(),
caller.getUserId());
admin = enforcingAdmin.getActiveAdmin();
} else {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallingUser(isManagedProfile(caller.getUserId()));
Preconditions.checkCallAuthorization(isDeviceOwner(caller) || isProfileOwner(caller));
synchronized (getLockObject()) {
admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
}
}
return admin.organizationName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizationName
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
|
getOrganizationName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean okToClearCache() {
File otherJavawsRunning = PathsAndFiles.MAIN_LOCK.getFile();
FileLock locking = null;
try {
if (otherJavawsRunning.isFile()) {
FileOutputStream fis = new FileOutputStream(otherJavawsRunning);
FileChannel channel = fis.getChannel();
locking = channel.tryLock();
if (locking == null) {
LOG.info("Other instances of javaws are running");
return false;
}
LOG.info("No other instances of javaws are running");
return true;
} else {
LOG.info("No instance file found");
return true;
}
} catch (IOException e) {
return false;
} finally {
if (locking != null) {
try {
locking.release();
} catch (IOException ex) {
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, ex);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: okToClearCache
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
okToClearCache
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Path("/download-dependencies")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@GET
public Response downloadDependencies() {
StreamingOutput os = new StreamingOutput() {
@Override
public void write(OutputStream output) throws IOException {
JobContext context = jobManager.getJobContext(getJobToken(), true);
TarUtils.tar(context.getServerWorkspace(), Lists.newArrayList("**"),
new ArrayList<>(), output);
output.flush();
}
};
return Response.ok(os).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: downloadDependencies
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesResource.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21243
|
HIGH
| 7.5
|
theonedev/onedev
|
downloadDependencies
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesResource.java
|
9637fc8fa461c5777282a0021c3deb1e7a48f137
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void setHandler(Handler handler) {
mHandler = handler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHandler
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
|
setHandler
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stripCData(Node node) {
addError(ErrorMessageUtil.ERROR_CDATA_FOUND, new Object[]{HTMLEntityEncoder.htmlEntityEncode(node.getTextContent())});
Node text = document.createTextNode(node.getTextContent());
node.getParentNode().insertBefore(text, node);
node.getParentNode().removeChild(node);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stripCData
File: src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-28367
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
stripCData
|
src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
|
0199e7e194dba5e7d7197703f43ebe22401e61ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setHeaderText(String text) {
// Only set the text if it is different than the existing one to avoid announcing again.
if (!TextUtils.isEmpty(mLayout.getHeaderText())
&& mLayout.getHeaderText().toString().equals(text)) {
return;
}
mLayout.setHeaderText(text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHeaderText
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
setHeaderText
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DocumentSection> getSections() throws XWikiException
{
return this.doc.getSections();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSections
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
|
getSections
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.