instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public static void copyToDir(Directory in, Directory out,
String[] fileNames) throws DirectoryException {
for (String fileName : fileNames) {
copyToDir(in, out, fileName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyToDir
File: brut.j.dir/src/main/java/brut/directory/DirUtil.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
copyToDir
|
brut.j.dir/src/main/java/brut/directory/DirUtil.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
public Client getHttpClient() {
return httpClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHttpClient
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getHttpClient
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<KBTemplate> findAll(int start, int end,
OrderByComparator<KBTemplate> orderByComparator) {
return findAll(start, end, orderByComparator, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findAll
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
findAll
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getStateFromProcState(int procState) {
if (procState == ActivityManager.PROCESS_STATE_NONEXISTENT) {
return STATE_GONE;
} else {
if (procState > ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) {
return STATE_TIMER;
} else {
return STATE_ACTIVE;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStateFromProcState
File: services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21254
|
HIGH
| 7.8
|
android
|
getStateFromProcState
|
services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
|
fa539c85503dc63bfb53c76b6f12b3549f14a709
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpLastANRTracesLocked(PrintWriter pw) {
pw.println("ACTIVITY MANAGER LAST ANR TRACES (dumpsys activity lastanr-traces)");
final File[] files = new File(ANR_TRACE_DIR).listFiles();
if (ArrayUtils.isEmpty(files)) {
pw.println(" <no ANR has occurred since boot>");
return;
}
// Find the latest file.
File latest = null;
for (File f : files) {
if ((latest == null) || (latest.lastModified() < f.lastModified())) {
latest = f;
}
}
pw.print("File: ");
pw.print(latest.getName());
pw.println();
try (BufferedReader in = new BufferedReader(new FileReader(latest))) {
String line;
while ((line = in.readLine()) != null) {
pw.println(line);
}
} catch (IOException e) {
pw.print("Unable to read: ");
pw.print(e);
pw.println();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpLastANRTracesLocked
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
|
dumpLastANRTracesLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fireSelectionEvent(Collection<Object> oldSelection,
Collection<Object> newSelection) {
fireEvent(new SelectionEvent(this, oldSelection, newSelection));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireSelectionEvent
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
|
fireSelectionEvent
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public OIDCProviderMetadata getProviderMetadata() {
return this.providerMetadata;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProviderMetadata
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getProviderMetadata
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public CopyBuildTask extract() {
zipMethod = EXTRACT;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extract
File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
Repository: Calsign/APDE
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36628
|
CRITICAL
| 9.8
|
Calsign/APDE
|
extract
|
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
|
c6d64cbe465348c1bfd211122d89e3117afadecf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Override
public String getFullName()
{
return LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFullName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getFullName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getUrl() {
return serverAndPort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrl
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getUrl
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void triggerChunkLoading(
Class<? extends Component> componentClass) {
ui.getPage().addDynamicImport("return window.Vaadin.Flow.loadOnDemand('"
+ BundleUtils.getChunkId(componentClass) + "');");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggerChunkLoading
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
|
triggerChunkLoading
|
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 dumpStackTraces(String tracesPath, ArrayList<Integer> firstPids,
ProcessCpuTracker processCpuTracker, SparseArray<Boolean> lastPids, String[] nativeProcs) {
// Use a FileObserver to detect when traces finish writing.
// The order of traces is considered important to maintain for legibility.
FileObserver observer = new FileObserver(tracesPath, FileObserver.CLOSE_WRITE) {
@Override
public synchronized void onEvent(int event, String path) { notify(); }
};
try {
observer.startWatching();
// First collect all of the stacks of the most important pids.
if (firstPids != null) {
try {
int num = firstPids.size();
for (int i = 0; i < num; i++) {
synchronized (observer) {
if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for pid "
+ firstPids.get(i));
final long sime = SystemClock.elapsedRealtime();
Process.sendSignal(firstPids.get(i), Process.SIGNAL_QUIT);
observer.wait(1000); // Wait for write-close, give up after 1 sec
if (DEBUG_ANR) Slog.d(TAG, "Done with pid " + firstPids.get(i)
+ " in " + (SystemClock.elapsedRealtime()-sime) + "ms");
}
}
} catch (InterruptedException e) {
Slog.wtf(TAG, e);
}
}
// Next collect the stacks of the native pids
if (nativeProcs != null) {
int[] pids = Process.getPidsForCommands(nativeProcs);
if (pids != null) {
for (int pid : pids) {
if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid);
final long sime = SystemClock.elapsedRealtime();
Debug.dumpNativeBacktraceToFile(pid, tracesPath);
if (DEBUG_ANR) Slog.d(TAG, "Done with native pid " + pid
+ " in " + (SystemClock.elapsedRealtime()-sime) + "ms");
}
}
}
// Lastly, measure CPU usage.
if (processCpuTracker != null) {
processCpuTracker.init();
System.gc();
processCpuTracker.update();
try {
synchronized (processCpuTracker) {
processCpuTracker.wait(500); // measure over 1/2 second.
}
} catch (InterruptedException e) {
}
processCpuTracker.update();
// We'll take the stack crawls of just the top apps using CPU.
final int N = processCpuTracker.countWorkingStats();
int numProcs = 0;
for (int i=0; i<N && numProcs<5; i++) {
ProcessCpuTracker.Stats stats = processCpuTracker.getWorkingStats(i);
if (lastPids.indexOfKey(stats.pid) >= 0) {
numProcs++;
try {
synchronized (observer) {
if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid "
+ stats.pid);
final long stime = SystemClock.elapsedRealtime();
Process.sendSignal(stats.pid, Process.SIGNAL_QUIT);
observer.wait(1000); // Wait for write-close, give up after 1 sec
if (DEBUG_ANR) Slog.d(TAG, "Done with extra pid " + stats.pid
+ " in " + (SystemClock.elapsedRealtime()-stime) + "ms");
}
} catch (InterruptedException e) {
Slog.wtf(TAG, e);
}
} else if (DEBUG_ANR) {
Slog.d(TAG, "Skipping next CPU consuming process, not a java proc: "
+ stats.pid);
}
}
}
} finally {
observer.stopWatching();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpStackTraces
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
|
dumpStackTraces
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int calculateColorBrightness(@Nonnull final Color color) {
return (int) Math.sqrt(color.getRed() * color.getRed() * .241d + color.getGreen() * color.getGreen() * .691d + color.getBlue() * color.getBlue() * .068d);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateColorBrightness
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
|
calculateColorBrightness
|
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
public Uri insert(Uri uri, ContentValues values) {
if (DEBUG) {
Slog.v(LOG_TAG, "insert() for user: " + UserHandle.getCallingUserId());
}
String table = getValidTableOrThrow(uri);
// If a legacy table that is gone, done.
if (REMOVED_LEGACY_TABLES.contains(table)) {
return null;
}
String name = values.getAsString(Settings.Secure.NAME);
if (!isKeyValid(name)) {
return null;
}
String value = values.getAsString(Settings.Secure.VALUE);
switch (table) {
case TABLE_GLOBAL: {
if (insertGlobalSetting(name, value, null, false,
UserHandle.getCallingUserId(), false,
/* overrideableByRestore */ false)) {
return Uri.withAppendedPath(Settings.Global.CONTENT_URI, name);
}
} break;
case TABLE_SECURE: {
if (insertSecureSetting(name, value, null, false,
UserHandle.getCallingUserId(), false,
/* overrideableByRestore */ false)) {
return Uri.withAppendedPath(Settings.Secure.CONTENT_URI, name);
}
} break;
case TABLE_SYSTEM: {
if (insertSystemSetting(name, value, UserHandle.getCallingUserId(),
/* overridableByRestore */ false)) {
return Uri.withAppendedPath(Settings.System.CONTENT_URI, name);
}
} break;
default: {
throw new IllegalArgumentException("Bad Uri path:" + uri);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insert
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
insert
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int toInt(@Nullable String s) throws SQLException {
if (s != null) {
try {
s = s.trim();
return Integer.parseInt(s);
} catch (NumberFormatException e) {
try {
BigDecimal n = new BigDecimal(s);
BigInteger i = n.toBigInteger();
int gt = i.compareTo(INTMAX);
int lt = i.compareTo(INTMIN);
if (gt > 0 || lt < 0) {
throw new PSQLException(GT.tr("Bad value for type {0} : {1}", "int", s),
PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
}
return i.intValue();
} catch (NumberFormatException ne) {
throw new PSQLException(GT.tr("Bad value for type {0} : {1}", "int", s),
PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
}
}
}
return 0; // SQL NULL
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toInt
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
toInt
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static PartialVisitContext unwrapPartialVisitContext(VisitContext visitContext) {
if (visitContext == null) {
return null;
}
if (visitContext instanceof PartialVisitContext) {
return (PartialVisitContext) visitContext;
}
if (visitContext instanceof VisitContextWrapper) {
return unwrapPartialVisitContext(((VisitContextWrapper) visitContext).getWrapped());
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unwrapPartialVisitContext
File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-17091
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
unwrapPartialVisitContext
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
public Bundle getAssistContextExtras(int requestType) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAssistContextExtras
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getAssistContextExtras
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private V fromChar(K name, char value) {
try {
return valueConverter.convertChar(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert char value for header '" + name + '\'', e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromChar
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
fromChar
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasMaterialConfigWithFingerprint(MaterialConfig materialConfig) {
for (Material material : this) {
if (material.getFingerprint().equals(materialConfig.getFingerprint())) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasMaterialConfigWithFingerprint
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
hasMaterialConfigWithFingerprint
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static char[] init__puma_parser_trans_keys_0()
{
return new char [] {
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 42, 43, 47, 58, 45, 57, 65,
90, 97, 122, 32, 35, 72, 84, 84, 80, 47, 48, 57,
46, 48, 57, 48, 57, 13, 48, 57, 10, 13, 33, 124,
126, 35, 39, 42, 43, 45, 46, 48, 57, 65, 90, 94,
122, 10, 33, 58, 124, 126, 35, 39, 42, 43, 45, 46,
48, 57, 65, 90, 94, 122, 13, 32, 13, 32, 60, 62,
127, 0, 31, 34, 35, 32, 60, 62, 127, 0, 31, 34,
35, 43, 58, 45, 46, 48, 57, 65, 90, 97, 122, 32,
34, 35, 60, 62, 127, 0, 31, 32, 34, 35, 60, 62,
63, 127, 0, 31, 32, 34, 35, 60, 62, 127, 0, 31,
32, 34, 35, 60, 62, 127, 0, 31, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 0
};
}
|
Vulnerability Classification:
- CWE: CWE-444
- CVE: CVE-2021-41136
- Severity: LOW
- CVSS Score: 3.6
Description: Merge pull request from GHSA-48w2-rm65-62xx
* Fix HTTP request smuggling vulnerability
See GHSA-48w2-rm65-62xx or CVE-2021-41136 for more info.
* 4.3.9 release note
* 5.5.1 release note
* 5.5.1
Function: init__puma_parser_trans_keys_0
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
Fixed Code:
private static char[] init__puma_parser_trans_keys_0()
{
return new char [] {
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 42, 43, 47, 58, 45, 57, 65,
90, 97, 122, 32, 35, 72, 84, 84, 80, 47, 48, 57,
46, 48, 57, 48, 57, 13, 48, 57, 10, 13, 33, 124,
126, 35, 39, 42, 43, 45, 46, 48, 57, 65, 90, 94,
122, 10, 33, 58, 124, 126, 35, 39, 42, 43, 45, 46,
48, 57, 65, 90, 94, 122, 9, 13, 32, 33, 126, 9,
13, 32, 126, 32, 60, 62, 127, 0, 31, 34, 35, 32,
60, 62, 127, 0, 31, 34, 35, 43, 58, 45, 46, 48,
57, 65, 90, 97, 122, 32, 34, 35, 60, 62, 127, 0,
31, 32, 34, 35, 60, 62, 63, 127, 0, 31, 32, 34,
35, 60, 62, 127, 0, 31, 32, 34, 35, 60, 62, 127,
0, 31, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 36, 95, 45,
46, 48, 57, 65, 90, 32, 36, 95, 45, 46, 48, 57,
65, 90, 32, 36, 95, 45, 46, 48, 57, 65, 90, 32,
36, 95, 45, 46, 48, 57, 65, 90, 32, 0
};
}
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
init__puma_parser_trans_keys_0
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 1
|
Analyze the following code function for security vulnerabilities
|
static public String getCommonFormatForSelectedFiles(ImportingJob job, ArrayNode fileSelectionIndexes) {
ObjectNode retrievalRecord = job.getRetrievalRecord();
final Map<String, Integer> formatToCount = new HashMap<String, Integer>();
List<String> formats = new ArrayList<String>();
ArrayNode fileRecords = JSONUtilities.getArray(retrievalRecord, "files");
int count = fileSelectionIndexes.size();
for (int i = 0; i < count; i++) {
int index = JSONUtilities.getIntElement(fileSelectionIndexes, i, -1);
if (index >= 0 && index < fileRecords.size()) {
ObjectNode fileRecord = JSONUtilities.getObjectElement(fileRecords, index);
String format = JSONUtilities.getString(fileRecord, "format", null);
if (format != null) {
if (formatToCount.containsKey(format)) {
formatToCount.put(format, formatToCount.get(format) + 1);
} else {
formatToCount.put(format, 1);
formats.add(format);
}
}
}
}
Collections.sort(formats, new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
return formatToCount.get(o2) - formatToCount.get(o1);
}
});
return formats.size() > 0 ? formats.get(0) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommonFormatForSelectedFiles
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
getCommonFormatForSelectedFiles
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // UnlockMethodCache.OnUnlockMethodChangedListener
public void onUnlockMethodStateChanged() {
logStateToEventlog();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUnlockMethodStateChanged
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onUnlockMethodStateChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRemoveWithTaskOrganizer(boolean remove) {
mRemoveWithTaskOrganizer = remove;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRemoveWithTaskOrganizer
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setRemoveWithTaskOrganizer
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyListenerHintsChanged(ManagedServiceInfo info, int hints) {
final INotificationListener listener = (INotificationListener) info.service;
try {
listener.onListenerHintsChanged(hints);
} catch (RemoteException ex) {
Log.e(TAG, "unable to notify listener (listener hints): " + listener, ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyListenerHintsChanged
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
|
notifyListenerHintsChanged
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasLockdownAdminConfiguredNetworks(ComponentName who) {
if (!mHasFeature) {
return false;
}
Preconditions.checkNotNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller));
return mInjector.binderWithCleanCallingIdentity(() ->
mInjector.settingsGlobalGetInt(Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, 0) > 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasLockdownAdminConfiguredNetworks
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
|
hasLockdownAdminConfiguredNetworks
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerHttpResponse end() {
if (!response.ended()) {
response.end();
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: end
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
end
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "新增", notes = "新增")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:friendLink:add")
public R save(FriendLinkDO friendLink) {
if (friendLinkService.save(friendLink) > 0) {
redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok();
}
return R.error();
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: save
File: novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java
Repository: 201206030/novel-plus
Fixed Code:
@ApiOperation(value = "新增", notes = "新增")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:friendLink:add")
public R save(@Validated FriendLinkDO friendLink) {
if (friendLinkService.save(friendLink) > 0) {
redisTemplate.delete(CacheKey.INDEX_LINK_KEY);
return R.ok();
}
return R.error();
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
save
|
novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
public String generate(Config config) {
isNotNull(config, "Config");
StringBuilder xml = new StringBuilder();
XmlGenerator gen = new XmlGenerator(xml);
xml.append("<hazelcast ")
.append("xmlns=\"http://www.hazelcast.com/schema/config\"\n")
.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n")
.append("xsi:schemaLocation=\"http://www.hazelcast.com/schema/config ")
.append("http://www.hazelcast.com/schema/config/hazelcast-config-3.10.xsd\">");
gen.open("group")
.node("name", config.getGroupConfig().getName())
.node("password", getOrMaskValue(config.getGroupConfig().getPassword()))
.close()
.node("license-key", getOrMaskValue(config.getLicenseKey()))
.node("instance-name", config.getInstanceName());
manCenterXmlGenerator(gen, config);
gen.appendProperties(config.getProperties());
securityXmlGenerator(gen, config);
wanReplicationXmlGenerator(gen, config);
networkConfigXmlGenerator(gen, config);
mapConfigXmlGenerator(gen, config);
replicatedMapConfigXmlGenerator(gen, config);
cacheConfigXmlGenerator(gen, config);
queueXmlGenerator(gen, config);
multiMapXmlGenerator(gen, config);
collectionXmlGenerator(gen, "list", config.getListConfigs().values());
collectionXmlGenerator(gen, "set", config.getSetConfigs().values());
topicXmlGenerator(gen, config);
semaphoreXmlGenerator(gen, config);
lockXmlGenerator(gen, config);
countDownLatchXmlGenerator(gen, config);
ringbufferXmlGenerator(gen, config);
atomicLongXmlGenerator(gen, config);
atomicReferenceXmlGenerator(gen, config);
executorXmlGenerator(gen, config);
durableExecutorXmlGenerator(gen, config);
scheduledExecutorXmlGenerator(gen, config);
eventJournalXmlGenerator(gen, config);
partitionGroupXmlGenerator(gen, config);
cardinalityEstimatorXmlGenerator(gen, config);
listenerXmlGenerator(gen, config);
serializationXmlGenerator(gen, config);
reliableTopicXmlGenerator(gen, config);
liteMemberXmlGenerator(gen, config);
nativeMemoryXmlGenerator(gen, config);
servicesXmlGenerator(gen, config);
hotRestartXmlGenerator(gen, config);
flakeIdGeneratorXmlGenerator(gen, config);
crdtReplicationXmlGenerator(gen, config);
pnCounterXmlGenerator(gen, config);
quorumXmlGenerator(gen, config);
xml.append("</hazelcast>");
return format(xml.toString(), INDENT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generate
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
generate
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getParamNames(){
Enumeration<String> parameterNames = request.getParameterNames();
List<String> list = new ArrayList<>();
while (parameterNames.hasMoreElements()) {
list.add(parameterNames.nextElement());
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamNames
File: sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParamNames
|
sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("{journalId:\\d+}/comments/{commentParentId:\\d+}/children")
public List<BaseCommentDTO> listChildrenBy(@PathVariable("journalId") Integer journalId,
@PathVariable("commentParentId") Long commentParentId,
@SortDefault(sort = "createTime", direction = DESC) Sort sort) {
// Find all children comments
List<JournalComment> postComments = journalCommentService.listChildrenBy(journalId, commentParentId, CommentStatus.PUBLISHED, sort);
// Convert to base comment dto
List<BaseCommentDTO> result = journalCommentService.convertTo(postComments);
return journalCommentService.filterIpAddress(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listChildrenBy
File: src/main/java/run/halo/app/controller/content/api/JournalController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
listChildrenBy
|
src/main/java/run/halo/app/controller/content/api/JournalController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setNativeController(final boolean nativeController) {
if (nativeController != this.nativeController) {
this.nativeController = nativeController;
if (nativeVideo != null) {
Activity activity = getActivity();
if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
if (nativeVideo != null) {
MediaController mc = new AndroidImplementation.CN1MediaController();
nativeVideo.setMediaController(mc);
if (!nativeController) mc.setVisibility(View.GONE);
else mc.setVisibility(View.VISIBLE);
}
}
});
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNativeController
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
|
setNativeController
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NotNull Builder withSshdConfig(@NotNull SshdConfigBuilder sshdConfig) {
this.sshdConfig = sshdConfig;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withSshdConfig
File: src/itest/java/com/hierynomus/sshj/SshdContainer.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
withSshdConfig
|
src/itest/java/com/hierynomus/sshj/SshdContainer.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int categoryChar(char c) {
if ('a' <= c && c <= 'z') return 0;
if ('A' <= c && c <= 'Z') return 1;
if ('0' <= c && c <= '9') return 2;
return 3;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: categoryChar
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
categoryChar
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLineVisibleEnd(int line) {
return getLineVisibleEnd(line, getLineStart(line), getLineStart(line+1));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineVisibleEnd
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineVisibleEnd
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
void addResultLocked(ActivityRecord from, String resultWho,
int requestCode, int resultCode,
Intent resultData) {
ActivityResult r = new ActivityResult(from, resultWho,
requestCode, resultCode, resultData);
if (results == null) {
results = new ArrayList<ResultInfo>();
}
results.add(r);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addResultLocked
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
|
addResultLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getApplications(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException, APIManagementException {
NativeArray myn = new NativeArray(0);
if (args != null && isStringArray(args)) {
String username = args[0].toString();
APIConsumer apiConsumer = getAPIConsumer(thisObj);
Application[] applications;
String groupId="";
if(args.length >1 && args[1] != null){
groupId = args[1].toString();
}
applications = apiConsumer.getLightWeightApplications(new Subscriber(username), groupId);
Subscriber subscriber = new Subscriber(username);
if (applications != null) {
int i = 0;
for (Application application : applications) {
int subscriptionCount = apiConsumer.getSubscriptionCount(subscriber,application.getName(),groupId);
NativeObject row = new NativeObject();
row.put("name", row, application.getName());
row.put("tier", row, application.getTier());
row.put("id", row, application.getId());
row.put("status", row, application.getStatus());
row.put("description", row, application.getDescription());
row.put("apiCount", row, subscriptionCount);
row.put("groupId", row, application.getGroupId());
row.put("isBlacklisted", row, application.getIsBlackListed());
row.put("owner", row, application.getOwner());
row.put("tokenType", row, application.getTokenType());
myn.put(i++, myn, row);
}
}
}
return myn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getApplications
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getApplications
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public PushConnection getPushConnection() {
assert !(ui.getPushConfiguration().getPushMode().isEnabled()
&& pushConnection == null);
return pushConnection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPushConnection
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
|
getPushConnection
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getVisibleText() {
final HtmlSerializerVisibleText ser = new HtmlSerializerVisibleText();
return ser.asText(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVisibleText
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
|
getVisibleText
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendOrSaveInternal(Context context, int requestId,
ReplyFromAccount currReplyFromAccount, ReplyFromAccount originalReplyFromAccount,
Message message, Message refMessage, CharSequence quotedText,
SendOrSaveCallback callback, boolean save, int composeMode, ContentValues extraValues,
Bundle optionalAttachmentFds) {
final ContentValues values = new ContentValues();
final String refMessageId = refMessage != null ? refMessage.uri.toString() : "";
MessageModification.putToAddresses(values, message.getToAddresses());
MessageModification.putCcAddresses(values, message.getCcAddresses());
MessageModification.putBccAddresses(values, message.getBccAddresses());
MessageModification.putCustomFromAddress(values, message.getFrom());
MessageModification.putSubject(values, message.subject);
// bodyHtml already have the composing spans removed.
final String htmlBody = message.bodyHtml;
final String textBody = message.bodyText;
// fullbodyhtml/fullbodytext will contain the actual body plus the quoted text.
String fullBodyHtml = htmlBody;
String fullBodyText = textBody;
String quotedString = null;
final boolean hasQuotedText = !TextUtils.isEmpty(quotedText);
if (hasQuotedText) {
// The quoted text is HTML at this point.
quotedString = quotedText.toString();
fullBodyHtml = htmlBody + quotedString;
fullBodyText = textBody + Utils.convertHtmlToPlainText(quotedString);
MessageModification.putForward(values, composeMode == ComposeActivity.FORWARD);
MessageModification.putAppendRefMessageContent(values, true /* include quoted */);
}
// Only take refMessage into account if either one of its html/text is not empty.
int quotedTextPos = -1;
if (refMessage != null && !(TextUtils.isEmpty(refMessage.bodyHtml) &&
TextUtils.isEmpty(refMessage.bodyText))) {
// The code below might need to be revisited. The quoted text position is different
// between text/html and text/plain parts and they should be stored seperately and
// the right version should be used in the UI. text/html should have preference
// if both exist. Issues like this made me file b/14256940 to make sure that we
// properly handle the existing of both text/html and text/plain parts and to verify
// that we are not making some assumptions that break if there is no text/html part.
if (!TextUtils.isEmpty(refMessage.bodyHtml)) {
MessageModification.putBodyHtml(values, fullBodyHtml);
if (hasQuotedText) {
quotedTextPos = htmlBody.length() +
QuotedTextView.getQuotedTextOffset(quotedString);
}
}
if (!TextUtils.isEmpty(refMessage.bodyText)) {
MessageModification.putBody(values, fullBodyText);
if (hasQuotedText && (quotedTextPos == -1)) {
quotedTextPos = textBody.length();
}
}
if (quotedTextPos != -1) {
// The quoted text pos is the text/html version first and the text/plan version
// if there is no text/html part. The reason for this is because preference
// is given to text/html in the compose window if it exists. In the future, we
// should calculate the index for both since the user could choose to compose
// explicitly in text/plain.
MessageModification.putQuoteStartPos(values, quotedTextPos);
}
} else {
MessageModification.putBodyHtml(values, fullBodyHtml);
MessageModification.putBody(values, fullBodyText);
}
int draftType = getDraftType(composeMode);
MessageModification.putDraftType(values, draftType);
MessageModification.putAttachments(values, message.getAttachments());
if (!TextUtils.isEmpty(refMessageId)) {
MessageModification.putRefMessageId(values, refMessageId);
}
if (extraValues != null) {
values.putAll(extraValues);
}
SendOrSaveMessage sendOrSaveMessage = new SendOrSaveMessage(context, requestId,
values, refMessageId, message.getAttachments(), optionalAttachmentFds, save);
runSendOrSaveProviderCalls(sendOrSaveMessage, callback, currReplyFromAccount,
originalReplyFromAccount);
LogUtils.i(LOG_TAG, "[compose] SendOrSaveMessage [%s] posted (isSave: %s) - " +
"bodyHtml length: %d, bodyText length: %d, quoted text pos: %d, attach count: %d",
requestId, save, message.bodyHtml.length(), message.bodyText.length(),
quotedTextPos, message.getAttachmentCount(true));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendOrSaveInternal
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
sendOrSaveInternal
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String concatPaths(@Nullable String path1, @Nullable String path2) {
path2 = path2 == null ? "" : path2;
if (path1 == null || path1.isEmpty() || EMPTY_REQUEST_PATH.equals(path1)) {
if (path2.isEmpty()) {
return EMPTY_REQUEST_PATH;
}
if (path2.charAt(0) == '/') {
return path2; // Most requests will land here.
}
return '/' + path2;
}
// At this point, we are sure path1 is neither empty nor null.
if (path2.isEmpty()) {
// Only path1 is non-empty. No need to concatenate.
return path1;
}
if (path1.charAt(path1.length() - 1) == '/') {
if (path2.charAt(0) == '/') {
// path1 ends with '/' and path2 starts with '/'.
// Avoid double-slash by stripping the first slash of path2.
return new StringBuilder(path1.length() + path2.length() - 1)
.append(path1).append(path2, 1, path2.length()).toString();
}
// path1 ends with '/' and path2 does not start with '/'.
// Simple concatenation would suffice.
return path1 + path2;
}
if (path2.charAt(0) == '/') {
// path1 does not end with '/' and path2 starts with '/'.
// Simple concatenation would suffice.
return path1 + path2;
}
// path1 does not end with '/' and path2 does not start with '/'.
// Need to insert '/' between path1 and path2.
return path1 + '/' + path2;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: concatPaths
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
concatPaths
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void saveBatch(AsyncResult<SQLConnection> sqlConnection, String table,
List<T> entities, Handler<AsyncResult<ResultSet>> replyHandler) {
try {
JsonArray jsonArray = new JsonArray();
for (Object entity : entities) {
String json = pojo2json(entity);
jsonArray.add(json);
}
saveBatch(sqlConnection, table, jsonArray, DEFAULT_JSONB_FIELD_NAME, replyHandler);
} catch (Exception e) {
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveBatch
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
saveBatch
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal() {
if (nonTestNonPrecreatedUsersExist()) {
return false;
}
return !hasIncompatibleAccountsOnAnyUser();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal
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
|
shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMacSize()
{
return macLength;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMacSize
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
getMacSize
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void saveBatchSingleQuote(TestContext context) {
List<Object> list = Collections.singletonList(singleQuotePojo);
createFoo(context).saveBatch(FOO, list, context.asyncAssertSuccess());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveBatchSingleQuote
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
saveBatchSingleQuote
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onCellularConnectivityChanged(@WifiDataStall.CellularDataStatusCode int status) {
localLog("onCellularConnectivityChanged:" + status);
if (status == WifiDataStall.CELLULAR_DATA_NOT_AVAILABLE) {
stopRestrictingAutoJoinToSubscriptionId();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCellularConnectivityChanged
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onCellularConnectivityChanged
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void showQrForContact() {
int position = contact_context_id;
Contact contact = (Contact) contacts.get(position);
showQrCode("xmpp:"+contact.getJid().asBareJid().toEscapedString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showQrForContact
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
showQrForContact
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(Manifest.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS)
public void removeOnPermissionsChangeListener(
@NonNull PackageManager.OnPermissionsChangedListener listener) {
synchronized (mPermissionListeners) {
final IOnPermissionsChangeListener delegate = mPermissionListeners.get(listener);
if (delegate != null) {
try {
mPermissionManager.removeOnPermissionsChangeListener(delegate);
mPermissionListeners.remove(listener);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeOnPermissionsChangeListener
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
removeOnPermissionsChangeListener
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
void setHdmiPlugged(boolean plugged) {
if (mHdmiPlugged != plugged) {
mHdmiPlugged = plugged;
updateRotation(true, true);
Intent intent = new Intent(ACTION_HDMI_PLUGGED);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
intent.putExtra(EXTRA_HDMI_PLUGGED_STATE, plugged);
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHdmiPlugged
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
|
setHdmiPlugged
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends Output<E>, E extends Exception> void append(A a, short s) throws E {
a.append(s);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
File: api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
Repository: jstachio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-33962
|
MEDIUM
| 6.1
|
jstachio
|
append
|
api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
|
7b2f78377d1284df14c580be762a25af5f8dcd66
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateUser(User user) {
// todo 提取重复代码
if (StringUtils.isNotBlank(user.getEmail())) {
UserExample example = new UserExample();
UserExample.Criteria criteria = example.createCriteria();
criteria.andEmailEqualTo(user.getEmail());
criteria.andIdNotEqualTo(user.getId());
if (userMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("user_email_already_exists"));
}
}
user.setPassword(null);
user.setUpdateTime(System.currentTimeMillis());
// 变更前
User userFromDB = userMapper.selectByPrimaryKey(user.getId());
// last workspace id 变了
if (user.getLastWorkspaceId() != null && !StringUtils.equals(user.getLastWorkspaceId(), userFromDB.getLastWorkspaceId())) {
List<Project> projects = getProjectListByWsAndUserId(user.getId(), user.getLastWorkspaceId());
if (projects.size() > 0) {
// 如果传入的 last_project_id 是 last_workspace_id 下面的
boolean present = projects.stream().anyMatch(p -> StringUtils.equals(p.getId(), user.getLastProjectId()));
if (!present) {
user.setLastProjectId(projects.get(0).getId());
}
} else {
user.setLastProjectId(StringUtils.EMPTY);
}
}
// 执行变更
userMapper.updateByPrimaryKeySelective(user);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateUser
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
updateUser
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDescription() {
return Messages.HudsonPrivateSecurityRealm_ManageUserLinks_Description();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getDescription
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMessage() {
return message.getExpressionString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
private Pair<AuthorityInfo, SyncStatusInfo> createCopyPairOfAuthorityWithSyncStatusLocked(
AuthorityInfo authorityInfo) {
SyncStatusInfo syncStatusInfo = getOrCreateSyncStatusLocked(authorityInfo.ident);
return Pair.create(new AuthorityInfo(authorityInfo), new SyncStatusInfo(syncStatusInfo));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCopyPairOfAuthorityWithSyncStatusLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
createCopyPairOfAuthorityWithSyncStatusLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setResourceShortcuts(Map<String, String> resourceShortcuts) {
this.resourceShortcuts = resourceShortcuts;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceShortcuts
File: api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java
Repository: openmrs/openmrs-module-uiframework
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-24621
|
MEDIUM
| 6.5
|
openmrs/openmrs-module-uiframework
|
setResourceShortcuts
|
api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java
|
0422fa52c7eba3d96cce2936cb92897dca4b680a
| 0
|
Analyze the following code function for security vulnerabilities
|
void columnResize(ColumnResizeEvent event);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: columnResize
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
|
columnResize
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private Domain request2Domain(HttpRequest request) {
String name = WebEncodeHelper.htmlStringToJavaString(request.getParameter(DOMAIN_NAME_PARAM));
String desc = WebEncodeHelper.htmlStringToJavaString(request.getParameter(
DOMAIN_DESCRIPTION_PARAM));
String driver = WebEncodeHelper.htmlStringToJavaString(request.getParameter("domainDriver"));
String properties = WebEncodeHelper.htmlStringToJavaString(request.getParameter("domainProperties"));
String authent = WebEncodeHelper.htmlStringToJavaString(request.getParameter("domainAuthentication"));
String url = WebEncodeHelper.htmlStringToJavaString(request.getParameter(
SILVERPEAS_SERVER_URL_PARAM));
Domain domain = new Domain();
domain.setName(name);
domain.setDescription(desc);
domain.setDriverClassName(driver);
domain.setPropFileName(properties);
domain.setAuthenticationServer(authent);
domain.setSilverpeasServerURL(url);
return domain;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: request2Domain
File: core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
request2Domain
|
core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, Object> keysToString(Map<Object, Object> map) {
Map<String, Object> out = new HashMap<>();
for (Map.Entry<Object, Object> entry : map.entrySet()) {
if (entry.getKey() instanceof String) {
out.put((String) entry.getKey(), entry.getValue());
} else if (entry.getKey() != null) {
out.put(entry.getKey().toString(), entry.getValue());
} else {
out.put("null", entry.getValue());
}
}
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keysToString
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
keysToString
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canEmbedActivity(@NonNull TaskFragment taskFragment,
@NonNull ActivityRecord starting, boolean newTask, Task targetTask) {
final Task hostTask = taskFragment.getTask();
// Not allowed embedding a separate task or without host task.
if (hostTask == null || newTask || targetTask != hostTask) {
return false;
}
return taskFragment.isAllowedToEmbedActivity(starting);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canEmbedActivity
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
canEmbedActivity
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
private void triggerPolicyComplianceCheckIfNeeded(int profileUserId, boolean suspended) {
synchronized (getLockObject()) {
final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(profileUserId);
if (profileOwner == null) {
Slogf.wtf(LOG_TAG, "Profile owner not found for compliance check");
return;
}
if (suspended) {
// If suspended, DPC will need to show an activity.
final Intent intent = new Intent(ACTION_CHECK_POLICY_COMPLIANCE);
intent.setPackage(profileOwner.info.getPackageName());
mContext.startActivityAsUser(intent, UserHandle.of(profileUserId));
} else if (profileOwner.mProfileOffDeadline > 0) {
// If not suspended, but deadline set, DPC needs to acknowledge compliance so that
// the deadline can be reset.
sendAdminCommandLocked(profileOwner, ACTION_COMPLIANCE_ACKNOWLEDGEMENT_REQUIRED,
/* adminExtras= */ null, /* receiver= */ null, /* inForeground = */ true);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggerPolicyComplianceCheckIfNeeded
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
|
triggerPolicyComplianceCheckIfNeeded
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private MultipartFile multipartFile(MultipartHttpServletRequest request) {
MultipartFile multipartFile = request.getFile(REGULAR_MULTIPART_FILENAME);
if (multipartFile == null) {
multipartFile = request.getFile(ZIP_MULTIPART_FILENAME);
}
return multipartFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: multipartFile
File: server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-43289
|
MEDIUM
| 5
|
gocd
|
multipartFile
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native int nativeGetResourceArray(long ptr, @ArrayRes int resId,
@NonNull int[] outValues);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetResourceArray
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
|
nativeGetResourceArray
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentStats getCurrentMonthPageStats(String action)
{
Scope scope = ScopeFactory.createPageScope(this.getFullName());
Range range = RangeFactory.ALL;
Period period = PeriodFactory.getCurrentMonth();
XWikiStatsService statisticsService = getXWikiContext().getWiki().getStatsService(getXWikiContext());
List<DocumentStats> stats = statisticsService.getDocumentStatistics(action, scope, period, range, this.context);
if (stats.size() > 0) {
return stats.get(0);
}
return new DocumentStats();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentMonthPageStats
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
|
getCurrentMonthPageStats
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, ?> toQueryParameters(Object... properties)
{
return toQueryParameters(null, null, properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toQueryParameters
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
|
toQueryParameters
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
private Asn1OpaqueObject getSingleValue(String attrOid) throws Pkcs7DecodingException {
List<Asn1OpaqueObject> values = mAttrs.get(attrOid);
if ((values == null) || (values.isEmpty())) {
return null;
}
if (values.size() > 1) {
throw new Pkcs7DecodingException("Attribute " + attrOid + " has multiple values");
}
return values.get(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSingleValue
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getSingleValue
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<ServiceInstance> getServiceInstances(long startTimestamp, long endTimestamp,
String serviceId) throws IOException {
final long minuteTimeBucket = TimeBucket.getMinuteTimeBucket(startTimestamp);
StringBuilder sql = new StringBuilder();
List<Object> condition = new ArrayList<>(5);
sql.append("select * from ").append(InstanceTraffic.INDEX_NAME).append(" where ");
sql.append(InstanceTraffic.LAST_PING_TIME_BUCKET).append(" >= ?");
condition.add(minuteTimeBucket);
sql.append(" and ").append(InstanceTraffic.SERVICE_ID).append("=?");
condition.add(serviceId);
List<ServiceInstance> serviceInstances = new ArrayList<>();
try (Connection connection = h2Client.getConnection()) {
try (ResultSet resultSet = h2Client.executeQuery(
connection, sql.toString(), condition.toArray(new Object[0]))) {
while (resultSet.next()) {
ServiceInstance serviceInstance = new ServiceInstance();
serviceInstance.setId(resultSet.getString(H2TableInstaller.ID_COLUMN));
serviceInstance.setName(resultSet.getString(InstanceTraffic.NAME));
serviceInstance.setInstanceUUID(serviceInstance.getId());
String propertiesString = resultSet.getString(InstanceTraffic.PROPERTIES);
if (!Strings.isNullOrEmpty(propertiesString)) {
JsonObject properties = GSON.fromJson(propertiesString, JsonObject.class);
for (Map.Entry<String, JsonElement> property : properties.entrySet()) {
String key = property.getKey();
String value = property.getValue().getAsString();
if (key.equals(InstanceTraffic.PropertyUtil.LANGUAGE)) {
serviceInstance.setLanguage(LanguageTrans.INSTANCE.value(value));
} else {
serviceInstance.getAttributes().add(new Attribute(key, value));
}
}
} else {
serviceInstance.setLanguage(Language.UNKNOWN);
}
serviceInstances.add(serviceInstance);
}
}
} catch (SQLException e) {
throw new IOException(e);
}
return serviceInstances;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceInstances
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-13921
|
HIGH
| 7.5
|
apache/skywalking
|
getServiceInstances
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
|
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getValueAsString(String defaultValue) throws IOException
{
if (_currToken != JsonToken.VALUE_STRING) {
if (_currToken == null || _currToken == JsonToken.VALUE_NULL || !_currToken.isScalarValue()) {
return defaultValue;
}
}
return getText();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValueAsString
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
getValueAsString
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) {
String host = request.getParameter("host");
// Check special cases where we need to change host to get a favicon
host = "gmail.com".equals(host) ? "google.com" : host;
byte[] bytes = getImage(host, defaultBytes);
if (bytes != null) {
writeBytesToStream(bytes, response);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGet
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
doGet
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
c2ccb38250910587498597955d0bbee8b58e46df
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handle(Object e) {
currentManagedContext.terminate();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handle
File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLAbstractHandler.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2022-2466
|
CRITICAL
| 9.8
|
quarkusio/quarkus
|
handle
|
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLAbstractHandler.java
|
08e5c3106ce4bfb18b24a38514eeba6464668b07
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeI32(int i32) throws TException {
buffer[0] = (byte) (0xff & (i32 >> 24));
buffer[1] = (byte) (0xff & (i32 >> 16));
buffer[2] = (byte) (0xff & (i32 >> 8));
buffer[3] = (byte) (0xff & (i32));
trans_.write(buffer, 0, 4);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeI32
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeI32
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
static ClickHouseNode probe(String host, int port, ClickHouseSslMode mode, String rootCaFile, String certFile,
String keyFile, int timeout) {
if (mode == null) {
return probe(host, port, timeout);
}
Map<ClickHouseOption, Serializable> options = new HashMap<>();
options.put(ClickHouseClientOption.SSL, true);
options.put(ClickHouseClientOption.SSL_MODE, mode);
options.put(ClickHouseClientOption.SSL_ROOT_CERTIFICATE, rootCaFile);
options.put(ClickHouseClientOption.SSL_CERTIFICATE, certFile);
options.put(ClickHouseClientOption.SSL_KEY, keyFile);
ClickHouseConfig config = new ClickHouseConfig(options);
SSLContext sslContext = null;
try {
sslContext = ClickHouseSslContextProvider.getProvider().getSslContext(SSLContext.class, config)
.orElse(null);
} catch (SSLException e) {
log.debug("Failed to create SSL context due to: %s", e.getMessage());
}
if (sslContext == null) {
return probe(host, port, timeout);
}
SSLSocketFactory factory = sslContext.getSocketFactory();
ClickHouseDnsResolver resolver = ClickHouseDnsResolver.getInstance();
ClickHouseProtocol p = ClickHouseProtocol.HTTP;
InetSocketAddress address = resolver != null
? resolver.resolve(ClickHouseProtocol.ANY, host, port)
: new InetSocketAddress(host, port);
try (SSLSocket client = (SSLSocket) factory.createSocket()) {
client.setKeepAlive(false);
client.setSoTimeout(timeout);
client.connect(address, timeout);
client.startHandshake();
try (OutputStream out = client.getOutputStream(); InputStream in = client.getInputStream()) {
out.write("GET /ping HTTP/1.1\r\n\r\n".getBytes(StandardCharsets.US_ASCII));
out.flush();
byte[] buf = new byte[12]; // HTTP/1.x xxx
int read = in.read(buf);
if (read == -1) {
p = ClickHouseProtocol.GRPC;
} else if (buf[0] == 72 && buf[9] == 52) {
p = ClickHouseProtocol.TCP;
}
}
} catch (IOException e) {
// MYSQL does not support SSL
// and PostgreSQL will end up with SocketTimeoutException
log.debug("Failed to probe %s:%d", host, port, e);
}
return new ClickHouseNode(host, p, port, null, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: probe
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
|
probe
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
private @ColorInt int getPrimaryAccentColor(StandardTemplateParams p) {
return getColors(p).getPrimaryAccentColor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPrimaryAccentColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getPrimaryAccentColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
Collection collection = (Collection) createCollection(context.getRequiredType());
populateCollection(reader, context, collection);
return collection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: xstream/src/java/com/thoughtworks/xstream/converters/collections/CollectionConverter.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
unmarshal
|
xstream/src/java/com/thoughtworks/xstream/converters/collections/CollectionConverter.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void sendText(String destAddr, String scAddr, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent, Uri messageUri,
String callingPkg, boolean persistMessage);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendText
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3883
|
MEDIUM
| 4.3
|
android
|
sendText
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
b2c89e6f8962dc7aff88cb38aa3ee67d751edda9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initialize() {
initializeNative();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
initialize
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void newRequest(ChannelHandlerContext ctx, HttpRequest nettyRequest) throws Exception {
if (!nettyRequest.decoderResult().isSuccess()) {
LOGGER.debug("Failed to decode HTTP request.", nettyRequest.decoderResult().cause());
sendError(ctx, HttpResponseStatus.BAD_REQUEST);
return;
}
Headers requestHeaders = new NettyHeadersBackedHeaders(nettyRequest.headers());
//Find the content length we will use this as an indicator of a body
Long contentLength = HttpUtil.getContentLength(nettyRequest, -1L);
String transferEncoding = requestHeaders.get(HttpHeaderNames.TRANSFER_ENCODING);
//If there is a content length or transfer encoding that indicates there is a body
boolean hasBody = (contentLength > 0) || (transferEncoding != null);
RequestBody requestBody = hasBody ? new RequestBody(contentLength, nettyRequest, ctx) : null;
Channel channel = ctx.channel();
if (requestBody != null) {
channel.attr(BODY_ACCUMULATOR_KEY).set(requestBody);
}
InetSocketAddress remoteAddress = (InetSocketAddress) channel.remoteAddress();
InetSocketAddress socketAddress = (InetSocketAddress) channel.localAddress();
ConnectionIdleTimeout connectionIdleTimeout = ConnectionIdleTimeout.of(channel);
DefaultRequest request = new DefaultRequest(
clock.instant(),
requestHeaders,
nettyRequest.method(),
nettyRequest.protocolVersion(),
nettyRequest.uri(),
remoteAddress,
socketAddress,
serverRegistry.get(ServerConfig.class),
requestBody,
connectionIdleTimeout,
channel.attr(CLIENT_CERT_KEY).get()
);
HttpHeaders nettyHeaders = new DefaultHttpHeaders(false);
MutableHeaders responseHeaders = new NettyHeadersBackedMutableHeaders(nettyHeaders);
AtomicBoolean transmitted = new AtomicBoolean(false);
DefaultResponseTransmitter responseTransmitter = new DefaultResponseTransmitter(transmitted, channel, clock, nettyRequest, request, nettyHeaders, requestBody);
ctx.channel().attr(DefaultResponseTransmitter.ATTRIBUTE_KEY).set(responseTransmitter);
Action<Action<Object>> subscribeHandler = thing -> {
transmitted.set(true);
ctx.channel().attr(CHANNEL_SUBSCRIBER_ATTRIBUTE_KEY).set(thing);
};
DefaultContext.RequestConstants requestConstants = new DefaultContext.RequestConstants(
applicationConstants,
request,
channel,
responseTransmitter,
subscribeHandler
);
Response response = new DefaultResponse(responseHeaders, ctx.alloc(), responseTransmitter);
requestConstants.response = response;
DefaultContext.start(channel.eventLoop(), requestConstants, serverRegistry, handlers, execution -> {
if (!transmitted.get()) {
Handler lastHandler = requestConstants.handler;
StringBuilder description = new StringBuilder();
description
.append("No response sent for ")
.append(request.getMethod().getName())
.append(" request to ")
.append(request.getUri());
if (lastHandler != null) {
description.append(" (last handler: ");
if (lastHandler instanceof DescribingHandler) {
((DescribingHandler) lastHandler).describeTo(description);
} else {
DescribingHandlers.describeTo(lastHandler, description);
}
description.append(")");
}
String message = description.toString();
LOGGER.warn(message);
response.getHeaders().clear();
ByteBuf body;
if (development) {
CharBuffer charBuffer = CharBuffer.wrap(message);
body = ByteBufUtil.encodeString(ctx.alloc(), charBuffer, CharsetUtil.UTF_8);
response.contentType(HttpHeaderConstants.PLAIN_TEXT_UTF8);
} else {
body = Unpooled.EMPTY_BUFFER;
}
response.getHeaders().set(HttpHeaderConstants.CONTENT_LENGTH, body.readableBytes());
responseTransmitter.transmit(HttpResponseStatus.INTERNAL_SERVER_ERROR, body);
}
});
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2019-17513
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Enable HTTP header validation
Function: newRequest
File: ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
Repository: ratpack
Fixed Code:
private void newRequest(ChannelHandlerContext ctx, HttpRequest nettyRequest) throws Exception {
if (!nettyRequest.decoderResult().isSuccess()) {
LOGGER.debug("Failed to decode HTTP request.", nettyRequest.decoderResult().cause());
sendError(ctx, HttpResponseStatus.BAD_REQUEST);
return;
}
Headers requestHeaders = new NettyHeadersBackedHeaders(nettyRequest.headers());
//Find the content length we will use this as an indicator of a body
Long contentLength = HttpUtil.getContentLength(nettyRequest, -1L);
String transferEncoding = requestHeaders.get(HttpHeaderNames.TRANSFER_ENCODING);
//If there is a content length or transfer encoding that indicates there is a body
boolean hasBody = (contentLength > 0) || (transferEncoding != null);
RequestBody requestBody = hasBody ? new RequestBody(contentLength, nettyRequest, ctx) : null;
Channel channel = ctx.channel();
if (requestBody != null) {
channel.attr(BODY_ACCUMULATOR_KEY).set(requestBody);
}
InetSocketAddress remoteAddress = (InetSocketAddress) channel.remoteAddress();
InetSocketAddress socketAddress = (InetSocketAddress) channel.localAddress();
ConnectionIdleTimeout connectionIdleTimeout = ConnectionIdleTimeout.of(channel);
DefaultRequest request = new DefaultRequest(
clock.instant(),
requestHeaders,
nettyRequest.method(),
nettyRequest.protocolVersion(),
nettyRequest.uri(),
remoteAddress,
socketAddress,
serverRegistry.get(ServerConfig.class),
requestBody,
connectionIdleTimeout,
channel.attr(CLIENT_CERT_KEY).get()
);
HttpHeaders nettyHeaders = new DefaultHttpHeaders();
MutableHeaders responseHeaders = new NettyHeadersBackedMutableHeaders(nettyHeaders);
AtomicBoolean transmitted = new AtomicBoolean(false);
DefaultResponseTransmitter responseTransmitter = new DefaultResponseTransmitter(transmitted, channel, clock, nettyRequest, request, nettyHeaders, requestBody);
ctx.channel().attr(DefaultResponseTransmitter.ATTRIBUTE_KEY).set(responseTransmitter);
Action<Action<Object>> subscribeHandler = thing -> {
transmitted.set(true);
ctx.channel().attr(CHANNEL_SUBSCRIBER_ATTRIBUTE_KEY).set(thing);
};
DefaultContext.RequestConstants requestConstants = new DefaultContext.RequestConstants(
applicationConstants,
request,
channel,
responseTransmitter,
subscribeHandler
);
Response response = new DefaultResponse(responseHeaders, ctx.alloc(), responseTransmitter);
requestConstants.response = response;
DefaultContext.start(channel.eventLoop(), requestConstants, serverRegistry, handlers, execution -> {
if (!transmitted.get()) {
Handler lastHandler = requestConstants.handler;
StringBuilder description = new StringBuilder();
description
.append("No response sent for ")
.append(request.getMethod().getName())
.append(" request to ")
.append(request.getUri());
if (lastHandler != null) {
description.append(" (last handler: ");
if (lastHandler instanceof DescribingHandler) {
((DescribingHandler) lastHandler).describeTo(description);
} else {
DescribingHandlers.describeTo(lastHandler, description);
}
description.append(")");
}
String message = description.toString();
LOGGER.warn(message);
response.getHeaders().clear();
ByteBuf body;
if (development) {
CharBuffer charBuffer = CharBuffer.wrap(message);
body = ByteBufUtil.encodeString(ctx.alloc(), charBuffer, CharsetUtil.UTF_8);
response.contentType(HttpHeaderConstants.PLAIN_TEXT_UTF8);
} else {
body = Unpooled.EMPTY_BUFFER;
}
response.getHeaders().set(HttpHeaderConstants.CONTENT_LENGTH, body.readableBytes());
responseTransmitter.transmit(HttpResponseStatus.INTERNAL_SERVER_ERROR, body);
}
});
}
|
[
"CWE-74"
] |
CVE-2019-17513
|
MEDIUM
| 5
|
ratpack
|
newRequest
|
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
|
efb910d38a96494256f36675ef0e5061097dd77d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected GridState getState() {
return getState(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
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
|
getState
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCallerSimCallManager() {
PhoneAccountHandle accountHandle = null;
long token = Binder.clearCallingIdentity();
try {
accountHandle = mPhoneAccountRegistrar.getSimCallManager();
} finally {
Binder.restoreCallingIdentity(token);
}
if (accountHandle != null) {
try {
mAppOpsManager.checkPackage(
Binder.getCallingUid(), accountHandle.getComponentName().getPackageName());
return true;
} catch (SecurityException e) {
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerSimCallManager
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
isCallerSimCallManager
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
protected OortComet newOortComet(String cometURL) {
Map<String, Object> options = new HashMap<>(2);
options.put(ClientTransport.SCHEDULER_OPTION, _scheduler);
JSONContext.Client jsonContext = getJSONContextClient();
if (jsonContext != null) {
options.put(ClientTransport.JSON_CONTEXT_OPTION, jsonContext);
}
String maxMessageSizeOption = ClientTransport.MAX_MESSAGE_SIZE_OPTION;
Object option = _bayeux.getOption(maxMessageSizeOption);
if (option != null) {
options.put(maxMessageSizeOption, option);
}
maxMessageSizeOption = WebSocketTransport.PREFIX + "." + maxMessageSizeOption;
option = _bayeux.getOption(maxMessageSizeOption);
if (option != null) {
options.put(maxMessageSizeOption, option);
}
String idleTimeoutOption = WebSocketTransport.PREFIX + "." + WebSocketTransport.IDLE_TIMEOUT_OPTION;
option = _bayeux.getOption(idleTimeoutOption);
if (option != null) {
options.put(idleTimeoutOption, option);
}
String maxNetworkDelayOption = ClientTransport.MAX_NETWORK_DELAY_OPTION;
option = _bayeux.getOption(maxNetworkDelayOption);
if (option != null) {
options.put(maxNetworkDelayOption, option);
}
List<ClientTransport> transports = new ArrayList<>();
for (ClientTransport.Factory factory : getClientTransportFactories()) {
transports.add(factory.newClientTransport(cometURL, options));
}
ClientTransport transport = transports.get(0);
int size = transports.size();
ClientTransport[] otherTransports = transports.subList(1, size).toArray(new ClientTransport[0]);
return newOortComet(cometURL, transport, otherTransports);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newOortComet
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
newOortComet
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getDefaultEmailSignature(String defaultText) {
String template = CONF.emailsDefaultSignatureText(defaultText);
return Utils.formatMessage(template, CONF.appName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultEmailSignature
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
|
getDefaultEmailSignature
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Policy getInstance(URL url) throws PolicyException {
return new InternalPolicy(url, getParseContext(getTopLevelElement(url), url));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
getInstance
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonDeserializer<?> _findCustomArrayDeserializer(ArrayType type,
DeserializationConfig config, BeanDescription beanDesc,
TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer)
throws JsonMappingException
{
for (Deserializers d : _factoryConfig.deserializers()) {
JsonDeserializer<?> deser = d.findArrayDeserializer(type, config,
beanDesc, elementTypeDeserializer, elementDeserializer);
if (deser != null) {
return deser;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _findCustomArrayDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_findCustomArrayDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerHttpResponse setResponseHeader(CharSequence name, Iterable<CharSequence> values) {
response.headers().set(name, values);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResponseHeader
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
setResponseHeader
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int createAPIEndpointsPerType(JSONObject environments, API api, String version, NativeArray myn,
int envCount, String type) {
for (Object prodKeys : environments.keySet()) {
JSONObject environmentObject = (JSONObject) environments.get(prodKeys);
NativeObject appObj = new NativeObject();
appObj.put("environmentName", appObj, prodKeys);
appObj.put("environmentType", appObj, type);
NativeArray envs = new NativeArray(0);
int index = 0;
for (Object envURL : environmentObject.entrySet()) {
envs.put(index, envs, envURL + api.getContext());
if (api.isDefaultVersion()) {
String apiContext = api.getContext();
apiContext = apiContext.replace(version + "/", "");
envs.put(++index, envs, envURL + apiContext);
}
index++;
appObj.put("environmentURLs", appObj, envs);
myn.put(envCount, myn, appObj);
}
}
envCount++;
return envCount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAPIEndpointsPerType
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
createAPIEndpointsPerType
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendSetVideoProvider(String id) throws Exception {
for (IConnectionServiceAdapter a : mConnectionServiceAdapters) {
a.setVideoProvider(id, mConnectionById.get(id).videoProvider, null /*Session.Info*/);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSetVideoProvider
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
sendSetVideoProvider
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public WearableExtender setContentAction(int actionIndex) {
mContentActionIndex = actionIndex;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentAction
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setContentAction
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private final String _decodeShortName(int len) throws IOException
{
// note: caller ensures we have enough bytes available
int outPtr = 0;
char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
if (outBuf.length < len) { // one minor complication
outBuf = _textBuffer.expandCurrentSegment(len);
}
int inPtr = _inputPtr;
_inputPtr += len;
final int[] codes = UTF8_UNIT_CODES;
final byte[] inBuf = _inputBuffer;
// First a tight loop for Ascii
final int end = inPtr + len;
while (true) {
int i = inBuf[inPtr] & 0xFF;
int code = codes[i];
if (code != 0) {
break;
}
outBuf[outPtr++] = (char) i;
if (++inPtr == end) {
return _textBuffer.setCurrentAndReturn(outPtr);
}
}
// But in case there's multi-byte char, use a full loop
while (inPtr < end) {
int i = inBuf[inPtr++] & 0xFF;
int code = codes[i];
if (code != 0) {
// trickiest one, need surrogate handling
switch (code) {
case 1:
i = ((i & 0x1F) << 6) | (inBuf[inPtr++] & 0x3F);
break;
case 2:
i = ((i & 0x0F) << 12)
| ((inBuf[inPtr++] & 0x3F) << 6)
| (inBuf[inPtr++] & 0x3F);
break;
case 3:
i = ((i & 0x07) << 18)
| ((inBuf[inPtr++] & 0x3F) << 12)
| ((inBuf[inPtr++] & 0x3F) << 6)
| (inBuf[inPtr++] & 0x3F);
// note: this is the codepoint value; need to split, too
i -= 0x10000;
outBuf[outPtr++] = (char) (0xD800 | (i >> 10));
i = 0xDC00 | (i & 0x3FF);
break;
default: // invalid
_reportError("Invalid byte "+Integer.toHexString(i)+" in Object name");
}
}
outBuf[outPtr++] = (char) i;
}
return _textBuffer.setCurrentAndReturn(outPtr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _decodeShortName
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_decodeShortName
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isKeyguard(String clientPackage) {
return mKeyguardPackage.equals(clientPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isKeyguard
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isKeyguard
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onGuildVoiceLeave(@Nonnull GuildVoiceLeaveEvent event) {
if (ArrayUtil.voiceJoined.containsKey(event.getMember().getUser())) {
int min = TimeUtil.getTimeinMin(TimeUtil.getTimeinSec(ArrayUtil.voiceJoined.get(event.getMember().getUser())));
int addxp = 0;
for (int i = 1; i <= min; i++) {
addxp += RandomUtils.random.nextInt(5, 11);
}
VoiceUserLevel newUserLevel = Main.getInstance().getSqlConnector().getSqlWorker().getVoiceLevelData(event.getGuild().getId(), event.getMember().getId());
VoiceUserLevel oldUserLevel = (VoiceUserLevel) SQLUtil.cloneEntity(VoiceUserLevel.class, newUserLevel);
newUserLevel.setUser(event.getMember().getUser());
newUserLevel.addExperience(addxp);
Main.getInstance().getSqlConnector().getSqlWorker().addVoiceLevelData(event.getGuild().getId(), oldUserLevel, newUserLevel);
AutoRoleHandler.handleVoiceLevelReward(event.getGuild(), event.getMember());
}
if (ArrayUtil.isTemporalVoicechannel(event.getChannelLeft())
&& event.getChannelLeft().getMembers().isEmpty()) {
event.getChannelLeft().delete().queue();
ArrayUtil.temporalVoicechannel.remove(event.getChannelLeft().getId());
}
super.onGuildVoiceLeave(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onGuildVoiceLeave
File: src/main/java/de/presti/ree6/events/OtherEvents.java
Repository: Ree6-Applications/Ree6
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
onGuildVoiceLeave
|
src/main/java/de/presti/ree6/events/OtherEvents.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getIdleConnectionInPoolTimeoutInMs() {
return idleConnectionInPoolTimeoutInMs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIdleConnectionInPoolTimeoutInMs
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
|
getIdleConnectionInPoolTimeoutInMs
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDeviceIdForPhone(int phoneId) {
Phone phone = getPhone(phoneId);
if (phone != null) {
return phone.getDeviceId();
} else {
Rlog.e(TAG,"getDeviceIdForPhone phone " + phoneId + " is null");
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2016-0831
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Check permissions on getDeviceId.
bug:25778215
Change-Id: Ie27d69e558a8132f6e0c5058aaad1a4ae02bf82f
Function: getDeviceIdForPhone
File: src/java/com/android/internal/telephony/PhoneSubInfoController.java
Repository: android
Fixed Code:
public String getDeviceIdForPhone(int phoneId) {
Phone phone = getPhone(phoneId);
if (phone != null) {
phone.getContext().enforceCallingOrSelfPermission(
android.Manifest.permission.READ_PHONE_STATE,
"Requires READ_PHONE_STATE");
return phone.getDeviceId();
} else {
Rlog.e(TAG,"getDeviceIdForPhone phone " + phoneId + " is null");
return null;
}
}
|
[
"CWE-200"
] |
CVE-2016-0831
|
MEDIUM
| 4.3
|
android
|
getDeviceIdForPhone
|
src/java/com/android/internal/telephony/PhoneSubInfoController.java
|
79eecef63f3ea99688333c19e22813f54d4a31b1
| 1
|
Analyze the following code function for security vulnerabilities
|
public String addTooltipJS()
{
return this.xwiki.addTooltipJS(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTooltipJS
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
addTooltipJS
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int createStackOnDisplay(int displayId) throws RemoteException {
enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "createStackOnDisplay()");
synchronized (this) {
final ActivityDisplay display =
mStackSupervisor.getActivityDisplayOrCreateLocked(displayId);
if (display == null) {
return INVALID_STACK_ID;
}
// TODO(multi-display): Have the caller pass in the windowing mode and activity type.
final ActivityStack stack = display.createStack(
WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY, ACTIVITY_TYPE_STANDARD,
ON_TOP);
return (stack != null) ? stack.mStackId : INVALID_STACK_ID;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createStackOnDisplay
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
|
createStackOnDisplay
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String trim(String s) {
return s == null ? null : s.trim();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trim
File: api/src/main/java/org/openmrs/module/htmlformentryui/HtmlFormUtil.java
Repository: openmrs/openmrs-module-htmlformentryui
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-4284
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-htmlformentryui
|
trim
|
api/src/main/java/org/openmrs/module/htmlformentryui/HtmlFormUtil.java
|
811990972ea07649ae33c4b56c61c3b520895f07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void unlockScreen(){
((CodenameOneActivity)getContext()).unlockScreen();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unlockScreen
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
|
unlockScreen
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isTest() {
return "junit-test".equals(SYSTEM_PROP.getProperty("env"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTest
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
|
isTest
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean killProcessesBelowAdj(int belowAdj, String reason) {
if (Binder.getCallingUid() != SYSTEM_UID) {
throw new SecurityException("killProcessesBelowAdj() only available to system");
}
boolean killed = false;
synchronized (mPidsSelfLocked) {
final int size = mPidsSelfLocked.size();
for (int i = 0; i < size; i++) {
final int pid = mPidsSelfLocked.keyAt(i);
final ProcessRecord proc = mPidsSelfLocked.valueAt(i);
if (proc == null) continue;
final int adj = proc.setAdj;
if (adj > belowAdj && !proc.killedByAm) {
proc.kill(reason, true);
killed = true;
}
}
}
return killed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killProcessesBelowAdj
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
|
killProcessesBelowAdj
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test(description = "Test pulling a package from central", dependsOnMethods = "testPush")
public void testPull() {
String baloFileName = moduleName + "-"
+ ProgramFileConstants.IMPLEMENTATION_VERSION + "-"
+ ProgramFileConstants.ANY_PLATFORM + "-"
+ "0.1.0"
+ BLANG_COMPILED_PKG_BINARY_EXT;
Path baloPath = Paths.get(ProjectDirConstants.BALO_CACHE_DIR_NAME,
orgName, moduleName, "0.1.0");
given().with().pollInterval(Duration.TEN_SECONDS).and()
.with().pollDelay(Duration.FIVE_SECONDS)
.await().atMost(90, SECONDS).until(() -> {
String[] clientArgs = {orgName + "/" + moduleName + ":0.1.0"};
balClient.runMain("pull", clientArgs, envVariables, new String[]{},
new LogLeecher[]{}, balServer.getServerHome());
totalPullCount += 1;
return Files.exists(tempHomeDirectory.resolve(baloPath).resolve(baloFileName));
});
Assert.assertTrue(Files.exists(tempHomeDirectory.resolve(baloPath).resolve(baloFileName)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testPull
File: tests/jballerina-integration-test/src/test/java/org/ballerinalang/test/packaging/PackagingTestCase.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
testPull
|
tests/jballerina-integration-test/src/test/java/org/ballerinalang/test/packaging/PackagingTestCase.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("user:edit")
@GetMapping("/edit")
public String edit(Integer id, Model model) {
model.addAttribute("user", userService.selectByIdNoCatch(id));
return "admin/user/edit";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: edit
File: src/main/java/co/yiiu/pybbs/controller/admin/UserAdminController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
edit
|
src/main/java/co/yiiu/pybbs/controller/admin/UserAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] checkUriPermissions(@NonNull List<Uri> uris, int pid, int uid,
final int modeFlags, int userId, IBinder callerToken) {
final int size = uris.size();
int[] res = new int[size];
// Default value DENIED.
Arrays.fill(res, PackageManager.PERMISSION_DENIED);
for (int i = 0; i < size; i++) {
final Uri uri = uris.get(i);
final int userIdFromUri = ContentProvider.getUserIdFromUri(uri, userId);
res[i] = checkUriPermission(ContentProvider.getUriWithoutUserId(uri), pid, uid,
modeFlags, userIdFromUri, callerToken);
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkUriPermissions
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
|
checkUriPermissions
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public TSet readSetBegin() throws TException {
return new TSet(readListBegin());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readSetBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readSetBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.