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
|
private void parseRepairFrontiers(final List<Element> elements) throws GameParseException {
final RepairFrontierList frontiers = data.getRepairFrontierList();
for (final Element current : elements) {
final String name = current.getAttribute("name");
final RepairFrontier frontier = new RepairFrontier(name, data);
parseRepairFrontierRules(getChildren("repairRules", current), frontier);
frontiers.addRepairFrontier(frontier);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRepairFrontiers
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseRepairFrontiers
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateVMPreferenceWidgets(String currentProviderSetting) {
final String key = currentProviderSetting;
final VoicemailProviderListPreference.VoicemailProvider provider =
mVoicemailProviders.getVoicemailProvider(key);
/* This is the case when we are coming up on a freshly wiped phone and there is no
persisted value for the list preference mVoicemailProviders.
In this case we want to show the UI asking the user to select a voicemail provider as
opposed to silently falling back to default one. */
if (provider == null) {
if (DBG) log("updateVMPreferenceWidget: key: " + key + " -> null.");
mVoicemailProviders.setSummary(getString(R.string.sum_voicemail_choose_provider));
mVoicemailSettings.setEnabled(false);
mVoicemailSettings.setIntent(null);
} else {
if (DBG) log("updateVMPreferenceWidget: key: " + key + " -> " + provider.toString());
final String providerName = provider.name;
mVoicemailProviders.setSummary(providerName);
mVoicemailSettings.setEnabled(true);
mVoicemailSettings.setIntent(provider.intent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateVMPreferenceWidgets
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
updateVMPreferenceWidgets
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleEapAuthFailure(int networkId, int errorCode) {
WifiConfiguration targetedNetwork =
mWifiConfigManager.getConfiguredNetwork(mTargetNetworkId);
if (targetedNetwork != null) {
switch (targetedNetwork.enterpriseConfig.getEapMethod()) {
case WifiEnterpriseConfig.Eap.SIM:
case WifiEnterpriseConfig.Eap.AKA:
case WifiEnterpriseConfig.Eap.AKA_PRIME:
if (errorCode == WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED) {
mWifiCarrierInfoManager.resetCarrierKeysForImsiEncryption(targetedNetwork);
}
break;
default:
// Do Nothing
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleEapAuthFailure
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
handleEapAuthFailure
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public PostMethod executePost(Object resourceUri, Object restObject, Map<String, Object[]> queryParams,
Object... elements) throws Exception
{
// Build URI
String uri = createUri(resourceUri, queryParams, elements).toString();
try (InputStream resourceStream = toResourceInputStream(restObject)) {
return this.testUtils.executePost(uri, resourceStream, MediaType.APPLICATION_XML);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executePost
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executePost
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeAttribute(ProfileAttribute attr) {
attrs.remove(attr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAttribute
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
removeAttribute
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Profile getSystemUser() {
return API_USER;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSystemUser
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
|
getSystemUser
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Unstable
protected boolean supportRedirections()
{
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supportRedirections
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-29208
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
supportRedirections
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
d9e947559077e947315bf700c5703dfc7dd8a8d7
| 0
|
Analyze the following code function for security vulnerabilities
|
static Consumer<Object> initializer() {
if (initializer != null) return initializer;
synchronized (ObjectInitializer.class) {
if (initializer != null) return initializer;
initializer = UsfAccessor.allocateObjectInitializer();
}
return initializer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializer
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
initializer
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDirty() {
return getStateTree().isDirty()
|| getPendingJavaScriptInvocations().count() != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDirty
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isDirty
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateForegroundTimeIfOnBattery(
String packageName, int uid, long cpuTimeDiff) {
mBatteryStatsService.updateForegroundTimeIfOnBattery(packageName, uid, cpuTimeDiff);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateForegroundTimeIfOnBattery
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
|
updateForegroundTimeIfOnBattery
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void warn(String msg) {
logger.warn(prefix + msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: warn
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
warn
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated // v2.15
public static ObjectNode parse(
final IOContext ioContext,
final int options,
final Reader reader
) throws IOException {
Parser parser = new Parser(new TomlFactory(), ioContext,
new TomlStreamReadException.ErrorContext(ioContext.contentReference(), null), options, reader);
try {
final ObjectNode node = parser.parse();
if (TomlReadFeature.VALIDATE_NESTING_DEPTH.enabledIn(options) && parser.getNestingDepth() > 0) {
throw new IOException("Nesting Depth is non-zero after parsing TOML");
}
return node;
} finally {
parser.lexer.releaseBuffers();
}
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2023-3894
- Severity: HIGH
- CVSS Score: 7.5
Description: remove toml feature
Function: parse
File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
Repository: FasterXML/jackson-dataformats-text
Fixed Code:
@Deprecated // v2.15
public static ObjectNode parse(
final IOContext ioContext,
final int options,
final Reader reader
) throws IOException {
Parser parser = new Parser(new TomlFactory(), ioContext,
new TomlStreamReadException.ErrorContext(ioContext.contentReference(), null), options, reader);
try {
final ObjectNode node = parser.parse();
assert parser.getNestingDepth() == 0;
return node;
} finally {
parser.lexer.releaseBuffers();
}
}
|
[
"CWE-787"
] |
CVE-2023-3894
|
HIGH
| 7.5
|
FasterXML/jackson-dataformats-text
|
parse
|
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
|
a05e4f3485d878153747b82937536e0b4b0f0579
| 1
|
Analyze the following code function for security vulnerabilities
|
private void migrate41(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (element.elementTextTrim("key").equals("MAIL")) {
Element valueElement = element.element("value");
if (valueElement != null)
valueElement.addElement("sendAsHtml").setText("true");
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate41
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate41
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
Messenger bindServiceIfNeededLocked(int userId, ComponentName service) {
if (mPaymentServiceName != null && mPaymentServiceName.equals(service)
&& mPaymentServiceUserId == userId) {
Log.d(TAG, "Service already bound as payment service.");
return mPaymentService;
} else if (mServiceName != null && mServiceName.equals(service)
&& mServiceUserId == userId) {
Log.d(TAG, "Service already bound as regular service.");
return mService;
} else {
Log.d(TAG, "Binding to service " + service + " for userid:" + userId);
unbindServiceIfNeededLocked();
Intent aidIntent = new Intent(HostApduService.SERVICE_INTERFACE);
aidIntent.setComponent(service);
try {
mServiceBound = mContext.bindServiceAsUser(aidIntent, mConnection,
Context.BIND_AUTO_CREATE | Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS,
UserHandle.of(userId));
if (!mServiceBound) {
Log.e(TAG, "Could not bind service.");
} else {
mServiceUserId = userId;
}
} catch (SecurityException e) {
Log.e(TAG, "Could not bind service due to security exception.");
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindServiceIfNeededLocked
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
bindServiceIfNeededLocked
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalRemoveCompactionThreshold() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
if (!op.isPresent()) {
return CompletableFuture.completedFuture(null);
}
op.get().setCompactionThreshold(null);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, op.get());
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalRemoveCompactionThreshold
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
|
internalRemoveCompactionThreshold
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OSGiVaadinInitialization addingService(
ServiceReference<OSGiVaadinInitialization> reference) {
OSGiVaadinInitialization result = super.addingService(reference);
result.contextInitialized(new ServletContextEvent(servletContext));
close();
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addingService
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/servlet/OSGiVaadinServlet.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
addingService
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/servlet/OSGiVaadinServlet.java
|
0b82a606eeafdf56a129630f00b9c55a5177b64b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRemoveQueryParamOnRedirect() {
return removeQueryParamOnRedirect;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRemoveQueryParamOnRedirect
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
isRemoveQueryParamOnRedirect
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private CompletableFuture<?> watchFile(ServiceRequestContext ctx,
Repository repository, Revision lastKnownRevision,
Query<?> query, long timeOutMillis) {
final CompletableFuture<? extends Entry<?>> future = watchService.watchFile(
repository, lastKnownRevision, query, timeOutMillis);
if (!future.isDone()) {
ctx.log().whenComplete().thenRun(() -> future.cancel(false));
}
return future.thenApply(entry -> {
final Revision revision = entry.revision();
final EntryDto<?> entryDto = convert(repository, revision, entry, true);
return (Object) new WatchResultDto(revision, entryDto);
}).exceptionally(ContentServiceV1::handleWatchFailure);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchFile
File: server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
watchFile
|
server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
|
6a395aed73f0b009cf8174a3ebf3ed826521c11d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pass(Pipeline pipeline) {
for (Stage stage : pipeline.getStages()) {
passStage(stage);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pass
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
|
pass
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public @Nullable List<PersistableBundle> getTrustAgentConfiguration(
@Nullable ComponentName admin, @NonNull ComponentName agent, int userHandle) {
if (mService != null) {
try {
return mService.getTrustAgentConfiguration(admin, agent, userHandle,
mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return new ArrayList<PersistableBundle>(); // empty list
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTrustAgentConfiguration
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
|
getTrustAgentConfiguration
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalSetDeduplication(Boolean enabled) {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
TopicPolicies topicPolicies = op.orElseGet(TopicPolicies::new);
topicPolicies.setDeduplicationEnabled(enabled);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, topicPolicies);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSetDeduplication
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
|
internalSetDeduplication
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public void send(final int iCode, final String iReason, final String iContentType, final Object iContent, final String iHeaders)
throws IOException {
if (sendStarted)
// AVOID TO SEND RESPONSE TWICE
{
return;
}
sendStarted = true;
// final String content;
// final String contentType;
if (callbackFunction != null) {
content = callbackFunction + "(" + iContent + ")";
contentType = "text/javascript";
} else {
if (content == null || content.length() == 0) {
content = iContent != null ? iContent.toString() : null;
}
if (contentType == null || contentType.length() == 0) {
contentType = iContentType;
}
}
final boolean empty = content == null || content.length() == 0;
if (this.code > 0) {
writeStatus(this.code, iReason);
} else {
writeStatus(empty && iCode == 200 ? 204 : iCode, iReason);
}
writeHeaders(contentType, keepAlive);
if (iHeaders != null) {
writeLine(iHeaders);
}
final String sessId = sessionId != null ? sessionId : "-";
writeLine("Set-Cookie: " + OHttpUtils.OSESSIONID + "=" + sessId + "; Path=/; HttpOnly");
byte[] binaryContent = null;
if (!empty) {
if (contentEncoding != null && contentEncoding.equals(OHttpUtils.CONTENT_ACCEPT_GZIP_ENCODED)) {
binaryContent = compress(content);
} else {
binaryContent = content.getBytes(utf8);
}
}
writeLine(OHttpUtils.HEADER_CONTENT_LENGTH + (empty ? 0 : binaryContent.length));
writeLine(null);
if (binaryContent != null) {
out.write(binaryContent);
}
flush();
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2015-2912
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Fixed issue #4824 - JSONP is disabled by default
Function: send
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
Fixed Code:
public void send(final int iCode, final String iReason, final String iContentType, final Object iContent, final String iHeaders)
throws IOException {
if (sendStarted) {
// AVOID TO SEND RESPONSE TWICE
return;
}
sendStarted = true;
if (callbackFunction != null) {
content = callbackFunction + "(" + iContent + ")";
contentType = "text/javascript";
} else {
if (content == null || content.length() == 0) {
content = iContent != null ? iContent.toString() : null;
}
if (contentType == null || contentType.length() == 0) {
contentType = iContentType;
}
}
final boolean empty = content == null || content.length() == 0;
if (this.code > 0) {
writeStatus(this.code, iReason);
} else {
writeStatus(empty && iCode == 200 ? 204 : iCode, iReason);
}
writeHeaders(contentType, keepAlive);
if (iHeaders != null) {
writeLine(iHeaders);
}
final String sessId = sessionId != null ? sessionId : "-";
writeLine("Set-Cookie: " + OHttpUtils.OSESSIONID + "=" + sessId + "; Path=/; HttpOnly");
byte[] binaryContent = null;
if (!empty) {
if (contentEncoding != null && contentEncoding.equals(OHttpUtils.CONTENT_ACCEPT_GZIP_ENCODED)) {
binaryContent = compress(content);
} else {
binaryContent = content.getBytes(utf8);
}
}
writeLine(OHttpUtils.HEADER_CONTENT_LENGTH + (empty ? 0 : binaryContent.length));
writeLine(null);
if (binaryContent != null) {
out.write(binaryContent);
}
flush();
}
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
send
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
5dbd6035e4e59259f3e08ba8f1218785f36d1d2d
| 1
|
Analyze the following code function for security vulnerabilities
|
private void handleClearShortcuts() throws CommandException {
synchronized (mLock) {
parseOptionsLocked(/* takeUser =*/ true);
final String packageName = getNextArgRequired();
Slog.i(TAG, "cmd: handleClearShortcuts: user" + mUserId + ", " + packageName);
ShortcutService.this.cleanUpPackageForAllLoadedUsers(packageName, mUserId,
/* appStillExists = */ true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleClearShortcuts
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
|
handleClearShortcuts
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, Object> getResourceURLCacheParameters(String resourceFilePath)
{
try {
URL resourceUrl = getResource(resourceFilePath);
return getResourceURLCacheParameters(resourceUrl);
} catch (MalformedURLException e) {
LOGGER.debug("Error while getting URL for resource path [{}]", resourceFilePath, e);
return Collections.singletonMap(CACHE_VERSION, getVersion());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceURLCacheParameters
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
|
getResourceURLCacheParameters
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void appendCriteria(Map<String, Object> parameters) {
parameters.put(ScmMaterialConfig.URL, serverAndPort);
parameters.put(ScmMaterialConfig.USERNAME, userName);
parameters.put("view", view.getValue());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendCriteria
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
appendCriteria
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onStart() {
((SettingsApplication) getApplication()).setHomeActivity(this);
super.onStart();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStart
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
onStart
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void tcpIpConfigXmlGenerator(XmlGenerator gen, JoinConfig join) {
TcpIpConfig tcpIpConfig = join.getTcpIpConfig();
gen.open("tcp-ip", "enabled", tcpIpConfig.isEnabled(),
"connection-timeout-seconds", tcpIpConfig.getConnectionTimeoutSeconds());
gen.open("member-list");
for (String m : tcpIpConfig.getMembers()) {
gen.node("member", m);
}
// </member-list>
gen.close();
gen.node("required-member", tcpIpConfig.getRequiredMember());
// </tcp-ip>
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tcpIpConfigXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
tcpIpConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleSpaceWhenStartElement()
{
// Use case: <tag1>something <tag2>...
// Use case: <tag1>something <!--...
if (this.spaceCount > 0) {
if (!this.isInCData && !this.isInPreserveElement) {
// We print a single space as a normal space, except if we are at the beginning of a standalone element
// in that case we want a non-breaking space so it won't be stripped.
// Any supplementary space will be printed as non-breaking spaces so we keep them too.
if (this.isStandalone && !this.hasTextBeenPrinted) {
printEntity(" ");
} else {
super.printXML(" ");
}
for (int i = 0; i < this.spaceCount - 1; i++) {
printEntity(" ");
}
} else {
super.printXML(StringUtils.repeat(' ', this.spaceCount));
}
this.isStandalone = false;
}
this.spaceCount = 0;
this.elementEnded = false;
this.hasTextBeenPrinted = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSpaceWhenStartElement
File: xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
handleSpaceWhenStartElement
|
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public T getKeycloakSecurityContext() {
return context;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeycloakSecurityContext
File: core/src/main/java/org/keycloak/KeycloakPrincipal.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-1714
|
MEDIUM
| 6.5
|
keycloak
|
getKeycloakSecurityContext
|
core/src/main/java/org/keycloak/KeycloakPrincipal.java
|
5821e37eb63ff3ef45c0c0cd2ae2b54a8a242724
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Descriptor<RetentionStrategy<?>>> getRetentionStrategyDescriptors() {
return RetentionStrategy.all();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRetentionStrategyDescriptors
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getRetentionStrategyDescriptors
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
static public String autoSelectFiles(ImportingJob job, ObjectNode retrievalRecord, ArrayNode fileSelectionIndexes) {
final Map<String, Integer> formatToCount = new HashMap<String, Integer>();
List<String> formats = new ArrayList<String>();
ArrayNode fileRecords = JSONUtilities.getArray(retrievalRecord, "files");
int count = fileRecords.size();
for (int i = 0; i < count; i++) {
ObjectNode fileRecord = JSONUtilities.getObjectElement(fileRecords, i);
String format = JSONUtilities.getString(fileRecord, "format", null);
if (format != null) {
if (formatToCount.containsKey(format)) {
formatToCount.put(format, formatToCount.get(format) + 1);
} else {
formatToCount.put(format, 1);
formats.add(format);
}
}
}
Collections.sort(formats, new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
return formatToCount.get(o2) - formatToCount.get(o1);
}
});
// Default to text/line-based to to avoid parsing as binary/excel.
String bestFormat = formats.size() > 0 ? formats.get(0) : "text/line-based";
if (JSONUtilities.getInt(retrievalRecord, "archiveCount", 0) == 0) {
// If there's no archive, then select everything
for (int i = 0; i < count; i++) {
JSONUtilities.append(fileSelectionIndexes, i);
}
} else {
// Otherwise, select files matching the best format
for (int i = 0; i < count; i++) {
ObjectNode fileRecord = JSONUtilities.getObjectElement(fileRecords, i);
String format = JSONUtilities.getString(fileRecord, "format", null);
if (format != null && format.equals(bestFormat)) {
JSONUtilities.append(fileSelectionIndexes, i);
}
}
// If nothing matches the best format but we have some files,
// then select them all
if (fileSelectionIndexes.size() == 0 && count > 0) {
for (int i = 0; i < count; i++) {
JSONUtilities.append(fileSelectionIndexes, i);
}
}
}
return bestFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: autoSelectFiles
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
autoSelectFiles
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable NClob getNClob(String columnName) throws SQLException {
return getNClob(findColumn(columnName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNClob
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getNClob
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public LogoutHandler findLogoutHandler() {
init();
return logoutHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLogoutHandler
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
findLogoutHandler
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<String> searchDocuments(String wheresql) throws XWikiException
{
return this.xwiki.getStore().searchDocumentsNames(wheresql, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchDocuments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
searchDocuments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerVariables(Map<String, String> serverVariables) {
this.serverVariables = serverVariables;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerVariables
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setServerVariables
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return Messages.OfflineCause_LaunchFailed();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: core/src/main/java/hudson/slaves/OfflineCause.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2603
|
LOW
| 3.5
|
jenkinsci/jenkins
|
toString
|
core/src/main/java/hudson/slaves/OfflineCause.java
|
3cd946cbef82c6da5ccccf3890d0ae4e091c4265
| 0
|
Analyze the following code function for security vulnerabilities
|
WebSession getSession(String sessionId) {
long now = System.currentTimeMillis();
if (lastTimeoutCheck + SESSION_TIMEOUT < now) {
for (String id : new ArrayList<>(sessions.keySet())) {
WebSession session = sessions.get(id);
if (session.lastAccess + SESSION_TIMEOUT < now) {
trace("timeout for " + id);
sessions.remove(id);
}
}
lastTimeoutCheck = now;
}
WebSession session = sessions.get(sessionId);
if (session != null) {
session.lastAccess = System.currentTimeMillis();
}
return session;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSession
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getSession
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public javax.xml.rpc.Service loadService(URL wsdlDocumentLocation,
Class serviceInterface, Properties properties) throws ServiceException {
if (serviceInterface == null) {
throw new IllegalArgumentException(
Messages.getMessage("serviceFactoryIllegalServiceInterface"));
}
if (!(javax.xml.rpc.Service.class).isAssignableFrom(serviceInterface))
{
throw new ServiceException(
Messages.getMessage("serviceFactoryServiceInterfaceRequirement", serviceInterface.getName()));
} else {
String serviceImplementationName = serviceInterface.getName() + SERVICE_IMPLEMENTATION_SUFFIX;
Service service = createService(serviceImplementationName);
return service;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadService
File: axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
Repository: apache/axis-axis1-java
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-51441
|
HIGH
| 7.2
|
apache/axis-axis1-java
|
loadService
|
axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
|
685c309febc64aa393b2d64a05f90e7eb9f73e06
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOpen() {
synchronized (mLock) {
return mConnectionPoolLocked != null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOpen
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
isOpen
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void operationComplete(int result) {
// got the callback, and our preflightFullBackup() method is waiting for the result
if (MORE_DEBUG) {
Slog.i(TAG, "Preflight op complete, result=" + result);
}
mResult.set(result);
mLatch.countDown();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: operationComplete
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
|
operationComplete
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCurrentForm(final Form f) {
if (getActivity() == null) {
return;
}
if(getCurrentForm() == null){
flushGraphics();
}
if(editInProgress()) {
stopEditing(true);
}
super.setCurrentForm(f);
if (isNativeTitle() && !(f instanceof Dialog)) {
getActivity().runOnUiThread(new SetCurrentFormImpl(getActivity(), f));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCurrentForm
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
|
setCurrentForm
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
final String path = exchange.getRelativePath();
if(isForbiddenPath(path)) {
exchange.setStatusCode(StatusCodes.NOT_FOUND);
return;
}
final ServletPathMatch info = paths.getServletHandlerByPath(path);
//https://issues.jboss.org/browse/WFLY-3439
//if the request is an upgrade request then we don't want to redirect
//as there is a good chance the web socket client won't understand the redirect
//we make an exception for HTTP2 upgrade requests, as this would have already be handled at
//the connector level if it was going to be handled.
String upgradeString = exchange.getRequestHeaders().getFirst(Headers.UPGRADE);
boolean isUpgradeRequest = upgradeString != null && !upgradeString.startsWith(HTTP2_UPGRADE_PREFIX);
if (info.getType() == ServletPathMatch.Type.REDIRECT && !isUpgradeRequest) {
//UNDERTOW-89
//we redirect on GET requests to the root context to add an / to the end
if(exchange.getRequestMethod().equals(Methods.GET) || exchange.getRequestMethod().equals(Methods.HEAD)) {
exchange.setStatusCode(StatusCodes.FOUND);
} else {
exchange.setStatusCode(StatusCodes.TEMPORARY_REDIRECT);
}
exchange.getResponseHeaders().put(Headers.LOCATION, RedirectBuilder.redirect(exchange, exchange.getRelativePath() + "/", true));
return;
} else if (info.getType() == ServletPathMatch.Type.REWRITE) {
//this can only happen if the path ends with a /
//otherwise there would be a redirect instead
exchange.setRelativePath(info.getRewriteLocation());
exchange.setRequestPath(exchange.getResolvedPath() + info.getRewriteLocation());
}
final HttpServletResponseImpl response = new HttpServletResponseImpl(exchange, servletContext);
final HttpServletRequestImpl request = new HttpServletRequestImpl(exchange, servletContext);
final ServletRequestContext servletRequestContext = new ServletRequestContext(servletContext.getDeployment(), request, response, info);
//set the max request size if applicable
if (info.getServletChain().getManagedServlet().getMaxRequestSize() > 0) {
exchange.setMaxEntitySize(info.getServletChain().getManagedServlet().getMaxRequestSize());
}
exchange.putAttachment(ServletRequestContext.ATTACHMENT_KEY, servletRequestContext);
exchange.startBlocking(new ServletBlockingHttpExchange(exchange));
servletRequestContext.setServletPathMatch(info);
Executor executor = info.getServletChain().getExecutor();
if (executor == null) {
executor = servletContext.getDeployment().getExecutor();
}
if (exchange.isInIoThread() || executor != null) {
//either the exchange has not been dispatched yet, or we need to use a special executor
exchange.dispatch(executor, dispatchHandler);
} else {
dispatchRequest(exchange, servletRequestContext, info.getServletChain(), DispatcherType.REQUEST);
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2019-10184
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [UNDERTOW-1578] 401 Unauthorized should be returned when requesting a protected directory without trailing slash
Function: handleRequest
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
Fixed Code:
@Override
public void handleRequest(final HttpServerExchange exchange) throws Exception {
final String path = exchange.getRelativePath();
if(isForbiddenPath(path)) {
exchange.setStatusCode(StatusCodes.NOT_FOUND);
return;
}
final ServletPathMatch info = paths.getServletHandlerByPath(path);
if (info.getType() == ServletPathMatch.Type.REWRITE) {
// this can only happen if the path ends with a /
// otherwise there would be a redirect instead
exchange.setRelativePath(info.getRewriteLocation());
exchange.setRequestPath(exchange.getResolvedPath() + info.getRewriteLocation());
}
final HttpServletResponseImpl response = new HttpServletResponseImpl(exchange, servletContext);
final HttpServletRequestImpl request = new HttpServletRequestImpl(exchange, servletContext);
final ServletRequestContext servletRequestContext = new ServletRequestContext(servletContext.getDeployment(), request, response, info);
//set the max request size if applicable
if (info.getServletChain().getManagedServlet().getMaxRequestSize() > 0) {
exchange.setMaxEntitySize(info.getServletChain().getManagedServlet().getMaxRequestSize());
}
exchange.putAttachment(ServletRequestContext.ATTACHMENT_KEY, servletRequestContext);
exchange.startBlocking(new ServletBlockingHttpExchange(exchange));
servletRequestContext.setServletPathMatch(info);
Executor executor = info.getServletChain().getExecutor();
if (executor == null) {
executor = servletContext.getDeployment().getExecutor();
}
if (exchange.isInIoThread() || executor != null) {
//either the exchange has not been dispatched yet, or we need to use a special executor
exchange.dispatch(executor, dispatchHandler);
} else {
dispatchRequest(exchange, servletRequestContext, info.getServletChain(), DispatcherType.REQUEST);
}
}
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
handleRequest
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 1
|
Analyze the following code function for security vulnerabilities
|
private void cloneDocumentArchive(XWikiDocument originalDocument) throws XWikiException
{
XWikiDocumentArchive documentArchive = originalDocument.getDocumentArchive();
if (documentArchive != null) {
this.setDocumentArchive(documentArchive.clone(this.getId(), getXWikiContext()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cloneDocumentArchive
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
|
cloneDocumentArchive
|
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
|
@Transactional
@Nonnull
public <E extends KrailEntity<ID, VER>> E save(@Nonnull E entity) {
checkNotNull(entity);
EntityManager entityManager = entityManagerProvider.get();
if (entity.getId() == null) {
entityManager.persist(entity);
log.debug("{} persisted", entity);
return entity;
}
@SuppressWarnings("unchecked") Optional<E> fEntity = findById((Class<E>) entity.getClass(), entity.getId());
if (fEntity.isPresent()) {
E managedEntity = entityManager.merge(entity);
log.debug("{} persisted", managedEntity);
return managedEntity;
} else {
entityManager.persist(entity);
log.debug("{} persisted", entity);
return entity;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
save
|
src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
public void backupAgentCreated(String agentPackageName, IBinder agent) {
if (DEBUG_BACKUP) Slog.v(TAG, "backupAgentCreated: " + agentPackageName
+ " = " + agent);
synchronized(this) {
if (!agentPackageName.equals(mBackupAppName)) {
Slog.e(TAG, "Backup agent created for " + agentPackageName + " but not requested!");
return;
}
}
long oldIdent = Binder.clearCallingIdentity();
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
bm.agentConnected(agentPackageName, agent);
} catch (RemoteException e) {
// can't happen; the backup manager service is local
} catch (Exception e) {
Slog.w(TAG, "Exception trying to deliver BackupAgent binding: ");
e.printStackTrace();
} finally {
Binder.restoreCallingIdentity(oldIdent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backupAgentCreated
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
backupAgentCreated
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public XmlGenerator node(String name, Object contents, Object... attributes) {
appendNode(xml, name, contents, attributes);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: node
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
node
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initServerPreFragment(Bundle savedInstanceState) {
// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)
if (savedInstanceState == null) {
if (mAccount != null) {
String baseUrl = mAccountMgr.getUserData(mAccount, Constants.KEY_OC_BASE_URL);
if (TextUtils.isEmpty(baseUrl)) {
mServerInfo.mBaseUrl = "";
} else {
mServerInfo.mBaseUrl = baseUrl;
}
// TODO do next in a setter for mBaseUrl
mServerInfo.mIsSslConn = mServerInfo.mBaseUrl.startsWith(HTTPS_PROTOCOL);
mServerInfo.mVersion = accountManager.getServerVersion(mAccount);
} else {
mServerInfo.mBaseUrl = getString(R.string.webview_login_url).trim();
mServerInfo.mIsSslConn = mServerInfo.mBaseUrl.startsWith(HTTPS_PROTOCOL);
}
} else {
mServerStatusText = savedInstanceState.getString(KEY_SERVER_STATUS_TEXT);
mServerStatusIcon = savedInstanceState.getInt(KEY_SERVER_STATUS_ICON);
// TODO parcelable
mServerInfo.mIsSslConn = savedInstanceState.getBoolean(KEY_IS_SSL_CONN);
mServerInfo.mBaseUrl = savedInstanceState.getString(KEY_HOST_URL_TEXT);
String ocVersion = savedInstanceState.getString(KEY_OC_VERSION);
if (ocVersion != null) {
mServerInfo.mVersion = new OwnCloudVersion(ocVersion);
}
mServerInfo.mAuthMethod = AuthenticationMethod.valueOf(
savedInstanceState.getString(KEY_SERVER_AUTH_METHOD));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initServerPreFragment
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
initServerPreFragment
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte readByte() throws IOException {
return primitiveTypes.readByte();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readByte
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readByte
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copyMemory(long srcAddr, byte[] dst, int dstIndex, long length) {
PlatformDependent0.copyMemory(null, srcAddr, dst, BYTE_ARRAY_BASE_OFFSET + dstIndex, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyMemory
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
copyMemory
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public int findCookieForPath(@NonNull String path) {
Objects.requireNonNull(path, "path");
synchronized (this) {
ensureValidLocked();
final int count = mApkAssets.length;
for (int i = 0; i < count; i++) {
if (path.equals(mApkAssets[i].getAssetPath())) {
return i + 1;
}
}
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findCookieForPath
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
|
findCookieForPath
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@CriticalNative
/*package*/ static final native int nativeGetName(long state);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetName
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetName
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAuthorizationConfigured() {
return WITHOUT_AUTHENTICATION.equals(securityIdentifier) == false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAuthorizationConfigured
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
isAuthorizationConfigured
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void checkApiScenarioUseUrl() {
List<String> noUrlScenarioIdList = extApiScenarioMapper.selectIdsByUseUrlIsNull();
for (String id : noUrlScenarioIdList) {
ApiScenarioWithBLOBs scenario = apiScenarioMapper.selectByPrimaryKey(id);
if (scenario.getUseUrl() == null) {
List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenario);
if (useUrl != null) {
ApiScenarioWithBLOBs updateModel = new ApiScenarioWithBLOBs();
updateModel.setId(scenario.getId());
updateModel.setUseUrl(JSONArray.toJSONString(useUrl));
apiScenarioMapper.updateByPrimaryKeySelective(updateModel);
apiScenarioReferenceIdService.saveByApiScenario(updateModel);
updateModel = null;
}
}
scenario = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkApiScenarioUseUrl
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
checkApiScenarioUseUrl
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
public ContentProviderHolder getContentProvider(IApplicationThread caller,
String name, int userId, boolean stable) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentProvider
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getContentProvider
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public <V, P> Column<T, V> addColumn(ValueProvider<T, V> valueProvider,
ValueProvider<V, P> presentationProvider,
AbstractRenderer<? super T, ? super P> renderer) {
String generatedIdentifier = getGeneratedIdentifier();
Column<T, V> column = createColumn(valueProvider, presentationProvider,
renderer);
addColumn(generatedIdentifier, column);
return column;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addColumn
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
|
addColumn
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void optimisticDelete(Path path) {
if (path == null) {
return;
}
try {
Files.delete(path);
} catch (IOException ignored) {
// ignored
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optimisticDelete
File: pf4j/src/main/java/org/pf4j/util/FileUtils.java
Repository: pf4j
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-40827
|
HIGH
| 7.5
|
pf4j
|
optimisticDelete
|
pf4j/src/main/java/org/pf4j/util/FileUtils.java
|
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsInt01Nanoseconds() throws Exception
{
Instant date = Instant.ofEpochSecond(0L);
Instant value = MAPPER.readerFor(Instant.class)
.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue("0");
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsInt01Nanoseconds
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsInt01Nanoseconds
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void launchAssistAction(String hint) {
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_ASSIST);
Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
.getAssistIntent(mContext, true, UserHandle.USER_CURRENT);
if (intent != null) {
if (hint != null) {
intent.putExtra(hint, true);
}
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivityAsUser(intent, UserHandle.CURRENT);
} catch (ActivityNotFoundException e) {
Slog.w(TAG, "No activity to handle assist action.", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: launchAssistAction
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
launchAssistAction
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public int deleteByCategoryIds(short siteId, Integer[] categoryIds) {
return dao.deleteByCategoryIds(siteId, categoryIds);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteByCategoryIds
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
deleteByCategoryIds
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearAttributes() {
attrs.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearAttributes
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
clearAttributes
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getFolder() {
return folder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFolder
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getFolder
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getRelativePath(
RequestContext requestContext
) {
HttpServletRequest req = requestContext.getHttpServletRequest();
return req.getServletPath();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelativePath
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
getRelativePath
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void readLegacyPermissionsTEMP(
@NonNull LegacyPermissionSettings legacyPermissionSettings) {
mPermissionManagerServiceImpl.readLegacyPermissionsTEMP(legacyPermissionSettings);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLegacyPermissionsTEMP
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
readLegacyPermissionsTEMP
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void takeScreenshot() {
synchronized (mScreenshotLock) {
if (mScreenshotConnection != null) {
return;
}
ComponentName cn = new ComponentName("com.android.systemui",
"com.android.systemui.screenshot.TakeScreenshotService");
Intent intent = new Intent();
intent.setComponent(cn);
ServiceConnection conn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
synchronized (mScreenshotLock) {
if (mScreenshotConnection != this) {
return;
}
Messenger messenger = new Messenger(service);
Message msg = Message.obtain(null, 1);
final ServiceConnection myConn = this;
Handler h = new Handler(mHandler.getLooper()) {
@Override
public void handleMessage(Message msg) {
synchronized (mScreenshotLock) {
if (mScreenshotConnection == myConn) {
mContext.unbindService(mScreenshotConnection);
mScreenshotConnection = null;
mHandler.removeCallbacks(mScreenshotTimeout);
}
}
}
};
msg.replyTo = new Messenger(h);
msg.arg1 = msg.arg2 = 0;
if (mStatusBar != null && mStatusBar.isVisibleLw())
msg.arg1 = 1;
if (mNavigationBar != null && mNavigationBar.isVisibleLw())
msg.arg2 = 1;
try {
messenger.send(msg);
} catch (RemoteException e) {
}
}
}
@Override
public void onServiceDisconnected(ComponentName name) {}
};
if (mContext.bindServiceAsUser(
intent, conn, Context.BIND_AUTO_CREATE, UserHandle.CURRENT)) {
mScreenshotConnection = conn;
mHandler.postDelayed(mScreenshotTimeout, 10000);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: takeScreenshot
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
takeScreenshot
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public char nextClean() throws JSONException {
for (;;) {
char c = this.next();
if (c == 0 || c > ' ') {
return c;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextClean
File: src/main/java/org/json/JSONTokener.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45690
|
HIGH
| 7.5
|
stleary/JSON-java
|
nextClean
|
src/main/java/org/json/JSONTokener.java
|
7a124d857dc8da1165c87fa788e53359a317d0f7
| 0
|
Analyze the following code function for security vulnerabilities
|
void reportGlobalUsageEvent(int event) {
final int currentUserId = mUserController.getCurrentUserId();
mUsageStatsService.reportEvent(Event.DEVICE_EVENT_PACKAGE_NAME, currentUserId, event);
int[] profiles = mUserController.getCurrentProfileIds();
if (profiles != null) {
for (int i = profiles.length - 1; i >= 0; i--) {
if (profiles[i] == currentUserId) {
continue;
}
mUsageStatsService.reportEvent(Event.DEVICE_EVENT_PACKAGE_NAME, profiles[i], event);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportGlobalUsageEvent
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
|
reportGlobalUsageEvent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean checkAtmosphereSupport() {
String rawVersion = AtmospherePushConnection.getAtmosphereVersion();
if (rawVersion == null) {
return false;
}
if (!Constants.REQUIRED_ATMOSPHERE_RUNTIME_VERSION.equals(rawVersion)) {
getLogger().warn(INVALID_ATMOSPHERE_VERSION_WARNING,
new Object[] {
Constants.REQUIRED_ATMOSPHERE_RUNTIME_VERSION,
rawVersion });
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAtmosphereSupport
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
checkAtmosphereSupport
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("topic:good")
@GetMapping("/good")
@ResponseBody
public Result good(Integer id) {
Topic topic = topicService.selectById(id);
topic.setGood(!topic.getGood());
topicService.update(topic, null);
return success();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: good
File: src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
good
|
src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("survey/{nodeId}/configuration")
@Operation(summary = "Attach the run-time configuration", description = "This attaches the run-time configuration onto a given survey element")
@ApiResponse(responseCode = "200", description = "The test node configuration", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = SurveyConfigVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = SurveyConfigVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or task node not found")
@ApiResponse(responseCode = "406", description = "The call is not applicable to survey course node")
@ApiResponse(responseCode = "409", description = "The configuration is not valid")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response addSurveyConfigurationPost(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId,
@QueryParam("allowCancel") @DefaultValue("false") Boolean allowCancel,
@QueryParam("allowNavigation") @DefaultValue("false") Boolean allowNavigation,
@QueryParam("allowSuspend") @DefaultValue("false") Boolean allowSuspend,
@QueryParam("sequencePresentation") @DefaultValue(AssessmentInstance.QMD_ENTRY_SEQUENCE_ITEM) String sequencePresentation,
@QueryParam("showNavigation") @DefaultValue("true") Boolean showNavigation,
@QueryParam("showQuestionTitle") @DefaultValue("true") Boolean showQuestionTitle,
@QueryParam("showSectionsOnly") @DefaultValue("false") Boolean showSectionsOnly,
@Context HttpServletRequest request) {
return addSurveyConfiguration(courseId, nodeId, allowCancel, allowNavigation, allowSuspend, sequencePresentation, showNavigation, showQuestionTitle, showSectionsOnly, request);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSurveyConfigurationPost
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
addSurveyConfigurationPost
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setHeaderVisible(boolean visible) {
header.setVisible(visible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHeaderVisible
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
|
setHeaderVisible
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasChangeTracker(NodeFeature nodeFeature) {
return changes != null && changes.containsKey(nodeFeature.getClass());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasChangeTracker
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
hasChangeTracker
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
String getTagForIntentSenderLocked(PendingIntentRecord res, String prefix) {
final Intent intent = res.key.requestIntent;
if (intent != null) {
if (res.lastTag != null && res.lastTagPrefix == prefix && (res.lastTagPrefix == null
|| res.lastTagPrefix.equals(prefix))) {
return res.lastTag;
}
res.lastTagPrefix = prefix;
final StringBuilder sb = new StringBuilder(128);
if (prefix != null) {
sb.append(prefix);
}
if (intent.getAction() != null) {
sb.append(intent.getAction());
} else if (intent.getComponent() != null) {
intent.getComponent().appendShortString(sb);
} else {
sb.append("?");
}
return res.lastTag = sb.toString();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTagForIntentSenderLocked
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
|
getTagForIntentSenderLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<SCMDescriptor<?>> getSCMDescriptors(AbstractProject<?,?> project) {
return SCM._for(project);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSCMDescriptors
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getSCMDescriptors
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean registerIntentSenderCancelListenerEx(
IIntentSender sender, IResultReceiver receiver) {
return mPendingIntentController.registerIntentSenderCancelListener(sender, receiver);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerIntentSenderCancelListenerEx
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
|
registerIntentSenderCancelListenerEx
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String padRight(String input, int size) {
return (new PrintfFormat("%-" + size + "s")).sprintf(input);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: padRight
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
padRight
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addWarning(SQLWarning warnings) {
if (this.warnings != null) {
this.warnings.setNextWarning(warnings);
} else {
this.warnings = warnings;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addWarning
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
addWarning
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Map<Integer, String> getSupportedSchemeNames(int maxSdkVersion) {
Map<Integer, String> supportedSchemeNames;
if (maxSdkVersion >= AndroidSdkVersion.P) {
supportedSchemeNames = SUPPORTED_APK_SIG_SCHEME_NAMES;
} else if (maxSdkVersion >= AndroidSdkVersion.N) {
supportedSchemeNames = new HashMap<>(1);
supportedSchemeNames.put(ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2,
SUPPORTED_APK_SIG_SCHEME_NAMES.get(
ApkSigningBlockUtils.VERSION_APK_SIGNATURE_SCHEME_V2));
} else {
supportedSchemeNames = Collections.emptyMap();
}
return supportedSchemeNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSupportedSchemeNames
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getSupportedSchemeNames
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) {
// Will serve all static file are under "/public" in classpath if the route isn't consumed by others routes.
staticFileLocation("/public");
get("/hello", (request, response) -> {
return "Hello World!";
});
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-9159
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix for #981, patch 2 (#988)
Function: main
File: src/test/java/spark/examples/staticresources/StaticResources.java
Repository: perwendel/spark
Fixed Code:
public static void main(String[] args) {
// Will serve all static file are under "/public" in classpath if the route isn't consumed by others routes.
staticFiles.location("/public");
get("/hello", (request, response) -> {
return "Hello World!";
});
}
|
[
"CWE-22"
] |
CVE-2018-9159
|
MEDIUM
| 5
|
perwendel/spark
|
main
|
src/test/java/spark/examples/staticresources/StaticResources.java
|
030e9d00125cbd1ad759668f85488aba1019c668
| 1
|
Analyze the following code function for security vulnerabilities
|
private void performCall() {
int inCallFlag;
if (isVoiceOnlyCall) {
inCallFlag = Participant.InCallFlags.IN_CALL + Participant.InCallFlags.WITH_AUDIO;
} else {
inCallFlag =
Participant.InCallFlags.IN_CALL + Participant.InCallFlags.WITH_AUDIO + Participant.InCallFlags.WITH_VIDEO;
}
int apiVersion = ApiUtils.getCallApiVersion(conversationUser, new int[]{ApiUtils.APIv4, 1});
ncApi.joinCall(
credentials,
ApiUtils.getUrlForCall(apiVersion, baseUrl, roomToken),
inCallFlag,
isCallWithoutNotification)
.subscribeOn(Schedulers.io())
.retry(3)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<GenericOverall>() {
@Override
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
// unused atm
}
@Override
public void onNext(@io.reactivex.annotations.NonNull GenericOverall genericOverall) {
if (!currentCallStatus.equals(CallStatus.LEAVING)) {
setCallState(CallStatus.JOINED);
ApplicationWideCurrentRoomHolder.getInstance().setInCall(true);
ApplicationWideCurrentRoomHolder.getInstance().setDialing(false);
if (!TextUtils.isEmpty(roomToken)) {
NotificationUtils.INSTANCE.cancelExistingNotificationsForRoom(getApplicationContext(),
conversationUser,
roomToken);
}
if (!hasExternalSignalingServer) {
int apiVersion = ApiUtils.getSignalingApiVersion(conversationUser,
new int[]{ApiUtils.APIv3, 2, 1});
ncApi.pullSignalingMessages(credentials,
ApiUtils.getUrlForSignaling(apiVersion,
baseUrl,
roomToken))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.repeatWhen(observable -> observable)
.takeWhile(observable -> isConnectionEstablished())
.retry(3, observable -> isConnectionEstablished())
.subscribe(new Observer<SignalingOverall>() {
@Override
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
signalingDisposable = d;
}
@Override
public void onNext(
@io.reactivex.annotations.NonNull
SignalingOverall signalingOverall) {
receivedSignalingMessages(signalingOverall.getOcs().getSignalings());
}
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
dispose(signalingDisposable);
}
@Override
public void onComplete() {
dispose(signalingDisposable);
}
});
}
}
}
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
// unused atm
}
@Override
public void onComplete() {
// unused atm
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performCall
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
performCall
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleDeploymentSessionConfig(DeploymentInfo deploymentInfo, ServletContextImpl servletContext) {
SessionCookieConfigImpl sessionCookieConfig = servletContext.getSessionCookieConfig();
ServletSessionConfig sc = deploymentInfo.getServletSessionConfig();
if (sc != null) {
sessionCookieConfig.setName(sc.getName());
sessionCookieConfig.setComment(sc.getComment());
sessionCookieConfig.setDomain(sc.getDomain());
sessionCookieConfig.setHttpOnly(sc.isHttpOnly());
sessionCookieConfig.setMaxAge(sc.getMaxAge());
if(sc.getPath() != null) {
sessionCookieConfig.setPath(sc.getPath());
} else {
sessionCookieConfig.setPath(deploymentInfo.getContextPath());
}
sessionCookieConfig.setSecure(sc.isSecure());
if (sc.getSessionTrackingModes() != null) {
servletContext.setDefaultSessionTrackingModes(new HashSet<>(sc.getSessionTrackingModes()));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleDeploymentSessionConfig
File: servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
handleDeploymentSessionConfig
|
servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void checkPackageChanges(@UserIdInt int ownerUserId) {
if (DEBUG || DEBUG_REBOOT) {
Slog.d(TAG, "checkPackageChanges() ownerUserId=" + ownerUserId);
}
if (injectIsSafeModeEnabled()) {
Slog.i(TAG, "Safe mode, skipping checkPackageChanges()");
return;
}
final long start = getStatStartTime();
try {
final ArrayList<PackageWithUser> gonePackages = new ArrayList<>();
synchronized (mLock) {
final ShortcutUser user = getUserShortcutsLocked(ownerUserId);
// Find packages that have been uninstalled.
user.forAllPackageItems(spi -> {
if (spi.getPackageInfo().isShadow()) {
return; // Don't delete shadow information.
}
if (!isPackageInstalled(spi.getPackageName(), spi.getPackageUserId())) {
if (DEBUG) {
Slog.d(TAG, "Uninstalled: " + spi.getPackageName()
+ " user " + spi.getPackageUserId());
}
gonePackages.add(PackageWithUser.of(spi));
}
});
if (gonePackages.size() > 0) {
for (int i = gonePackages.size() - 1; i >= 0; i--) {
final PackageWithUser pu = gonePackages.get(i);
cleanUpPackageLocked(pu.packageName, ownerUserId, pu.userId,
/* appStillExists = */ false);
}
}
rescanUpdatedPackagesLocked(ownerUserId, user.getLastAppScanTime());
}
} finally {
logDurationStat(Stats.CHECK_PACKAGE_CHANGES, start);
}
verifyStates();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPackageChanges
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
checkPackageChanges
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUninstallBlocked(ComponentName who, String callerPackage, String packageName,
boolean uninstallBlocked) {
final CallerIdentity caller = getCallerIdentity(who, callerPackage);
Preconditions.checkCallAuthorization((caller.hasAdminComponent()
&& (isProfileOwner(caller) || isDefaultDeviceOwner(caller)
|| isFinancedDeviceOwner(caller)))
|| (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_BLOCK_UNINSTALL)));
final int userId = caller.getUserId();
synchronized (getLockObject()) {
long id = mInjector.binderClearCallingIdentity();
try {
mIPackageManager.setBlockUninstallForUser(packageName, uninstallBlocked, userId);
} catch (RemoteException re) {
// Shouldn't happen.
Slogf.e(LOG_TAG, "Failed to setBlockUninstallForUser", re);
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
if (uninstallBlocked) {
final PackageManagerInternal pmi = mInjector.getPackageManagerInternal();
pmi.removeNonSystemPackageSuspensions(packageName, userId);
pmi.removeDistractingPackageRestrictions(packageName, userId);
pmi.flushPackageRestrictions(userId);
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_UNINSTALL_BLOCKED)
.setAdmin(caller.getPackageName())
.setBoolean(/* isDelegate */ who == null)
.setStrings(packageName)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUninstallBlocked
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
|
setUninstallBlocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public @GroupAlertBehavior int getGroupAlertBehavior() {
return mGroupAlertBehavior;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGroupAlertBehavior
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getGroupAlertBehavior
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void warnIfServiceHasMultipleRoutes(String path, HttpService service) {
if (service instanceof ServiceWithRoutes) {
if (!Flags.reportMaskedRoutes()) {
return;
}
if (((ServiceWithRoutes) service).routes().size() > 0) {
logger.warn("The service has self-defined routes but the routes will be ignored. " +
"It will be served at the route you specified: path={}, service={}. " +
"If this is intended behavior, you can disable this log message by specifying " +
"the -Dcom.linecorp.armeria.reportMaskedRoutes=false JVM option.",
path, service);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: warnIfServiceHasMultipleRoutes
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
warnIfServiceHasMultipleRoutes
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isLocalOnly() {
return mClientModeManager.getRole() == ROLE_CLIENT_LOCAL_ONLY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLocalOnly
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
isLocalOnly
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getURL() {
updateURL();
return url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getURL
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setOauthBasePath(String basePath) {
for(Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setBasePath(basePath);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthBasePath
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthBasePath
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ResolveInfo getResolveInfo() {
return mSourceInfo != null ? mSourceInfo.getResolveInfo() : mBackupResolveInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResolveInfo
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getResolveInfo
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T> void assertSuccess(TestContext context, AsyncResult<T> result) {
if (result.failed()) {
setRootLevel(Level.DEBUG);
context.fail(result.cause());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assertSuccess
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
assertSuccess
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isActivityStartsLoggingEnabled() {
return mConstants.mFlagActivityStartsLoggingEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isActivityStartsLoggingEnabled
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
|
isActivityStartsLoggingEnabled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
default OptionalLong contentLength() {
Optional<Long> optional = getFirst(HttpHeaders.CONTENT_LENGTH, Long.class);
return optional.map(OptionalLong::of).orElseGet(OptionalLong::empty);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2022-21700
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Use ConversionContext constants where possible instead of class (#2356)
Changes
-------
* Added ArgumentConversionContext constants in ConversionContext
* Replaced Argument.of and use of argument classes with
ConversionContext constants where possible
* Added getFirst method in ConvertibleMultiValues that accepts
ArgumentConversionContent parameter
Partially addresses issue #2355
Function: contentLength
File: http/src/main/java/io/micronaut/http/HttpHeaders.java
Repository: micronaut-projects/micronaut-core
Fixed Code:
default OptionalLong contentLength() {
Optional<Long> optional = getFirst(HttpHeaders.CONTENT_LENGTH, ConversionContext.LONG);
return optional.map(OptionalLong::of).orElseGet(OptionalLong::empty);
}
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
contentLength
|
http/src/main/java/io/micronaut/http/HttpHeaders.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onStart() {
super.onStart();
final int theme = findTheme();
if (this.mTheme != theme) {
recreate();
} else {
if (pendingViewIntent.peek() == null) {
askForContactsPermissions();
}
}
mConferenceAdapter.refreshSettings();
mContactsAdapter.refreshSettings();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStart
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onStart
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void createTemplateItem(Context context, Collection collection) throws SQLException, AuthorizeException {
// Check authorisation
AuthorizeUtil.authorizeManageTemplateItem(context, collection);
if (collection.getTemplateItem() == null) {
Item template = itemService.createTemplateItem(context, collection);
collection.setTemplateItem(template);
log.info(LogHelper.getHeader(context, "create_template_item",
"collection_id=" + collection.getID() + ",template_item_id="
+ template.getID()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTemplateItem
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
createTemplateItem
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
void startAppProblemLocked(ProcessRecord app) {
// If this app is not running under the current user, then we
// can't give it a report button because that would require
// launching the report UI under a different user.
app.errorReportReceiver = null;
for (int userId : mCurrentProfileIds) {
if (app.userId == userId) {
app.errorReportReceiver = ApplicationErrorReport.getErrorReportReceiver(
mContext, app.info.packageName, app.info.flags);
}
}
skipCurrentReceiverLocked(app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAppProblemLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startAppProblemLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean keyEquals(@Nullable AsciiString a, CharSequence b) {
return a != null && (a == b || a.contentEqualsIgnoreCase(b));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyEquals
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
|
keyEquals
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public MessageHandler getHandler() {
return handler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHandler
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
getHandler
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PrintWriter getWriter() throws IOException {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWriter
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
|
getWriter
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNotInConditionSQL(String column, Object param) {
StringBuilder inStatement = new StringBuilder();
inStatement.append(column);
inStatement.append(" NOT IN (");
for (Object p : (Collection<?>) param) {
inStatement.append(getParameterSQL(p) + ",");
}
inStatement.deleteCharAt(inStatement.length()-1);
inStatement.append(")");
return inStatement.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotInConditionSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getNotInConditionSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
static String getSipProfileNameFromPhoneAccount(PhoneAccountHandle phoneAccountHandle) {
if (phoneAccountHandle == null) {
return null;
}
String sipProfileName = phoneAccountHandle.getId();
if (TextUtils.isEmpty(sipProfileName)) {
return null;
}
return sipProfileName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSipProfileNameFromPhoneAccount
File: sip/src/com/android/services/telephony/sip/SipUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
getSipProfileNameFromPhoneAccount
|
sip/src/com/android/services/telephony/sip/SipUtil.java
|
a294ae5342410431a568126183efe86261668b5d
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean cleanupAppInLaunchingProvidersLocked(ProcessRecord app, boolean alwaysBad) {
// Look through the content providers we are waiting to have launched,
// and if any run in this process then either schedule a restart of
// the process or kill the client waiting for it if this process has
// gone bad.
boolean restart = false;
for (int i = mLaunchingProviders.size() - 1; i >= 0; i--) {
ContentProviderRecord cpr = mLaunchingProviders.get(i);
if (cpr.launchingApp == app) {
if (!alwaysBad && !app.bad && cpr.hasConnectionOrHandle()) {
restart = true;
} else {
removeDyingProviderLocked(app, cpr, true);
}
}
}
return restart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupAppInLaunchingProvidersLocked
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
|
cleanupAppInLaunchingProvidersLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.