instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getAllQueryParams(String name) {
return context.queryParam(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllQueryParams
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
|
getAllQueryParams
|
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
|
String settingsSecureGetStringForUser(String name, int userHandle) {
return Settings.Secure.getStringForUser(mContext.getContentResolver(), name,
userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: settingsSecureGetStringForUser
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
|
settingsSecureGetStringForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
@Deprecated
public
static HashCode hash(File file, HashFunction hashFunction) throws IOException {
return asByteSource(file).hash(hashFunction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hash
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
hash
|
android/guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean hasAndroidMarket(Context activity) {
final PackageManager packageManager = activity.getPackageManager();
List<PackageInfo> packages = packageManager.getInstalledPackages(PackageManager.GET_UNINSTALLED_PACKAGES);
for (PackageInfo packageInfo : packages) {
if (packageInfo.packageName.equals(GooglePlayStorePackageNameOld) ||
packageInfo.packageName.equals(GooglePlayStorePackageNameNew)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAndroidMarket
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
|
hasAndroidMarket
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public DisplayClientState getCachedDisplayClientState() {
return mDisplayClientState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCachedDisplayClientState
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getCachedDisplayClientState
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canLaunchAssistActivity(String packageName) {
final ComponentName assistComponent =
mAtmService.mActiveVoiceInteractionServiceComponent;
if (assistComponent != null) {
return assistComponent.getPackageName().equals(packageName);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canLaunchAssistActivity
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
|
canLaunchAssistActivity
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isReadyForDisplay() {
if (mToken.waitingToShow && getDisplayContent().mAppTransition.isTransitionSet()) {
return false;
}
final boolean parentAndClientVisible = !isParentWindowHidden()
&& mViewVisibility == View.VISIBLE && mToken.isVisible();
return mHasSurface && isVisibleByPolicy() && !mDestroying
&& (parentAndClientVisible || isAnimating(TRANSITION | PARENTS));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReadyForDisplay
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
isReadyForDisplay
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Long getLongValue(String key) {
String value = fields.get(key);
if (value == null) { return null; }
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLongValue
File: src/main/java/org/olat/restapi/support/MultipartReader.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getLongValue
|
src/main/java/org/olat/restapi/support/MultipartReader.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isDebuggable() {
return mIsDebuggable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDebuggable
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
|
isDebuggable
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isPackageFrozen(String packageName) {
synchronized (mPackages) {
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps != null) {
return ps.frozen;
}
}
Slog.w(TAG, "Package " + packageName + " is missing; assuming frozen");
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageFrozen
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
isPackageFrozen
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private ModelAndView cancel(HttpServletRequest request, HttpServletResponse response) throws Exception {
HttpSession session = request.getSession(false);
if (session != null) {
session.removeAttribute("group.modifyGroup.jsp");
session.removeAttribute("allCategories.modifyGroup.jsp");
session.removeAttribute("allUsers.modifyGroup.jsp");
}
return listGroups(request, response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352",
"CWE-79"
] |
CVE-2021-25929
|
LOW
| 3.5
|
OpenNMS/opennms
|
cancel
|
opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
|
eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<VFSItem> getItems() {
return getItems(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItems
File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getItems
|
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
|
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String queryTableDictTextByKey(@Param("table") String table,@Param("text") String text,@Param("code") String code,@Param("key") String key);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryTableDictTextByKey
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45207
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
queryTableDictTextByKey
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
|
8632a835c23f558dfee3584d7658cc6a13ccec6f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PersistableBundle[] newArray(int size) {
return new PersistableBundle[size];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newArray
File: core/java/android/os/PersistableBundle.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40074
|
MEDIUM
| 5.5
|
android
|
newArray
|
core/java/android/os/PersistableBundle.java
|
40e4ea759743737958dde018f3606d778f7a53f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsxFunction
public DocumentFragment transformToFragment(final Node source, final Object output) {
final SgmlPage page = (SgmlPage) ((Document) output).getDomNodeOrDie();
final DomDocumentFragment fragment = page.createDocumentFragment();
final DocumentFragment rv = new DocumentFragment();
rv.setPrototype(getPrototype(rv.getClass()));
rv.setParentScope(getParentScope());
rv.setDomNode(fragment);
transform(source, fragment);
return rv;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transformToFragment
File: src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2023-26119
|
CRITICAL
| 9.8
|
HtmlUnit/htmlunit
|
transformToFragment
|
src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XSLTProcessor.java
|
641325bbc84702dc9800ec7037aec061ce21956b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long nextLongValue(long defaultValue) throws IOException
{
if (nextToken() == JsonToken.VALUE_NUMBER_INT) {
return getLongValue();
}
return defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextLongValue
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
|
nextLongValue
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String setBaseUrl(HttpServletRequest request, boolean staticBlog, Map webSite) {
String templateUrl;
String baseUrl = WebTools.getHomeUrl(request);
String templatePath = request.getAttribute("template").toString();
if (staticBlog) {
baseUrl = request.getContextPath() + "/";
templateUrl = request.getContextPath() + templatePath;
} else {
if (isCdnResourceAble(webSite, templatePath)) {
templateUrl = "//" + webSite.get("staticResourceHost").toString() + request.getAttribute("template");
request.setAttribute("staticResourceBaseUrl", "//" + webSite.get("staticResourceHost").toString() + request.getContextPath() + "/");
} else {
templateUrl = request.getContextPath() + request.getAttribute("template");
baseUrl = WebTools.getHomeUrl(request);
}
}
request.setAttribute("url", templateUrl);
request.setAttribute("templateUrl", templateUrl);
request.setAttribute("rurl", baseUrl);
request.setAttribute("baseUrl", baseUrl);
request.setAttribute("host", request.getHeader("host"));
request.setAttribute("searchUrl", baseUrl + Constants.getArticleUri() + "search");
return baseUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBaseUrl
File: web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
setBaseUrl
|
web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <T> List<T> getAttachmentList(AttachmentKey<? extends List<T>> key) {
if (key == null) {
throw UndertowMessages.MESSAGES.argumentCannotBeNull("key");
}
Object o = attachments.get(key);
if (o == null) {
return Collections.emptyList();
}
return (List) o;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentList
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getAttachmentList
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getInternalIdForColumn(Column<T, ?> column) {
return column.getInternalId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInternalIdForColumn
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
|
getInternalIdForColumn
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> T[] parseList(String value, Class<T> asClass, Function<Object, T> convert) {
List parsed = JsonUtil.parse(value, null, List.class);
T[] converted = (T[])Array.newInstance(asClass, parsed.size());
for (int i = 0; i < parsed.size(); i++)
converted[i] = convert.apply(parsed.get(i));
return converted;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseList
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
parseList
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
void sendAdminCommandLocked(ActiveAdmin admin, String action) {
sendAdminCommandLocked(admin, action, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendAdminCommandLocked
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
|
sendAdminCommandLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setViolationOccurred(boolean violationOccurred) {
this.violationOccurred = violationOccurred;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setViolationOccurred
File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
Repository: dropwizard
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-11002
|
HIGH
| 9
|
dropwizard
|
setViolationOccurred
|
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
|
d5a512f7abf965275f2a6b913ac4fe778e424242
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long arraySize(List<?> values)
throws UnsupportedEncodingException
{
long acc = 0;
for (Object value : values) {
acc += fieldValueSize(value);
}
return acc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: arraySize
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
arraySize
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalCreateSubscription(AsyncResponse asyncResponse, String subscriptionName,
MessageIdImpl messageId, boolean authoritative, boolean replicated) {
if (topicName.isGlobal()) {
try {
validateGlobalNamespaceOwnership(namespaceName);
} catch (Exception e) {
log.error("[{}] Failed to create subscription {} on topic {}",
clientAppId(), subscriptionName, topicName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
}
final MessageIdImpl targetMessageId = messageId == null ? (MessageIdImpl) MessageId.latest : messageId;
log.info("[{}][{}] Creating subscription {} at message id {}", clientAppId(), topicName, subscriptionName,
targetMessageId);
// If the topic name is a partition name, no need to get partition topic metadata again
if (topicName.isPartitioned()) {
internalCreateSubscriptionForNonPartitionedTopic(asyncResponse,
subscriptionName, targetMessageId, authoritative, replicated);
} else {
boolean allowAutoTopicCreation = pulsar().getConfiguration().isAllowAutoTopicCreation();
getPartitionedTopicMetadataAsync(topicName,
authoritative, allowAutoTopicCreation).thenAccept(partitionMetadata -> {
final int numPartitions = partitionMetadata.partitions;
if (numPartitions > 0) {
final CompletableFuture<Void> future = new CompletableFuture<>();
final AtomicInteger count = new AtomicInteger(numPartitions);
final AtomicInteger failureCount = new AtomicInteger(0);
final AtomicReference<Throwable> partitionException = new AtomicReference<>();
// Create the subscription on each partition
for (int i = 0; i < numPartitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
pulsar().getAdminClient().topics()
.createSubscriptionAsync(topicNamePartition.toString(),
subscriptionName, targetMessageId)
.handle((r, ex) -> {
if (ex != null) {
// fail the operation on unknown exception or
// if all the partitioned failed due to
// subscription-already-exist
if (failureCount.incrementAndGet() == numPartitions
|| !(ex instanceof PulsarAdminException.ConflictException)) {
partitionException.set(ex);
}
}
if (count.decrementAndGet() == 0) {
future.complete(null);
}
return null;
});
} catch (Exception e) {
log.warn("[{}] [{}] Failed to create subscription {} at message id {}", clientAppId(),
topicNamePartition, subscriptionName, targetMessageId, e);
future.completeExceptionally(e);
}
}
future.whenComplete((r, ex) -> {
if (ex != null) {
if (ex instanceof PulsarAdminException) {
asyncResponse.resume(new RestException((PulsarAdminException) ex));
return;
} else {
asyncResponse.resume(new RestException(ex));
return;
}
}
if (partitionException.get() != null) {
log.warn("[{}] [{}] Failed to create subscription {} at message id {}",
clientAppId(), topicName,
subscriptionName, targetMessageId, partitionException.get());
if (partitionException.get() instanceof PulsarAdminException) {
asyncResponse.resume(
new RestException((PulsarAdminException) partitionException.get()));
return;
} else {
asyncResponse.resume(new RestException(partitionException.get()));
return;
}
}
asyncResponse.resume(Response.noContent().build());
});
} else {
internalCreateSubscriptionForNonPartitionedTopic(asyncResponse,
subscriptionName, targetMessageId, authoritative, replicated);
}
}).exceptionally(ex -> {
log.error("[{}] Failed to create subscription {} on topic {}",
clientAppId(), subscriptionName, topicName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalCreateSubscription
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalCreateSubscription
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearRestoreSession(ActiveRestoreSession currentSession) {
synchronized(this) {
if (currentSession != mActiveRestoreSession) {
Slog.e(TAG, "ending non-current restore session");
} else {
if (DEBUG) Slog.v(TAG, "Clearing restore session and halting timeout");
mActiveRestoreSession = null;
mBackupHandler.removeMessages(MSG_RESTORE_TIMEOUT);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearRestoreSession
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
clearRestoreSession
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
final void dumpDbInfo(FileDescriptor fd, PrintWriter pw, String[] args) {
ArrayList<ProcessRecord> procs = collectProcesses(pw, 0, false, args);
if (procs == null) {
pw.println("No process found for: " + args[0]);
return;
}
pw.println("Applications Database Info:");
for (int i = procs.size() - 1 ; i >= 0 ; i--) {
ProcessRecord r = procs.get(i);
if (r.thread != null) {
pw.println("\n** Database info for pid " + r.pid + " [" + r.processName + "] **");
pw.flush();
try {
TransferPipe tp = new TransferPipe();
try {
r.thread.dumpDbInfo(tp.getWriteFd(), args);
tp.go(fd);
} finally {
tp.kill();
}
} catch (IOException e) {
pw.println("Failure while dumping the app: " + r);
pw.flush();
} catch (RemoteException e) {
pw.println("Got a RemoteException while dumping the app " + r);
pw.flush();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDbInfo
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
|
dumpDbInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getTotal() {
return total;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotal
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
getTotal
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean updateConfigurationLocked(Configuration values, ActivityRecord starting,
boolean initLocale, boolean persistent, int userId, boolean deferResume) {
return updateConfigurationLocked(values, starting, initLocale, persistent, userId,
deferResume, null /* result */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConfigurationLocked
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
|
updateConfigurationLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // NotificationData.Environment
public boolean isNotificationForCurrentProfiles(StatusBarNotification n) {
final int thisUserId = mCurrentUserId;
final int notificationUserId = n.getUserId();
if (DEBUG && MULTIUSER_DEBUG) {
Log.v(TAG, String.format("%s: current userid: %d, notification userid: %d",
n, thisUserId, notificationUserId));
}
return isCurrentProfile(notificationUserId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotificationForCurrentProfiles
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
|
isNotificationForCurrentProfiles
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void revokeUriPermission(IApplicationThread caller, Uri uri, final int modeFlags,
int userId) {
enforceNotIsolatedCaller("revokeUriPermission");
synchronized(this) {
final ProcessRecord r = getRecordForAppLocked(caller);
if (r == null) {
throw new SecurityException("Unable to find app for caller "
+ caller
+ " when revoking permission to uri " + uri);
}
if (uri == null) {
Slog.w(TAG, "revokeUriPermission: null uri");
return;
}
if (!Intent.isAccessUriMode(modeFlags)) {
return;
}
final String authority = uri.getAuthority();
final ProviderInfo pi = getProviderInfoLocked(authority, userId);
if (pi == null) {
Slog.w(TAG, "No content provider found for permission revoke: "
+ uri.toSafeString());
return;
}
revokeUriPermissionLocked(r.uid, new GrantUri(userId, uri, false), modeFlags);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revokeUriPermission
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
revokeUriPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
private ConfigurationSource getConfiguration()
{
if (this.configuration == null) {
this.configuration = Utils.getComponent(ConfigurationSource.class);
}
return this.configuration;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguration
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-648"
] |
CVE-2023-29507
|
HIGH
| 7.2
|
xwiki/xwiki-platform
|
getConfiguration
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
905cdd7c421dbf8c565557cdc773ab1aa9028f83
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<DomChangeListener> safeGetDomListeners() {
synchronized (listeners_lock_) {
if (domListeners_ == null) {
return null;
}
if (domListenersList_ == null) {
domListenersList_ = new ArrayList<>(domListeners_);
}
return domListenersList_;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: safeGetDomListeners
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
|
safeGetDomListeners
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
int getSimAccessPermission(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
SharedPreferences pref = getSharedPreferences(SIM_ACCESS_PERMISSION_PREFERENCE_FILE,
Context.MODE_PRIVATE);
if (!pref.contains(device.getAddress())) {
return BluetoothDevice.ACCESS_UNKNOWN;
}
return pref.getBoolean(device.getAddress(), false)
? BluetoothDevice.ACCESS_ALLOWED : BluetoothDevice.ACCESS_REJECTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSimAccessPermission
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getSimAccessPermission
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KeySet getSigningKeySet(String packageName) {
if (packageName == null) {
return null;
}
synchronized(mPackages) {
final PackageParser.Package pkg = mPackages.get(packageName);
if (pkg == null) {
Slog.w(TAG, "KeySet requested for unknown package:" + packageName);
throw new IllegalArgumentException("Unknown package: " + packageName);
}
if (pkg.applicationInfo.uid != Binder.getCallingUid()
&& Process.SYSTEM_UID != Binder.getCallingUid()) {
throw new SecurityException("May not access signing KeySet of other apps.");
}
KeySetManagerService ksms = mSettings.mKeySetManagerService;
return new KeySet(ksms.getSigningKeySetByPackageNameLPr(packageName));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSigningKeySet
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getSigningKeySet
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public ExtensionList getExtensionList(String extensionType) throws ClassNotFoundException {
return getExtensionList(pluginManager.uberClassLoader.loadClass(extensionType));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExtensionList
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getExtensionList
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSubscriptionType() {
return mSubscriptionType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubscriptionType
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getSubscriptionType
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUninstallInQueue(final String packageName) {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(permission.MANAGE_DEVICE_ADMINS));
UserPackage packageUserPair = UserPackage.of(caller.getUserId(), packageName);
synchronized (getLockObject()) {
return mPackagesToRemove.contains(packageUserPair);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUninstallInQueue
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
|
isUninstallInQueue
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIsArtifactsDeleted(boolean artifactsDeleted) {
isArtifactsDeleted = artifactsDeleted;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIsArtifactsDeleted
File: common/src/main/java/com/thoughtworks/go/domain/DirectoryEntries.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-43288
|
LOW
| 3.5
|
gocd
|
setIsArtifactsDeleted
|
common/src/main/java/com/thoughtworks/go/domain/DirectoryEntries.java
|
f5c1d2aa9ab302a97898a6e4b16218e64fe8e9e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dumpHeapFinished(String path) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeapFinished
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
dumpHeapFinished
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final boolean loadMore() throws IOException
{
if (_inputStream != null) {
_currInputProcessed += _inputEnd;
int count = _inputStream.read(_inputBuffer, 0, _inputBuffer.length);
if (count > 0) {
_inputPtr = 0;
_inputEnd = count;
return true;
}
// End of input
_closeInput();
// Should never return 0, so let's fail
if (count == 0) {
throw new IOException("InputStream.read() returned 0 characters when trying to read "+_inputBuffer.length+" bytes");
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2020-28491
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix eager allocation aspect of #186
Function: loadMore
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
Fixed Code:
protected boolean loadMore() throws IOException
{
if (_inputStream != null) {
_currInputProcessed += _inputEnd;
int count = _inputStream.read(_inputBuffer, 0, _inputBuffer.length);
if (count > 0) {
_inputPtr = 0;
_inputEnd = count;
return true;
}
// End of input
_closeInput();
// Should never return 0, so let's fail
if (count == 0) {
throw new IOException("InputStream.read() returned 0 characters when trying to read "+_inputBuffer.length+" bytes");
}
}
return false;
}
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
loadMore
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void handleRevision(XWikiContext context) throws XWikiException
{
String rev = context.getRequest().getParameter("rev");
if (rev != null) {
context.put("rev", rev);
XWikiDocument doc = (XWikiDocument) context.get("doc");
XWikiDocument tdoc = (XWikiDocument) context.get("tdoc");
// if the doc is deleted and we request a specific language, we have to set the locale so we can retrieve
// properly the document revision.
if (rev.startsWith("deleted") && !StringUtils.isEmpty(context.getRequest().getParameter("language"))
&& doc == tdoc) {
Locale locale = LocaleUtils.toLocale(context.getRequest().getParameter("language"), Locale.ROOT);
tdoc = new XWikiDocument(tdoc.getDocumentReference(), locale);
}
XWikiDocument rdoc =
(!doc.getLocale().equals(tdoc.getLocale())) ? doc : context.getWiki().getDocument(doc, rev, context);
XWikiDocument rtdoc =
(doc.getLocale().equals(tdoc.getLocale())) ? rdoc : context.getWiki().getDocument(tdoc, rev, context);
context.put("tdoc", rtdoc);
context.put("cdoc", rdoc);
context.put("doc", rdoc);
}
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2023-29208
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-16285: Error when accessing deleted document
Function: handleRevision
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
protected void handleRevision(XWikiContext context) throws XWikiException
{
String rev = context.getRequest().getParameter("rev");
if (rev != null) {
context.put("rev", rev);
XWikiDocument doc = (XWikiDocument) context.get("doc");
XWikiDocument tdoc = (XWikiDocument) context.get("tdoc");
// if the doc is deleted and we request a specific language, we have to set the locale so we can retrieve
// properly the document revision.
if (rev.startsWith("deleted") && !StringUtils.isEmpty(context.getRequest().getParameter("language"))
&& doc == tdoc) {
Locale locale = LocaleUtils.toLocale(context.getRequest().getParameter("language"), Locale.ROOT);
tdoc = new XWikiDocument(tdoc.getDocumentReference(), locale);
}
DocumentReference documentReference = doc.getDocumentReference();
try {
documentRevisionProvider
.checkAccess(Right.VIEW, getCurrentUserReference(context), documentReference, rev);
} catch (AuthorizationException e) {
Object[] args = { documentReference, rev, context.getUserReference() };
throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED,
"Access to document {0} with revision {1} has been denied to user {2}", e, args);
}
XWikiDocument rdoc;
XWikiDocument rtdoc;
if (doc.getLocale().equals(tdoc.getLocale())) {
rdoc = this.documentRevisionProvider.getRevision(doc.getDocumentReferenceWithLocale(), rev);
rtdoc = rdoc;
} else {
rdoc = doc;
rtdoc = this.documentRevisionProvider.getRevision(tdoc.getDocumentReferenceWithLocale(), rev);
}
context.put("tdoc", rtdoc);
context.put("cdoc", rdoc);
context.put("doc", rdoc);
}
}
|
[
"CWE-668"
] |
CVE-2023-29208
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
handleRevision
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
d9e947559077e947315bf700c5703dfc7dd8a8d7
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setEnforcerConfig(PolicyEnforcerConfig enforcerConfig) {
this.enforcerConfig = enforcerConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEnforcerConfig
File: services/src/main/java/org/keycloak/services/managers/ClientManager.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2019-14837
|
MEDIUM
| 6.4
|
keycloak
|
setEnforcerConfig
|
services/src/main/java/org/keycloak/services/managers/ClientManager.java
|
9a7c1a91a59ab85e7f8889a505be04a71580777f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void render(Graphics2D g) throws SVGException
{
StyleAttribute styleAttrib = new StyleAttribute();
if (getStyle(styleAttrib.setName("visibility")))
{
if (!styleAttrib.getStringValue().equals("visible"))
{
return;
}
}
if (getStyle(styleAttrib.setName("display")))
{
if (styleAttrib.getStringValue().equals("none"))
{
return;
}
}
beginLayer(g);
float opacity = 1f;
if (getStyle(styleAttrib.setName("opacity")))
{
opacity = styleAttrib.getRatioValue();
}
if (opacity <= 0)
{
return;
}
Composite oldComp = null;
if (opacity < 1)
{
oldComp = g.getComposite();
Composite comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity);
g.setComposite(comp);
}
BufferedImage img = diagram.getUniverse().getImage(imageSrc);
if (img == null)
{
return;
}
AffineTransform curXform = g.getTransform();
g.transform(xform);
g.drawImage(img, 0, 0, null);
g.setTransform(curXform);
if (oldComp != null)
{
g.setComposite(oldComp);
}
finishLayer(g);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: render
File: svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
Repository: blackears/svgSalamander
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2017-5617
|
MEDIUM
| 5.8
|
blackears/svgSalamander
|
render
|
svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
|
826555b0a3229b6cf4671fe4de7aa51b5946b63d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(ScheduledExecutorConfig c1, ScheduledExecutorConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.getDurability(), c2.getDurability())
&& nullSafeEqual(c1.getQuorumName(), c2.getQuorumName())
&& isCompatible(c1.getMergePolicyConfig(), c2.getMergePolicyConfig())
&& nullSafeEqual(c1.getPoolSize(), c2.getPoolSize());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
void checkCertUsage(CertPath certPath, X509Certificate userCert,
boolean[] bad) {
// Can act as a signer?
// 1. if KeyUsage, then [0] should be true
// 2. if ExtendedKeyUsage, then should contains ANY or CODE_SIGNING
// 3. if NetscapeCertType, then should contains OBJECT_SIGNING
// 1,2,3 must be true
if (bad != null) {
bad[0] = bad[1] = bad[2] = false;
}
boolean[] keyUsage = userCert.getKeyUsage();
if (keyUsage != null) {
if (keyUsage.length < 1 || !keyUsage[0]) {
if (bad != null) {
bad[0] = true;
} else {
certs.get(certPath).setBadKeyUsage();
}
}
}
try {
List<String> xKeyUsage = userCert.getExtendedKeyUsage();
if (xKeyUsage != null) {
if (!xKeyUsage.contains("2.5.29.37.0") // anyExtendedKeyUsage
&& !xKeyUsage.contains("1.3.6.1.5.5.7.3.3")) { // codeSigning
if (bad != null) {
bad[1] = true;
} else {
certs.get(certPath).setBadExtendedKeyUsage();
}
}
}
} catch (java.security.cert.CertificateParsingException e) {
// shouldn't happen
}
try {
// OID_NETSCAPE_CERT_TYPE
byte[] netscapeEx = userCert
.getExtensionValue("2.16.840.1.113730.1.1");
if (netscapeEx != null) {
DerInputStream in = new DerInputStream(netscapeEx);
byte[] encoded = in.getOctetString();
encoded = new DerValue(encoded).getUnalignedBitString()
.toByteArray();
NetscapeCertTypeExtension extn = new NetscapeCertTypeExtension(
encoded);
Boolean val = (Boolean) extn
.get(NetscapeCertTypeExtension.OBJECT_SIGNING);
if (!val) {
if (bad != null) {
bad[2] = true;
} else {
certs.get(certPath).setBadNetscapeCertType();
}
}
}
} catch (IOException e) {
//
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCertUsage
File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
checkCertUsage
|
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
|
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void enterSafeMode() {
enforceSystemOrRoot("Only the system can request entering safe mode");
if (!mSystemReady) {
mSafeMode = true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enterSafeMode
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
enterSafeMode
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEditorSaveCaption(String saveCaption)
throws IllegalArgumentException {
if (saveCaption == null) {
throw new IllegalArgumentException("Save caption cannot be null");
}
getState().editorSaveCaption = saveCaption;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEditorSaveCaption
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
|
setEditorSaveCaption
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void add(Structure st){
// we use the identifier uri for our mappings.
String inode = st.getInode();
String structureName = st.getName();
String velocityVarName = st.getVelocityVarName();
cache.put(primaryGroup + inode, st, primaryGroup);
cache.put(primaryGroup + structureName, st, primaryGroup);
cache.put(primaryGroup + velocityVarName, st, primaryGroup);
if (UtilMethods.isSet(velocityVarName))
cache.put(primaryGroup + velocityVarName.toLowerCase(), st, primaryGroup);
removeStructuresByType(st.getStructureType());
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-2355
- Severity: HIGH
- CVSS Score: 7.5
Description: fixes #8848
Function: add
File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java
Repository: dotCMS/core
Fixed Code:
public void add(Structure st){
if(st==null || !UtilMethods.isSet(st.getInode())){
return;
}
// we use the identifier uri for our mappings.
String inode = st.getInode();
String structureName = st.getName();
String velocityVarName = st.getVelocityVarName();
cache.put(primaryGroup + inode, st, primaryGroup);
cache.put(primaryGroup + structureName, st, primaryGroup);
cache.put(primaryGroup + velocityVarName, st, primaryGroup);
if (UtilMethods.isSet(velocityVarName))
cache.put(primaryGroup + velocityVarName.toLowerCase(), st, primaryGroup);
removeStructuresByType(st.getStructureType());
}
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
add
|
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 1
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element profileDataInfoElement = document.createElement("ProfileDataInfo");
if (profileURL != null) {
Element profileURLElement = document.createElement("profileURL");
profileURLElement.appendChild(document.createTextNode(profileURL));
profileDataInfoElement.appendChild(profileURLElement);
}
if (profileId != null) {
Element profileIdElement = document.createElement("profileId");
profileIdElement.appendChild(document.createTextNode(profileId));
profileDataInfoElement.appendChild(profileIdElement);
}
if (profileName != null) {
Element profileNameElement = document.createElement("profileName");
profileNameElement.appendChild(document.createTextNode(profileName));
profileDataInfoElement.appendChild(profileNameElement);
}
if (profileDescription != null) {
Element profileDescriptionElement = document.createElement("profileDescription");
profileDescriptionElement.appendChild(document.createTextNode(profileDescription));
profileDataInfoElement.appendChild(profileDescriptionElement);
}
return profileDataInfoElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateVisibilityIgnoringKeyguard(boolean behindOccludedContainer) {
visibleIgnoringKeyguard = (!behindOccludedContainer || mLaunchTaskBehind)
&& showToCurrentUser();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateVisibilityIgnoringKeyguard
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
|
updateVisibilityIgnoringKeyguard
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public NdefMessage ndefRead(int nativeHandle) throws RemoteException {
NfcPermissions.enforceUserPermissions(mContext);
TagEndpoint tag;
// Check if NFC is enabled
if (!isNfcEnabled()) {
return null;
}
/* find the tag in the hmap */
tag = (TagEndpoint) findObject(nativeHandle);
if (tag != null) {
byte[] buf = tag.readNdef();
if (buf == null) {
return null;
}
/* Create an NdefMessage */
try {
return new NdefMessage(buf);
} catch (FormatException e) {
return null;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ndefRead
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
ndefRead
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBuildContext(BuildContext buildContext) {
this.buildContext = buildContext;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBuildContext
File: modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2021-21429
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setBuildContext
|
modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
|
6445ea6511a6ddab64c86ae263937dc90650c98c
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseObject getXObject(DocumentReference classReference)
{
BaseObject result = null;
List<BaseObject> objects = getXObjects().get(classReference);
if (objects != null) {
for (BaseObject object : objects) {
if (object != null) {
result = object;
break;
}
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObject
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
|
getXObject
|
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 final int read(@NonNull byte[] b, int off, int len) throws IOException {
ensureOpen();
Objects.requireNonNull(b, "b");
return nativeAssetRead(mAssetNativePtr, b, off, len);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
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
|
read
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeAutomaticZenRule(String id) throws RemoteException {
Preconditions.checkNotNull(id, "Id is null");
// Verify that they can modify zen rules.
enforcePolicyAccess(Binder.getCallingUid(), "removeAutomaticZenRule");
return mZenModeHelper.removeAutomaticZenRule(id, "removeAutomaticZenRule");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAutomaticZenRule
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
|
removeAutomaticZenRule
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<IssuesPlatform> getUpdatePlatforms(IssuesUpdateRequest updateRequest) {
String id = updateRequest.getId();
IssuesWithBLOBs issuesWithBLOBs = issuesMapper.selectByPrimaryKey(id);
String platform = issuesWithBLOBs.getPlatform();
List<String> platforms = new ArrayList<>();
if (StringUtils.isBlank(platform)) {
platforms.add(IssuesManagePlatform.Local.toString());
} else {
platforms.add(platform);
}
IssuesRequest issuesRequest = new IssuesRequest();
BeanUtils.copyBean(issuesRequest, updateRequest);
return IssueFactory.createPlatforms(platforms, issuesRequest);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUpdatePlatforms
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getUpdatePlatforms
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void setLabelParams() throws Exception {
assertPlotParam("ylabel", "This is good");
assertPlotParam("ylabel", " and so Is this - _ yay");
assertInvalidPlotParam("ylabel", "[33:system(%20");
assertInvalidPlotParam("title", "[33:system(%20");
assertInvalidPlotParam("y2label", "[33:system(%20");
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2023-25826
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Improved fix for #2261.
Regular expressions wouldn't catch the newlines or possibly other
control characters. Now we'll use the TAG validation code to make
sure the inputs are only plain ASCII printables first.
Fixes CVE-2018-12972, CVE-2020-35476
Function: setLabelParams
File: test/tsd/TestGraphHandler.java
Repository: OpenTSDB/opentsdb
Fixed Code:
@Test
public void setLabelParams() throws Exception {
assertPlotParam("ylabel", "This is good");
assertPlotParam("ylabel", " and so Is this - _ yay");
assertInvalidPlotParam("ylabel", "system(%20no%0anewlines");
assertInvalidPlotParam("title", "system(%20no%0anewlines");
assertInvalidPlotParam("y2label", "system(%20no%0anewlines");
}
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
setLabelParams
|
test/tsd/TestGraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 1
|
Analyze the following code function for security vulnerabilities
|
public static long findInstanceLengthForTrial(FileDownloadConnection connection) {
long length = findInstanceLengthFromContentRange(connection);
if (length < 0) {
length = TOTAL_VALUE_IN_CHUNKED_RESOURCE;
FileDownloadLog.w(FileDownloadUtils.class, "don't get instance length from"
+ "Content-Range header");
}
// the response of HEAD method is not very canonical sometimes(it depends on server
// implementation)
// so that it's uncertain the content-length is the same as the response of GET method if
// content-length=0, so we have to filter this case in here.
if (length == 0 && FileDownloadProperties.getImpl().trialConnectionHeadMethod) {
length = TOTAL_VALUE_IN_CHUNKED_RESOURCE;
}
return length;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findInstanceLengthForTrial
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
findInstanceLengthForTrial
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public GeoMap generateGeoMap(String pi) throws PresentationException, DAOException {
try {
if ("-".equals(pi)) {
return null;
}
GeoMap map = new GeoMap();
map.setId(Long.MAX_VALUE);
map.setType(GeoMapType.MANUAL);
map.setShowPopover(true);
map.setMarkerTitleField(null);
map.setMarker("default");
String mainDocQuery = String.format("PI:%s", pi);
List<String> mainDocFields = PrettyUrlTools.getSolrFieldsToDeterminePageType();
SolrDocument mainDoc = DataManager.getInstance().getSearchIndex().getFirstDoc(mainDocQuery, mainDocFields);
PageType pageType = PrettyUrlTools.getPreferredPageType(mainDoc);
boolean addMetadataFeatures = DataManager.getInstance().getConfiguration().includeCoordinateFieldsFromMetadataDocs();
String docTypeFilter = "+DOCTYPE:DOCSTRCT";
if (addMetadataFeatures) {
docTypeFilter = "+(DOCTYPE:DOCSTRCT DOCTYPE:METADATA)";
}
String subDocQuery = String.format("+PI_TOPSTRUCT:%s " + docTypeFilter, pi);
List<String> coordinateFields = DataManager.getInstance().getConfiguration().getGeoMapMarkerFields();
List<String> subDocFields = new ArrayList<>();
subDocFields.add(SolrConstants.LABEL);
subDocFields.add(SolrConstants.PI_TOPSTRUCT);
subDocFields.add(SolrConstants.THUMBPAGENO);
subDocFields.add(SolrConstants.LOGID);
subDocFields.add(SolrConstants.ISWORK);
subDocFields.add(SolrConstants.DOCTYPE);
subDocFields.add("MD_VALUE");
subDocFields.addAll(coordinateFields);
Collection<GeoMapFeature> features = new ArrayList<>();
List<DisplayUserGeneratedContent> annos = DataManager.getInstance()
.getDao()
.getAnnotationsForWork(pi)
.stream()
.filter(a -> PublicationStatus.PUBLISHED.equals(a.getPublicationStatus()))
.filter(a -> StringUtils.isNotBlank(a.getBody()))
.map(a -> new DisplayUserGeneratedContent(a))
.filter(a -> ContentType.GEOLOCATION.equals(a.getType()))
.filter(a -> ContentBean.isAccessible(a, BeanUtils.getRequest()))
.collect(Collectors.toList());
for (DisplayUserGeneratedContent anno : annos) {
if (anno.getAnnotationBody() instanceof TypedResource) {
GeoMapFeature feature = new GeoMapFeature(((TypedResource) anno.getAnnotationBody()).asJson());
features.add(feature);
}
}
SolrDocumentList subDocs = DataManager.getInstance().getSearchIndex().getDocs(subDocQuery, subDocFields);
if (subDocs != null) {
for (SolrDocument solrDocument : subDocs) {
List<GeoMapFeature> docFeatures = new ArrayList<>();
for (String coordinateField : coordinateFields) {
String docType = solrDocument.getFieldValue(SolrConstants.DOCTYPE).toString();
String labelField = "METADATA".equals(docType) ? "MD_VALUE" : SolrConstants.LABEL;
docFeatures.addAll(GeoMap.getGeojsonPoints(solrDocument, coordinateField, labelField, null));
}
if (!solrDocument.containsKey(SolrConstants.ISWORK) && solrDocument.getFieldValue(SolrConstants.DOCTYPE).equals("DOCSTRCT")) {
docFeatures.forEach(f -> f.setLink(PrettyUrlTools.getRecordUrl(solrDocument, pageType)));
} else {
docFeatures.forEach(f -> f.setLink(null));
}
docFeatures.forEach(f -> f.setDocumentId((String) solrDocument.getFieldValue(SolrConstants.LOGID)));
features.addAll(docFeatures);
}
}
//remove dubplicates
features = features.stream().distinct().collect(Collectors.toList());
if (!features.isEmpty()) {
map.setFeatures(features.stream().map(f -> f.getJsonObject().toString()).collect(Collectors.toList()));
}
return map;
} catch (IndexUnreachableException e) {
logger.error("Unable to load geomap", e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateGeoMap
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
generateGeoMap
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public IBinder peekService(Intent service, String resolvedType, String callingPackage)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
service.writeToParcel(data, 0);
data.writeString(resolvedType);
data.writeString(callingPackage);
mRemote.transact(PEEK_SERVICE_TRANSACTION, data, reply, 0);
reply.readException();
IBinder binder = reply.readStrongBinder();
reply.recycle();
data.recycle();
return binder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: peekService
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
peekService
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("schedule")
@RestQuery(name = "schedule", description = "Schedule an event based on the given media package",
restParameters = {
@RestParameter(description = "The media package", isRequired = true, name = "mediaPackage", type = RestParameter.Type.TEXT) },
reponses = {
@RestResponse(description = "Event scheduled", responseCode = HttpServletResponse.SC_CREATED),
@RestResponse(description = "Media package not valid", responseCode = HttpServletResponse.SC_BAD_REQUEST) },
returnDescription = "")
public Response schedule(MultivaluedMap<String, String> formData) {
logger.trace("pass schedule with default workflow definition id {}", defaultWorkflowDefinitionId);
return this.schedule(defaultWorkflowDefinitionId, formData);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: schedule
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
schedule
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean profileControl(String process, int userId, boolean start,
ProfilerInfo profilerInfo, int profileType) throws RemoteException {
try {
synchronized (this) {
// note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
// its own permission.
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
if (start && (profilerInfo == null || profilerInfo.profileFd == null)) {
throw new IllegalArgumentException("null profile info or fd");
}
ProcessRecord proc = null;
if (process != null) {
proc = findProcessLocked(process, userId, "profileControl");
}
if (start && (proc == null || proc.thread == null)) {
throw new IllegalArgumentException("Unknown process: " + process);
}
if (start) {
stopProfilerLocked(null, 0);
setProfileApp(proc.info, proc.processName, profilerInfo);
mProfileProc = proc;
mProfileType = profileType;
ParcelFileDescriptor fd = profilerInfo.profileFd;
try {
fd = fd.dup();
} catch (IOException e) {
fd = null;
}
profilerInfo.profileFd = fd;
proc.thread.profilerControl(start, profilerInfo, profileType);
fd = null;
try {
mProfilerInfo.profileFd.close();
} catch (IOException e) {
}
mProfilerInfo.profileFd = null;
if (proc.pid == MY_PID) {
// When profiling the system server itself, avoid closing the file
// descriptor, as profilerControl will not create a copy.
// Note: it is also not correct to just set profileFd to null, as the
// whole ProfilerInfo instance is passed down!
profilerInfo = null;
}
} else {
stopProfilerLocked(proc, profileType);
if (profilerInfo != null && profilerInfo.profileFd != null) {
try {
profilerInfo.profileFd.close();
} catch (IOException e) {
}
}
}
return true;
}
} catch (RemoteException e) {
throw new IllegalStateException("Process disappeared");
} finally {
if (profilerInfo != null && profilerInfo.profileFd != null) {
try {
profilerInfo.profileFd.close();
} catch (IOException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: profileControl
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
|
profileControl
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private JsonValue readValue(int depth) throws IOException {
if(current==123) {
++depth;
}
/* The following has been refrenced for the resolution of the vulnerability:
https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b
*/
if(depth>MAX_DEPTH) {
throw error("The passed json has exhausted the maximum supported depth of "+MAX_DEPTH+".");
}
switch(current) {
case 'n':
return readNull();
case 't':
return readTrue();
case 'f':
return readFalse();
case '"':
return readString();
case '[':
return readArray(depth);
case '{':
return readObject(depth);
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return readNumber();
default:
throw expected("value");
}
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2023-34620
- Severity: HIGH
- CVSS Score: 7.5
Description: JsonParser too
Function: readValue
File: src/main/org/hjson/JsonParser.java
Repository: hjson/hjson-java
Fixed Code:
private JsonValue readValue(int depth) throws IOException {
/* The following has been refrenced for the resolution of the vulnerability:
https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b
*/
if(depth>MAX_DEPTH) {
throw error("The passed json has exhausted the maximum supported depth of "+MAX_DEPTH+".");
}
switch(current) {
case 'n':
return readNull();
case 't':
return readTrue();
case 'f':
return readFalse();
case '"':
return readString();
case '[':
return readArray(depth + 1);
case '{':
return readObject(depth + 1);
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return readNumber();
default:
throw expected("value");
}
}
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
readValue
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 1
|
Analyze the following code function for security vulnerabilities
|
public void unregisterReceiver(IIntentReceiver receiver) {
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Unregister receiver: " + receiver);
final long origId = Binder.clearCallingIdentity();
try {
boolean doTrim = false;
synchronized(this) {
ReceiverList rl = mRegisteredReceivers.get(receiver.asBinder());
if (rl != null) {
final BroadcastRecord r = rl.curBroadcast;
if (r != null && r == r.queue.getMatchingOrderedReceiver(r)) {
final boolean doNext = r.queue.finishReceiverLocked(
r, r.resultCode, r.resultData, r.resultExtras,
r.resultAbort, false);
if (doNext) {
doTrim = true;
r.queue.processNextBroadcastLocked(/* frommsg */ false,
/* skipOomAdj */ true);
}
}
if (rl.app != null) {
rl.app.mReceivers.removeReceiver(rl);
}
removeReceiverLocked(rl);
if (rl.linkedToDeath) {
rl.linkedToDeath = false;
rl.receiver.asBinder().unlinkToDeath(rl, 0);
}
}
// If we actually concluded any broadcasts, we might now be able
// to trim the recipients' apps from our working set
if (doTrim) {
trimApplicationsLocked(false, OomAdjuster.OOM_ADJ_REASON_FINISH_RECEIVER);
return;
}
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterReceiver
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
|
unregisterReceiver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean labelVHDLInvalid(String label) {
if (!label.matches("^[A-Za-z][A-Za-z0-9_]*") || label.endsWith("_")
|| label.matches(".*__.*"))
return (true);
return (false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: labelVHDLInvalid
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
labelVHDLInvalid
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpServerResponse vertxServerResponse() {
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vertxServerResponse
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
|
vertxServerResponse
|
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
|
public String getRenderedTitle(XWikiContext context)
{
return getRenderedTitle(getOutputSyntax(), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedTitle
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
|
getRenderedTitle
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addJobAgentMetadata(JobAgentMetadata jobAgentMetadata) {
jobAgentMetadataDao.save(jobAgentMetadata);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addJobAgentMetadata
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
addJobAgentMetadata
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<KBTemplate> findByUuid(String uuid, int start, int end,
OrderByComparator<KBTemplate> orderByComparator,
boolean retrieveFromCache) {
boolean pagination = true;
FinderPath finderPath = null;
Object[] finderArgs = null;
if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
(orderByComparator == null)) {
pagination = false;
finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID;
finderArgs = new Object[] { uuid };
}
else {
finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID;
finderArgs = new Object[] { uuid, start, end, orderByComparator };
}
List<KBTemplate> list = null;
if (retrieveFromCache) {
list = (List<KBTemplate>)finderCache.getResult(finderPath,
finderArgs, this);
if ((list != null) && !list.isEmpty()) {
for (KBTemplate kbTemplate : list) {
if (!Objects.equals(uuid, kbTemplate.getUuid())) {
list = null;
break;
}
}
}
}
if (list == null) {
StringBundler query = null;
if (orderByComparator != null) {
query = new StringBundler(3 +
(orderByComparator.getOrderByFields().length * 2));
}
else {
query = new StringBundler(3);
}
query.append(_SQL_SELECT_KBTEMPLATE_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
if (orderByComparator != null) {
appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
orderByComparator);
}
else
if (pagination) {
query.append(KBTemplateModelImpl.ORDER_BY_JPQL);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
if (!pagination) {
list = (List<KBTemplate>)QueryUtil.list(q, getDialect(),
start, end, false);
Collections.sort(list);
list = Collections.unmodifiableList(list);
}
else {
list = (List<KBTemplate>)QueryUtil.list(q, getDialect(),
start, end);
}
cacheResult(list);
finderCache.putResult(finderPath, finderArgs, list);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByUuid
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
|
findByUuid
|
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
|
public void setParentId(String parentId) {
this.parentId = parentId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParentId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-18927
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setParentId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
|
2b411dc2821c69539138aaf7632b938b659a58fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ProfileDataInfo other = (ProfileDataInfo) obj;
return Objects.equals(profileDescription, other.profileDescription)
&& Objects.equals(profileId, other.profileId) && Objects.equals(profileName, other.profileName)
&& Objects.equals(profileURL, other.profileURL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
equals
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void warnAboutUberJarDuplicates() {
UberJarDuplicatedJarsWarner scanner = new ManifestUberJarDuplicatedJarsWarner();
scanner.isClasspathCorrectAsync()
.thenAcceptAsync(isClasspathCorrect -> {
if(!isClasspathCorrect)
log.warnAboutUberJarDuplicates();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: warnAboutUberJarDuplicates
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
warnAboutUberJarDuplicates
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleNotifyUpdateAppWidget(Host host, IAppWidgetHost callbacks,
int appWidgetId, RemoteViews views) {
try {
callbacks.updateAppWidget(appWidgetId, views);
} catch (RemoteException re) {
synchronized (mLock) {
Slog.e(TAG, "Widget host dead: " + host.id, re);
host.callbacks = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNotifyUpdateAppWidget
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
handleNotifyUpdateAppWidget
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@UnsupportedAppUsage
public int addOverlayPath(String path) {
return addAssetPathInternal(path, true /*overlay*/, false /*appAsLib*/);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOverlayPath
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
|
addOverlayPath
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean parseBooleanAttribute(TypedXmlPullParser parser, String attribute) {
return parseLongAttribute(parser, attribute) == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseBooleanAttribute
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
parseBooleanAttribute
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native int[] getPids(String path, int[] lastArray);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPids
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getPids
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void revokeApiKey(String jti) {
API_KEYS.remove(jti);
saveApiKeysObject();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revokeApiKey
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
|
revokeApiKey
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String findFilename(FileDownloadConnection connection, String url) {
String filename = FileDownloadUtils.parseContentDisposition(connection.
getResponseHeaderField("Content-Disposition"));
if (TextUtils.isEmpty(filename)) {
filename = FileDownloadUtils.generateFileName(url);
}
return filename;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-11248
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: fix directory traversal vulnerability security issue
closes #1028
Function: findFilename
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
Fixed Code:
public static String findFilename(FileDownloadConnection connection, String url)
throws FileDownloadSecurityException {
String filename = FileDownloadUtils.parseContentDisposition(connection.
getResponseHeaderField("Content-Disposition"));
if (TextUtils.isEmpty(filename)) {
filename = FileDownloadUtils.generateFileName(url);
} else if (filename.startsWith("../")) {
throw new FileDownloadSecurityException(FileDownloadUtils.formatString(
"The filename [%s] from the response is not allowable, because it start"
+ " with '../', which can raise the directory traversal vulnerability",
filename));
}
return filename;
}
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
findFilename
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void rate(String packageName, Rating rating) {
mSessionCb.rate(packageName, Binder.getCallingPid(), Binder.getCallingUid(), rating);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rate
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
rate
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSessionId
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
setSessionId
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/repository/restful/artifact/GET/*", method = RequestMethod.GET)
public void fetch(HttpServletRequest request, HttpServletResponse response) throws Exception {
request.getRequestDispatcher("/repository/restful/artifact/GET/html").forward(request, response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetch
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
|
fetch
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStudyGroupClassTypesExpected() {
this.unsetTypeExpected();
this.setTypeExpected(1, TypeNames.INT);// study_group_class_id
this.setTypeExpected(2, TypeNames.STRING);// sgc_name(study_group_class
// name)
this.setTypeExpected(3, TypeNames.STRING);// sgc_type(group_class_type
// name)
this.setTypeExpected(4, TypeNames.INT);// (study_group_class) status_id
this.setTypeExpected(5, TypeNames.STRING);// subject_assignment
this.setTypeExpected(6, TypeNames.INT);// study_group_id
this.setTypeExpected(7, TypeNames.STRING);// (study_group) sg_name
this.setTypeExpected(8, TypeNames.STRING);// study_group description
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStudyGroupClassTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setStudyGroupClassTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String lookupPrefix(final String namespaceURI) {
throw new UnsupportedOperationException("DomNode.lookupPrefix is not yet implemented.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lookupPrefix
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
|
lookupPrefix
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@Override
public final Double getDouble(CharSequence name) {
final String v = get(name);
return toDouble(v);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDouble
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
getDouble
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean updateWallpaperOffsetLocked(WindowState wallpaperWin, int dw, int dh,
boolean sync) {
boolean changed = false;
boolean rawChanged = false;
float wpx = mLastWallpaperX >= 0 ? mLastWallpaperX : 0.5f;
float wpxs = mLastWallpaperXStep >= 0 ? mLastWallpaperXStep : -1.0f;
int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw;
int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0;
if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE) {
offset += mLastWallpaperDisplayOffsetX;
}
changed = wallpaperWin.mXOffset != offset;
if (changed) {
if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
+ wallpaperWin + " x: " + offset);
wallpaperWin.mXOffset = offset;
}
if (wallpaperWin.mWallpaperX != wpx || wallpaperWin.mWallpaperXStep != wpxs) {
wallpaperWin.mWallpaperX = wpx;
wallpaperWin.mWallpaperXStep = wpxs;
rawChanged = true;
}
float wpy = mLastWallpaperY >= 0 ? mLastWallpaperY : 0.5f;
float wpys = mLastWallpaperYStep >= 0 ? mLastWallpaperYStep : -1.0f;
int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh;
offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0;
if (mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
offset += mLastWallpaperDisplayOffsetY;
}
if (wallpaperWin.mYOffset != offset) {
if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
+ wallpaperWin + " y: " + offset);
changed = true;
wallpaperWin.mYOffset = offset;
}
if (wallpaperWin.mWallpaperY != wpy || wallpaperWin.mWallpaperYStep != wpys) {
wallpaperWin.mWallpaperY = wpy;
wallpaperWin.mWallpaperYStep = wpys;
rawChanged = true;
}
if (rawChanged && (wallpaperWin.mAttrs.privateFlags &
WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS) != 0) {
try {
if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset "
+ wallpaperWin + " x=" + wallpaperWin.mWallpaperX
+ " y=" + wallpaperWin.mWallpaperY);
if (sync) {
mWaitingOnWallpaper = wallpaperWin;
}
wallpaperWin.mClient.dispatchWallpaperOffsets(
wallpaperWin.mWallpaperX, wallpaperWin.mWallpaperY,
wallpaperWin.mWallpaperXStep, wallpaperWin.mWallpaperYStep, sync);
if (sync) {
if (mWaitingOnWallpaper != null) {
long start = SystemClock.uptimeMillis();
if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY)
< start) {
try {
if (DEBUG_WALLPAPER) Slog.v(TAG,
"Waiting for offset complete...");
mWindowMap.wait(WALLPAPER_TIMEOUT);
} catch (InterruptedException e) {
}
if (DEBUG_WALLPAPER) Slog.v(TAG, "Offset complete!");
if ((start+WALLPAPER_TIMEOUT)
< SystemClock.uptimeMillis()) {
Slog.i(TAG, "Timeout waiting for wallpaper to offset: "
+ wallpaperWin);
mLastWallpaperTimeoutTime = start;
}
}
mWaitingOnWallpaper = null;
}
}
} catch (RemoteException e) {
}
}
return changed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateWallpaperOffsetLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
updateWallpaperOffsetLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void wipeDataNoLock(ComponentName admin, int flags, String internalReason,
String wipeReasonForUser, int userId) {
wtfIfInLock();
mInjector.binderWithCleanCallingIdentity(() -> {
// First check whether the admin is allowed to wipe the device/user/profile.
final String restriction;
if (userId == UserHandle.USER_SYSTEM) {
restriction = UserManager.DISALLOW_FACTORY_RESET;
} else if (isManagedProfile(userId)) {
restriction = UserManager.DISALLOW_REMOVE_MANAGED_PROFILE;
} else {
restriction = UserManager.DISALLOW_REMOVE_USER;
}
if (isAdminAffectedByRestriction(admin, restriction, userId)) {
throw new SecurityException("Cannot wipe data. " + restriction
+ " restriction is set for user " + userId);
}
if (userId == UserHandle.USER_SYSTEM) {
forceWipeDeviceNoLock(
(flags & WIPE_EXTERNAL_STORAGE) != 0,
internalReason,
(flags & WIPE_EUICC) != 0,
(flags & WIPE_RESET_PROTECTION_DATA) != 0);
} else {
forceWipeUser(userId, wipeReasonForUser, (flags & WIPE_SILENTLY) != 0);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wipeDataNoLock
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
|
wipeDataNoLock
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TtyExecable<String, ExecWatch> writingErrorChannel(OutputStream errChannel) {
return new PodOperationsImpl(getContext().withErrChannel(errChannel));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writingErrorChannel
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
writingErrorChannel
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] getPageContent(int pageNum, RandomAccessFileOrArray file) throws IOException{
PdfDictionary page = getPageNRelease(pageNum);
if (page == null)
return null;
PdfObject contents = getPdfObjectRelease(page.get(PdfName.CONTENTS));
if (contents == null)
return new byte[0];
ByteArrayOutputStream bout = null;
if (contents.isStream()) {
return getStreamBytes((PRStream)contents, file);
}
else if (contents.isArray()) {
PdfArray array = (PdfArray)contents;
bout = new ByteArrayOutputStream();
for (int k = 0; k < array.size(); ++k) {
PdfObject item = getPdfObjectRelease(array.getPdfObject(k));
if (item == null || !item.isStream())
continue;
byte[] b = getStreamBytes((PRStream)item, file);
bout.write(b);
if (k != array.size() - 1)
bout.write('\n');
}
return bout.toByteArray();
}
else
return new byte[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageContent
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getPageContent
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
private void testServer() throws Exception {
Server server = new Server();
server.setOut(new PrintStream(new ByteArrayOutputStream()));
server.runTool("-web", "-webPort", "8182", "-properties",
"null", "-tcp", "-tcpPort", "9101");
try {
String url = "http://localhost:8182";
WebClient client;
String result;
client = new WebClient();
client.setAcceptLanguage("de-de,de;q=0.5");
result = client.get(url);
client.readSessionId(result);
result = client.get(url, "login.jsp");
assertEquals("text/html", client.getContentType());
assertContains(result, "Einstellung");
client.get(url, "favicon.ico");
assertEquals("image/x-icon", client.getContentType());
client.get(url, "ico_ok.gif");
assertEquals("image/gif", client.getContentType());
client.get(url, "tree.js");
assertEquals("text/javascript", client.getContentType());
client.get(url, "stylesheet.css");
assertEquals("text/css", client.getContentType());
client.get(url, "admin.do");
try {
client.get(url, "adminShutdown.do");
} catch (IOException e) {
// expected
Thread.sleep(1000);
}
} finally {
server.shutdown();
}
// it should be stopped now
server = Server.createTcpServer("-tcpPort", "9101");
server.start();
server.stop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testServer
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
testServer
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onBootPhase(int phase) {
mService.mBootPhase = phase;
if (phase == PHASE_SYSTEM_SERVICES_READY) {
mService.mBatteryStatsService.systemServicesReady();
mService.mServices.systemServicesReady();
} else if (phase == PHASE_ACTIVITY_MANAGER_READY) {
mService.startBroadcastObservers();
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
mService.mPackageWatchdog.onPackagesReady();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBootPhase
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
|
onBootPhase
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private RequestContext unmarshalContext(Element env)
{
RequestContext ctx = new RequestContext();
Element header = env.element("header");
if (header != null)
{
Element context = header.element("context");
if (context != null)
{
Element convId = context.element("conversationId");
if (convId != null)
{
ctx.setConversationId(convId.getText());
}
}
}
return ctx;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshalContext
File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
Repository: seam2/jboss-seam
The code follows secure coding practices.
|
[
"CWE-264",
"CWE-200"
] |
CVE-2013-6447
|
MEDIUM
| 5
|
seam2/jboss-seam
|
unmarshalContext
|
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/ExecutionHandler.java
|
090aa6252affc978a96c388e3fc2c1c2688d9bb5
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDefaultDocumentSyntax()
{
// TODO: Fix this method to return a Syntax object instead of a String
return getDefaultDocumentSyntaxInternal().toIdString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultDocumentSyntax
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getDefaultDocumentSyntax
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<String> getAllResolvedPermittedIndices(Resolved resolved, User user, String[] actions, IndexNameExpressionResolver resolver,
ClusterService cs) {
final Set<String> retVal = new HashSet<>();
for (IndexPattern p : ipatterns) {
//what if we cannot resolve one (for create purposes)
final boolean patternMatch = p.getPerms().matchAll(actions);
// final Set<TypePerm> tperms = p.getTypePerms();
// for (TypePerm tp : tperms) {
// if (WildcardMatcher.matchAny(tp.typePattern, resolved.getTypes(-).toArray(new String[0]))) {
// patternMatch = WildcardMatcher.matchAll(tp.perms.toArray(new String[0]), actions);
// }
// }
if (patternMatch) {
//resolved but can contain patterns for nonexistent indices
final WildcardMatcher permitted = WildcardMatcher.from(p.attemptResolveIndexNames(user, resolver, cs)); //maybe they do not exist
final Set<String> res = new HashSet<>();
if (!resolved.isLocalAll() && !resolved.getAllIndices().contains("*") && !resolved.getAllIndices().contains("_all")) {
//resolved but can contain patterns for nonexistent indices
resolved.getAllIndices().stream().filter(permitted).forEach(res::add);
} else {
//we want all indices so just return what's permitted
//#557
//final String[] allIndices = resolver.concreteIndexNames(cs.state(), IndicesOptions.lenientExpandOpen(), "*");
final String[] allIndices = cs.state().metadata().getConcreteAllOpenIndices();
Arrays.stream(allIndices).filter(permitted).forEach(res::add);
}
retVal.addAll(res);
}
}
//all that we want and all thats permitted of them
return Collections.unmodifiableSet(retVal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllResolvedPermittedIndices
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
getAllResolvedPermittedIndices
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Claims validateToken(String token) throws AuthenticationException {
try {
RsaKeyUtil rsaKeyUtil = new RsaKeyUtil();
PublicKey publicKey = rsaKeyUtil.fromPemEncoded(keycloakPublicKey);
return (Claims) Jwts.parser().setSigningKey(publicKey).parse(token.replace("Bearer ", "")).getBody();
} catch (Exception e){
throw new AuthenticationException(String.format("Failed to check user authorization for token: %s", token), e);
}
}
|
Vulnerability Classification:
- CWE: CWE-290
- CVE: CVE-2021-32631
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Fixed JWT validation according to https://github.com/nimble-platform/common/security/advisories/GHSA-fjq8-896w-pv28
Function: validateToken
File: utility/src/main/java/eu/nimble/utility/validation/ValidationUtil.java
Repository: nimble-platform/common
Fixed Code:
public Claims validateToken(String token) throws AuthenticationException {
try {
RsaKeyUtil rsaKeyUtil = new RsaKeyUtil();
PublicKey publicKey = rsaKeyUtil.fromPemEncoded(keycloakPublicKey);
return Jwts.parser().setSigningKey(publicKey).parseJws(token.replace("Bearer ", "")).getBody();
} catch (Exception e){
throw new AuthenticationException(String.format("Failed to check user authorization for token: %s", token), e);
}
}
|
[
"CWE-290"
] |
CVE-2021-32631
|
MEDIUM
| 4
|
nimble-platform/common
|
validateToken
|
utility/src/main/java/eu/nimble/utility/validation/ValidationUtil.java
|
12197a755bd524559bf4e16475595a2c6fcd34db
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public NamedNodeMap getAttributes() {
return doc.getAttributes();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributes
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getAttributes
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection get(final String path1, final String path2,
final Route.ZeroArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{get(path1, handler), get(path2, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
get
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isNameUnique(String name, String currentJobName) {
Item item = getItem(name);
if(null==item) {
// the candidate name didn't return any items so the name is unique
return true;
}
else if(item.getName().equals(currentJobName)) {
// the candidate name returned an item, but the item is the item
// that the user is configuring so this is ok
return true;
}
else {
// the candidate name returned an item, so it is not unique
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNameUnique
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
isNameUnique
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void activateContents() {
mContentsClient.onRequestFocus();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: activateContents
File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
activateContents
|
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_LOCK_TASK, conditional = true)
public void clearPackagePersistentPreferredActivities(@Nullable ComponentName admin,
String packageName) {
throwIfParentInstance("clearPackagePersistentPreferredActivities");
if (mService != null) {
try {
mService.clearPackagePersistentPreferredActivities(
admin,
mContext.getPackageName(),
packageName);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPackagePersistentPreferredActivities
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
clearPackagePersistentPreferredActivities
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeMessageEnd() {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeMessageEnd
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
|
writeMessageEnd
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.