instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public String display(String fieldname, BaseObject obj, XWikiContext context)
{
String type = null;
try {
type = (String) context.get("display");
} catch (Exception e) {
}
if (type == null) {
type = "view";
}
return display(fieldname, type, obj, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
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
|
display
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ByteBufferPool getByteBufferPool() {
return bufferPool;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByteBufferPool
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
getByteBufferPool
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUserEnabled(int userId) {
checkManageUsersPermission("enable user");
synchronized (mPackagesLock) {
UserInfo info = getUserInfoLocked(userId);
if (info != null && !info.isEnabled()) {
info.flags ^= UserInfo.FLAG_DISABLED;
writeUserLocked(info);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserEnabled
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
setUserEnabled
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
private Charset getCharset(final String encoding) {
return encoding == null || encoding.isEmpty()
? Charset.defaultCharset()
: Charset.forName(encoding);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCharset
File: src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
Repository: jlangch/venice
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-36007
|
LOW
| 3.3
|
jlangch/venice
|
getCharset
|
src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
|
c942c73136333bc493050910f171a48e6f575b23
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected String getJDBCUrl(Map<String, ?> params) throws IOException {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJDBCUrl
File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getJDBCUrl
|
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void deleteByCriterionFailedConnection(TestContext context) {
createFoo(context).delete(Future.failedFuture("okapi"), FOO, new Criterion(), context.asyncAssertFailure(fail -> {
context.assertTrue(fail.getMessage().contains("okapi"));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteByCriterionFailedConnection
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
|
deleteByCriterionFailedConnection
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
ActiveAdmin getActiveAdminOrCheckPermissionForCallerLocked(
ComponentName who,
int reqPolicy,
@Nullable String permission) throws SecurityException {
return getActiveAdminOrCheckPermissionsForCallerLocked(
who, reqPolicy, permission == null ? Set.of() : Set.of(permission));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminOrCheckPermissionForCallerLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getActiveAdminOrCheckPermissionForCallerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
Entity<?> entity;
if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart();
for (Entry<String, Object> param: formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey())
.fileName(file.getName()).size(file.length()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
} else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
}
}
entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE);
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
Form form = new Form();
for (Entry<String, Object> param: formParams.entrySet()) {
form.param(param.getKey(), parameterToString(param.getValue()));
}
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
} else {
// We let jersey handle the serialization
if (isBodyNullable) { // payload is nullable
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "null" : obj, contentType);
}
} else {
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "" : obj, contentType);
}
}
}
return entity;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: samples/client/petstore/java/okhttp-gson/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
|
serialize
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processAddConsumer(ConsumerInfo info) throws Exception {
SessionId sessionId = info.getConsumerId().getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
if (cs == null) {
throw new IllegalStateException("Cannot add a consumer to a connection that had not been registered: "
+ connectionId);
}
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException(broker.getBrokerName()
+ " Cannot add a consumer to a session that had not been registered: " + sessionId);
}
// Avoid replaying dup commands
if (!ss.getConsumerIds().contains(info.getConsumerId())) {
ActiveMQDestination destination = info.getDestination();
if (destination != null && !AdvisorySupport.isAdvisoryTopic(destination)) {
if (getConsumerCount(connectionId) >= connector.getMaximumConsumersAllowedPerConnection()){
throw new IllegalStateException("Can't add consumer on connection " + connectionId + ": at maximum limit: " + connector.getMaximumConsumersAllowedPerConnection());
}
}
broker.addConsumer(cs.getContext(), info);
try {
ss.addConsumer(info);
addConsumerBrokerExchange(info.getConsumerId());
} catch (IllegalStateException e) {
broker.removeConsumer(cs.getContext(), info);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processAddConsumer
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processAddConsumer
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addCustomFields(IssuesUpdateRequest issuesRequest, MultiValueMap<String, Object> paramMap) {
List<CustomFieldItemDTO> customFields = issuesRequest.getRequestFields();
if (!CollectionUtils.isEmpty(customFields)) {
customFields.forEach(item -> {
if (StringUtils.isNotBlank(item.getCustomData())) {
if (item.getValue() instanceof String) {
paramMap.add(item.getCustomData(), ((String) item.getValue()).trim());
} else {
paramMap.add(item.getCustomData(), item.getValue());
}
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCustomFields
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
addCustomFields
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
void setVisibleBehindActivity(ActivityRecord r) {
mVisibleBehindActivity = r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVisibleBehindActivity
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
setVisibleBehindActivity
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean showToCurrentUser() {
// Child windows are evaluated based on their parent window.
final WindowState win = getTopParentWindow();
if (win.mAttrs.type < FIRST_SYSTEM_WINDOW
&& win.mActivityRecord != null && win.mActivityRecord.mShowForAllUsers) {
// All window frames that are fullscreen extend above status bar, but some don't extend
// below navigation bar. Thus, check for display frame for top/left and stable frame for
// bottom right.
if (win.getFrame().left <= win.getDisplayFrame().left
&& win.getFrame().top <= win.getDisplayFrame().top
&& win.getFrame().right >= win.getDisplayFrame().right
&& win.getFrame().bottom >= win.getDisplayFrame().bottom) {
// Is a fullscreen window, like the clock alarm. Show to everyone.
return true;
}
}
return win.showForAllUsers()
|| mWmService.isCurrentProfile(win.mShowUserId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showToCurrentUser
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
showToCurrentUser
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean updateOverrideApn(@NonNull ComponentName admin, int apnId,
@NonNull ApnSetting apnSetting) {
throwIfParentInstance("updateOverrideApn");
if (mService != null) {
try {
return mService.updateOverrideApn(admin, apnId, apnSetting);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateOverrideApn
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
|
updateOverrideApn
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isPrimary() {
return mClientModeManager.getRole() == ROLE_CLIENT_PRIMARY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPrimary
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
|
isPrimary
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection post(final String path1, final String path2,
final String path3, final Route.OneArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{post(path1, handler), post(path2, handler), post(path3, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: post
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
post
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public void readMessageEnd() {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readMessageEnd
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readMessageEnd
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
private void synchronizeFolder(OCFile folder) {
if (mFailedResultsCounter > MAX_FAILED_RESULTS || isFinisher(mLastFailedResult)) {
return;
}
// folder synchronization
RefreshFolderOperation synchFolderOp = new RefreshFolderOperation(folder,
mCurrentSyncTime,
true,
false,
getStorageManager(),
getUser(),
getContext());
RemoteOperationResult result = synchFolderOp.execute(getClient());
// synchronized folder -> notice to UI - ALWAYS, although !result.isSuccess
sendLocalBroadcast(EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED, folder.getRemotePath(), result);
// check the result of synchronizing the folder
if (result.isSuccess() || result.getCode() == ResultCode.SYNC_CONFLICT) {
if (result.getCode() == ResultCode.SYNC_CONFLICT) {
mConflictsFound += synchFolderOp.getConflictsFound();
mFailsInFavouritesFound += synchFolderOp.getFailsInKeptInSyncFound();
}
if (synchFolderOp.getForgottenLocalFiles().size() > 0) {
mForgottenLocalFiles.putAll(synchFolderOp.getForgottenLocalFiles());
}
if (result.isSuccess()) {
// synchronize children folders
List<OCFile> children = synchFolderOp.getChildren();
// beware of the 'hidden' recursion here!
syncChildren(children);
}
} else if (result.getCode() != ResultCode.FILE_NOT_FOUND) {
// in failures, the statistics for the global result are updated
if (RemoteOperationResult.ResultCode.UNAUTHORIZED.equals(result.getCode())) {
mSyncResult.stats.numAuthExceptions++;
} else if (result.getException() instanceof DavException) {
mSyncResult.stats.numParseExceptions++;
} else if (result.getException() instanceof IOException) {
mSyncResult.stats.numIoExceptions++;
}
mFailedResultsCounter++;
mLastFailedResult = result;
} // else, ResultCode.FILE_NOT_FOUND is ignored, remote folder was
// removed from other thread or other client during the synchronization,
// before this thread fetched its contents
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: synchronizeFolder
File: src/main/java/com/owncloud/android/syncadapter/FileSyncAdapter.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
synchronizeFolder
|
src/main/java/com/owncloud/android/syncadapter/FileSyncAdapter.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> ListenableFuture<T> execute(final Request request, final AsyncHandler<T> handler) throws IOException {
if (clientTransport.isStopped()) {
throw new IOException("AsyncHttpClient has been closed.");
}
final ProxyServer proxy = ProxyUtils.getProxyServer(clientConfig, request);
final GrizzlyResponseFuture<T> future = new GrizzlyResponseFuture<T>(this, request, handler, proxy);
future.setDelegate(SafeFutureImpl.<T> create());
final CompletionHandler<Connection> connectHandler = new CompletionHandler<Connection>() {
@Override
public void cancelled() {
future.cancel(true);
}
@Override
public void failed(final Throwable throwable) {
future.abort(throwable);
}
@Override
public void completed(final Connection c) {
try {
touchConnection(c, request);
execute(c, request, handler, future, null);
} catch (Exception e) {
failed(e);
}
}
@Override
public void updated(final Connection c) {
// no-op
}
};
connectionManager.doTrackedConnection(request, future, connectHandler);
return future;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
execute
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDescriptor(Descriptor descriptor) {
this.descriptor = descriptor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDescriptor
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraintValue.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setDescriptor
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraintValue.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendSettingsAck() {
if(!initialSettingsSent) {
sendSettings();
initialSettingsSent = true;
}
Http2SettingsStreamSinkChannel stream = new Http2SettingsStreamSinkChannel(this);
flushChannelIgnoreFailure(stream);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSettingsAck
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
sendSettingsAck
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("defaultcovariatesettings")
@Produces(MediaType.APPLICATION_JSON)
public String getDefaultCovariateSettings(@QueryParam("temporal") final String temporal) {
boolean getTemporal = false;
try {
if (temporal != null && !temporal.isEmpty()) {
getTemporal = Boolean.parseBoolean(temporal);
}
} catch (Exception e) {
throw new IllegalArgumentException("The parameter temporal must be a string of true or false.");
}
FeatureExtraction.init(null);
String settings = "";
if (getTemporal) {
settings = FeatureExtraction.getDefaultPrespecTemporalAnalyses();
} else {
settings = FeatureExtraction.getDefaultPrespecAnalyses();
}
return settings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultCovariateSettings
File: src/main/java/org/ohdsi/webapi/service/FeatureExtractionService.java
Repository: OHDSI/WebAPI
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15563
|
HIGH
| 7.5
|
OHDSI/WebAPI
|
getDefaultCovariateSettings
|
src/main/java/org/ohdsi/webapi/service/FeatureExtractionService.java
|
b3944074a1976c95d500239cbbf0741917ed75ca
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void appendPipelineUniqueCriteria(Map<String, Object> basicCriteria) {
basicCriteria.put("dest", folder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendPipelineUniqueCriteria
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
appendPipelineUniqueCriteria
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(List<String> spaces, String page, String action, String queryString)
{
List<String> path = new ArrayList<>(spaces);
path.add(page);
return getURL(action, path.toArray(new String[] {}), queryString);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
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
|
getURL
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetKeyguardDonePendingLocked() {
mKeyguardDonePending = false;
mHandler.removeMessages(KEYGUARD_DONE_PENDING_TIMEOUT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetKeyguardDonePendingLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
resetKeyguardDonePendingLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<Account, Integer> getAccountsAndVisibilityForPackage(String packageName,
List<String> accountTypes, Integer callingUid, UserAccounts accounts) {
if (!packageExistsForUser(packageName, accounts.userId)) {
Log.d(TAG, "Package not found " + packageName);
return new LinkedHashMap<>();
}
Map<Account, Integer> result = new LinkedHashMap<>();
for (String accountType : accountTypes) {
synchronized (accounts.dbLock) {
synchronized (accounts.cacheLock) {
final Account[] accountsOfType = accounts.accountCache.get(accountType);
if (accountsOfType != null) {
for (Account account : accountsOfType) {
result.put(account,
resolveAccountVisibility(account, packageName, accounts));
}
}
}
}
}
return filterSharedAccounts(accounts, result, callingUid, packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountsAndVisibilityForPackage
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getAccountsAndVisibilityForPackage
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Registration addContextClickListener(
ContextClickEvent.ContextClickListener listener) {
return super.addContextClickListener(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addContextClickListener
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
|
addContextClickListener
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getActionUrl(String itUrl,Action action) {
String urlName = action.getUrlName();
if(urlName==null) return null; // to avoid NPE and fail to render the whole page
try {
if (new URI(urlName).isAbsolute()) {
return urlName;
}
} catch (URISyntaxException x) {
Logger.getLogger(Functions.class.getName()).log(Level.WARNING, "Failed to parse URL for {0}: {1}", new Object[] {action, x});
return null;
}
if(urlName.startsWith("/"))
return joinPath(Stapler.getCurrentRequest().getContextPath(),urlName);
else
// relative URL name
return joinPath(Stapler.getCurrentRequest().getContextPath()+'/'+itUrl,urlName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActionUrl
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
|
getActionUrl
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
final void setFloat(CharSequence name, float value) {
set(name, String.valueOf(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFloat
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
|
setFloat
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String selectHeaderAccept(String[] accepts) {
if (accepts.length == 0) {
return null;
}
for (String accept : accepts) {
if (isJsonMime(accept)) {
return accept;
}
}
return StringUtil.join(accepts, ",");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectHeaderAccept
File: samples/client/petstore/java/retrofit2-play26/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
|
selectHeaderAccept
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean setStatusBarDisabledInternal(boolean disabled, int userId) {
long ident = mInjector.binderClearCallingIdentity();
try {
IStatusBarService statusBarService = IStatusBarService.Stub.asInterface(
ServiceManager.checkService(Context.STATUS_BAR_SERVICE));
if (statusBarService != null) {
int flags1 = disabled ? STATUS_BAR_DISABLE_MASK : StatusBarManager.DISABLE_NONE;
int flags2 = disabled ? STATUS_BAR_DISABLE2_MASK : StatusBarManager.DISABLE2_NONE;
statusBarService.disableForUser(flags1, mToken, mContext.getPackageName(), userId);
statusBarService.disable2ForUser(flags2, mToken, mContext.getPackageName(), userId);
return true;
}
} catch (RemoteException e) {
Slogf.e(LOG_TAG, "Failed to disable the status bar", e);
} finally {
mInjector.binderRestoreCallingIdentity(ident);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatusBarDisabledInternal
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
|
setStatusBarDisabledInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
List<Object> values = entry.getValue();
List<String> headers = new ArrayList<String>();
for (Object o : values) {
headers.add(String.valueOf(o));
}
responseHeaders.put(entry.getKey(), headers);
}
return responseHeaders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildResponseHeaders
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
buildResponseHeaders
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void checkCallerIsSystem() {
if (isCallerSystem()) {
return;
}
throw new SecurityException("Disallowed call for uid " + Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCallerIsSystem
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
checkCallerIsSystem
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(anyOf = {
android.Manifest.permission.MANAGE_USERS,
android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
})
public boolean isManagedKiosk() {
throwIfParentInstance("isManagedKiosk");
if (mService != null) {
try {
return mService.isManagedKiosk();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManagedKiosk
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
|
isManagedKiosk
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void negate() {
flags ^= NEGATIVE_FLAG;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: negate
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
negate
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getExpression() {
return expression;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExpression
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
|
getExpression
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initJaxbUnmarshaller(Unmarshaller unmarshaller) throws JAXBException {
if (this.unmarshallerProperties != null) {
for (String name : this.unmarshallerProperties.keySet()) {
unmarshaller.setProperty(name, this.unmarshallerProperties.get(name));
}
}
if (this.unmarshallerListener != null) {
unmarshaller.setListener(this.unmarshallerListener);
}
if (this.validationEventHandler != null) {
unmarshaller.setEventHandler(this.validationEventHandler);
}
if (this.adapters != null) {
for (XmlAdapter<?, ?> adapter : this.adapters) {
unmarshaller.setAdapter(adapter);
}
}
if (this.schema != null) {
unmarshaller.setSchema(this.schema);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initJaxbUnmarshaller
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
initJaxbUnmarshaller
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init(final String controllerUrl, final KieServerConfig config) {
this.config = config;
this.controllerUrl = controllerUrl;
try {
if (container == null) {
container = ContainerProvider.getWebSocketContainer();
}
session = container.connectToServer(this, new ClientEndpointConfig() {
@Override
public Map<String, Object> getUserProperties() {
return Collections.emptyMap();
}
@Override
public List<Class<? extends Encoder>> getEncoders() {
return Collections.emptyList();
}
@Override
public List<Class<? extends Decoder>> getDecoders() {
return Collections.emptyList();
}
@Override
public List<String> getPreferredSubprotocols() {
return Collections.emptyList();
}
@Override
public List<Extension> getExtensions() {
return Collections.emptyList();
}
@Override
public Configurator getConfigurator() {
return new Configurator(){
@Override
public void beforeRequest(Map<String, List<String>> headers) {
super.beforeRequest(headers);
String userName = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_USER, "kieserver");
String password = KeyStoreHelperUtil.loadPassword(config);
String token = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_TOKEN);
if (token != null && !token.isEmpty()) {
headers.put(AUTHORIZATION, Arrays.asList("Bearer " + token));
} else {
try {
headers.put(AUTHORIZATION, Arrays.asList("Basic " + Base64.getEncoder().encodeToString((userName + ':' + password).getBytes("UTF-8"))));
} catch (UnsupportedEncodingException e) {
logger.warn(e.getMessage());
}
}
}
};
}
}, URI.create(controllerUrl));
this.messageHandler = new KieServerMessageHandler(session);
this.closed.set(false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-260
- CVE: CVE-2016-7043
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [RHBMS-4312] Loading pasword from a keystore
Function: init
File: kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
Repository: kiegroup/droolsjbpm-integration
Fixed Code:
public void init(final String controllerUrl, final KieServerConfig config) {
this.config = config;
this.controllerUrl = controllerUrl;
try {
if (container == null) {
container = ContainerProvider.getWebSocketContainer();
}
session = container.connectToServer(this, new ClientEndpointConfig() {
@Override
public Map<String, Object> getUserProperties() {
return Collections.emptyMap();
}
@Override
public List<Class<? extends Encoder>> getEncoders() {
return Collections.emptyList();
}
@Override
public List<Class<? extends Decoder>> getDecoders() {
return Collections.emptyList();
}
@Override
public List<String> getPreferredSubprotocols() {
return Collections.emptyList();
}
@Override
public List<Extension> getExtensions() {
return Collections.emptyList();
}
@Override
public Configurator getConfigurator() {
return new Configurator(){
@Override
public void beforeRequest(Map<String, List<String>> headers) {
super.beforeRequest(headers);
String userName = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_USER, "kieserver");
String password = KeyStoreHelperUtil.loadControllerPassword(config);
String token = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_TOKEN);
if (token != null && !token.isEmpty()) {
headers.put(AUTHORIZATION, Arrays.asList("Bearer " + token));
} else {
try {
headers.put(AUTHORIZATION, Arrays.asList("Basic " + Base64.getEncoder().encodeToString((userName + ':' + password).getBytes("UTF-8"))));
} catch (UnsupportedEncodingException e) {
logger.warn(e.getMessage());
}
}
}
};
}
}, URI.create(controllerUrl));
this.messageHandler = new KieServerMessageHandler(session);
this.closed.set(false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
init
|
kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 1
|
Analyze the following code function for security vulnerabilities
|
public XmlGraphMLReader storeNodeIds() {
this.storeNodeIds = true;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: storeNodeIds
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
storeNodeIds
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateApkInfo(File outDir) throws AndrolibException {
mResTable.initApkInfo(mApkInfo, outDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateApkInfo
File: brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
updateApkInfo
|
brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
String[] getCacheInvalidateNames(AnnotationValue<CacheInvalidate> cacheConfig) {
return getCacheNames(cacheConfig.get(MEMBER_CACHE_NAMES, String[].class).orElse(StringUtils.EMPTY_STRING_ARRAY));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCacheInvalidateNames
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
getCacheInvalidateNames
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private Element routeToHtml(RouteData route) {
String text = route.getUrl();
if (text == null || text.isEmpty()) {
text = "<root>";
}
if (route.getParameters().isEmpty()) {
Element link = new Element(Tag.A).attr("href", route.getUrl())
.text(text);
return new Element(Tag.LI).appendChild(link);
} else {
return new Element(Tag.LI).text(text + " (requires parameter)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: routeToHtml
File: flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25027
|
MEDIUM
| 4.3
|
vaadin/flow
|
routeToHtml
|
flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java
|
cde1389507aac2dc8aa6ae39296765c1ca457b69
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDataType(String dataType) {
attributes.put(DATA_TYPE, dataType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDataType
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setDataType
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String evaluateVelocity(String content, String name)
{
try {
VelocityManager velocityManager = Utils.getComponent(VelocityManager.class);
VelocityContext velocityContext = velocityManager.getVelocityContext();
return evaluateVelocity(content, name, velocityContext);
} catch (Exception e) {
LOGGER.error("Error while parsing velocity template namespace [{}] with content:\n[{}]", name, content, e);
Object[] args = { name };
XWikiException xe = new XWikiException(XWikiException.MODULE_XWIKI_RENDERING,
XWikiException.ERROR_XWIKI_RENDERING_VELOCITY_EXCEPTION, "Error while parsing velocity page {0}", e,
args);
return Util.getHTMLExceptionMessage(xe, null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: evaluateVelocity
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
|
evaluateVelocity
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean allowTaskSnapshot() {
if (newIntents == null) {
return true;
}
// Restrict task snapshot starting window to launcher start, or is same as the last
// delivered intent, or there is no intent at all (eg. task being brought to front). If
// the intent is something else, likely the app is going to show some specific page or
// view, instead of what's left last time.
for (int i = newIntents.size() - 1; i >= 0; i--) {
final Intent intent = newIntents.get(i);
if (intent == null || ActivityRecord.isMainIntent(intent)) {
continue;
}
final boolean sameIntent = mLastNewIntent != null ? mLastNewIntent.filterEquals(intent)
: this.intent.filterEquals(intent);
if (!sameIntent || intent.getExtras() != null) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowTaskSnapshot
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
allowTaskSnapshot
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Date parseDate(String str) {
try {
return dateFormat.parse(str);
} catch (java.text.ParseException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDate
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
parseDate
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
void powerManagerGoToSleep(long time, int reason, int flags) {
mContext.getSystemService(PowerManager.class).goToSleep(time, reason, flags);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: powerManagerGoToSleep
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
|
powerManagerGoToSleep
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("nav-settings/topnav")
public RespBody getsTopNav() {
String s = KVStorage.getCustomValue("TopNav32");
return RespBody.ok(s == null ? null : JSON.parseArray(s));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getsTopNav
File: src/main/java/com/rebuild/web/configuration/NavSettings.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
getsTopNav
|
src/main/java/com/rebuild/web/configuration/NavSettings.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void writeIdentifierToProto(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(HASH_CODE, System.identityHashCode(this));
proto.write(USER_ID, mShowUserId);
final CharSequence title = getWindowTag();
if (title != null) {
proto.write(TITLE, title.toString());
}
proto.end(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeIdentifierToProto
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
writeIdentifierToProto
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addStatusChangeListener(int mask, ISyncStatusObserver callback) {
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
if (syncManager != null && callback != null) {
syncManager.getSyncStorageEngine().addStatusChangeListener(mask, callback);
}
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addStatusChangeListener
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
addStatusChangeListener
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setDemoDeviceStateUnchecked(@UserIdInt int userId, boolean isDemoDevice) {
Slogf.d(LOG_TAG, "setDemoDeviceStateUnchecked(%d, %b)",
userId, isDemoDevice);
if (!isDemoDevice) {
return;
}
synchronized (getLockObject()) {
mInjector.settingsGlobalPutStringForUser(
Settings.Global.DEVICE_DEMO_MODE, Integer.toString(/* value= */ 1), userId);
}
setUserProvisioningState(STATE_USER_SETUP_FINALIZED, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDemoDeviceStateUnchecked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setDemoDeviceStateUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCallerApplicationRestrictionsManagingPackage(String callerPackage) {
return isCallerDelegate(callerPackage, getCallerIdentity().getUid(),
DELEGATION_APP_RESTRICTIONS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerApplicationRestrictionsManagingPackage
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
|
isCallerApplicationRestrictionsManagingPackage
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setDataProvider(int nodesPerLevel, int depth) {
grid.setDataProvider(
new LazyHierarchicalDataProvider(nodesPerLevel, depth) {
@Override
protected Stream<HierarchicalTestBean> fetchChildrenFromBackEnd(
HierarchicalQuery<HierarchicalTestBean, Void> query) {
VaadinRequest currentRequest = VaadinService
.getCurrentRequest();
if (!currentRequest.equals(lastRequest)) {
requestCount++;
}
lastRequest = currentRequest;
requestCountField
.setValue(String.valueOf(requestCount));
fetchCount++;
fetchCountField.setValue(String.valueOf(fetchCount));
return super.fetchChildrenFromBackEnd(query);
}
});
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2022-29567
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Use index and depth as an item ID
Function: setDataProvider
File: vaadin-grid-flow-parent/vaadin-grid-flow-integration-tests/src/main/java/com/vaadin/flow/component/treegrid/it/TreeGridPreloadPage.java
Repository: vaadin/flow-components
Fixed Code:
private void setDataProvider(int nodesPerLevel, int depth) {
grid.setDataProvider(
new LazyHierarchicalDataProvider(nodesPerLevel, depth) {
@Override
protected Stream<HierarchicalTestBean> fetchChildrenFromBackEnd(
HierarchicalQuery<HierarchicalTestBean, Void> query) {
VaadinRequest currentRequest = VaadinService
.getCurrentRequest();
if (!currentRequest.equals(lastRequest)) {
requestCount++;
}
lastRequest = currentRequest;
requestCountField
.setValue(String.valueOf(requestCount));
fetchCount++;
fetchCountField.setValue(String.valueOf(fetchCount));
return super.fetchChildrenFromBackEnd(query);
}
@Override
public Object getId(HierarchicalTestBean item) {
return item != null ? item.toString() : "null";
}
});
}
|
[
"CWE-200"
] |
CVE-2022-29567
|
MEDIUM
| 5
|
vaadin/flow-components
|
setDataProvider
|
vaadin-grid-flow-parent/vaadin-grid-flow-integration-tests/src/main/java/com/vaadin/flow/component/treegrid/it/TreeGridPreloadPage.java
|
57445e814e074b8f7331b3196c97d37f08a689f0
| 1
|
Analyze the following code function for security vulnerabilities
|
public Cliente buscarClientePorEmail(String email) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
stmt = con.prepareStatement(stmtBuscarEmailExato);
stmt.setString(1, email);
rs = stmt.executeQuery();
// query vazia
if (!rs.next()) {
return null;
} else {
rs.next();
Cliente cliente = new Cliente();
cliente.setIdCliente(rs.getInt("idcliente"));
cliente.setNome(rs.getString("nome"));
cliente.setSexo(rs.getString("sexo"));
cliente.setCpf(rs.getString("cpf"));
Date nascimento = rs.getDate("nascimento");
cliente.setNascimento(nascimento);
cliente.setTelefone(rs.getString("telefone"));
cliente.setEmail(rs.getString("email"));
cliente.setSenha(rs.getString("senha"));
cliente.setCep(rs.getString("cep"));
cliente.setEndereco(rs.getString("endereco"));
cliente.setEndNumero(rs.getString("endnumero"));
cliente.setEndComplemento(rs.getString("endcomplemento"));
cliente.setBairro(rs.getString("bairro"));
cliente.setCidade(rs.getString("cidade"));
cliente.setEstado(rs.getString("estado"));
cliente.setInativo(rs.getBoolean("inativo"));
return cliente;
}
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
rs.close();
} catch (Exception ex) {
System.out.println("Erro ao fechar result set.Erro: " + ex.getMessage());
}
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buscarClientePorEmail
File: src/java/br/com/magazine/dao/ClienteDAO.java
Repository: evandro-machado/Trabalho-Web2
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10061
|
MEDIUM
| 5.2
|
evandro-machado/Trabalho-Web2
|
buscarClientePorEmail
|
src/java/br/com/magazine/dao/ClienteDAO.java
|
f59ac954625d0a4f6d34f069a2e26686a7a20aeb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initClient() throws SSLException {
debug("JSSEngine: initClient()");
if (cert != null && key != null) {
// NSS uses a callback to check for the client certificate; we
// assume we have knowledge of it ahead of time and set it
// directly on our SSLFDProxy instance.
//
// In the future, we could use a KeyManager for inquiring at
// selection time which certificate to use.
debug("JSSEngine.initClient(): Enabling client auth: " + cert);
ssl_fd.SetClientCert(cert);
if (SSL.AttachClientCertCallback(ssl_fd) != SSL.SECSuccess) {
throw new SSLException("Unable to attach client certificate auth callback.");
}
}
if (hostname == null) {
// When we're a client with no hostname, assume we're running
// under standard JDK JCA semantics with no hostname available.
// Bypass NSS's hostname check by adding a BadCertHandler, which
// check ONLY for the bad hostname error and allows it. This is
// safe since this is the LAST check in every (NSS, PKIX, and
// JSS) certificate validation step. And, under JCA semantics, we
// can assume the caller checks the hostname for us.
ssl_fd.badCertHandler = new BypassBadHostname(ssl_fd, 0);
if (SSL.ConfigSyncBadCertCallback(ssl_fd) != SSL.SECSuccess) {
throw new SSLException("Unable to attach bad cert callback.");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initClient
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
|
initClient
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMessage(String messageId, Locale locale) {
return getMessage(messageId, locale, new Object[0]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getMessage
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
void resetAllThrottlingInner() {
synchronized (mLock) {
mRawLastResetTime = injectCurrentTimeMillis();
}
scheduleSaveBaseState();
Slog.i(TAG, "ShortcutManager: throttling counter reset for all users");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetAllThrottlingInner
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
|
resetAllThrottlingInner
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void calculateDefaultBrowserLPw(int userId) {
List<String> allBrowsers = resolveAllBrowserApps(userId);
final String browserPkg = (allBrowsers.size() == 1) ? allBrowsers.get(0) : null;
mSettings.setDefaultBrowserPackageNameLPw(browserPkg, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateDefaultBrowserLPw
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
calculateDefaultBrowserLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
static int procStateToImportance(int procState, int memAdj,
ActivityManager.RunningAppProcessInfo currApp) {
int imp = ActivityManager.RunningAppProcessInfo.procStateToImportance(procState);
if (imp == ActivityManager.RunningAppProcessInfo.IMPORTANCE_BACKGROUND) {
currApp.lru = memAdj;
} else {
currApp.lru = 0;
}
return imp;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: procStateToImportance
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
|
procStateToImportance
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLastNEnabled(boolean theLastNEnabled) {
myLastNEnabled = theLastNEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLastNEnabled
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setLastNEnabled
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public @ColorInt int getSecondaryAccentColor() {
return mSecondaryAccentColor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecondaryAccentColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getSecondaryAccentColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String uncompressString(byte[] input, int offset, int length)
throws IOException
{
try {
return uncompressString(input, offset, length, "UTF-8");
}
catch (UnsupportedEncodingException e) {
throw new IllegalStateException("UTF-8 decoder is not found");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressString
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressString
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsInt04() throws Exception
{
Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue("13498000");
assertNotNull("The value should not be null.", value);
assertEquals("The value is not correct.", Duration.ofSeconds(13498L, 0), value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsInt04
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsInt04
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void crashApplication(int uid, int initialPid, String packageName, int userId,
String message) {
if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: crashApplication() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
synchronized(this) {
mAppErrors.scheduleAppCrashLocked(uid, initialPid, packageName, userId, message);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: crashApplication
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
|
crashApplication
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void closeTab(String secondTabHandle)
{
String currentTab = getCurrentTabHandle();
switchTab(secondTabHandle);
getDriver().close();
switchTab(currentTab);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeTab
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
|
closeTab
|
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
|
static String getProjectName(String archivePathName) {
if (archivePathName == null) {
return null;
}
File archiveFile = new File(archivePathName);
FileInputStream fileIn = null;
JarInputStream jarIn = null;
try {
fileIn = new FileInputStream(archiveFile);
jarIn = new JarInputStream(fileIn);
while (true) {
ZipEntry zipEntry = jarIn.getNextEntry();
if (zipEntry == null) {
break;
}
String name = zipEntry.getName();
jarIn.closeEntry();
if (name.endsWith(ProjectLocator.getProjectExtension())) {
int endIndex = name.length() - ProjectLocator.getProjectExtension().length();
String projectName = name.substring(0, endIndex);
return projectName;
}
}
}
catch (IOException e) {
// just return null below
}
finally {
if (jarIn != null) {
try {
jarIn.close();
}
catch (IOException e) {
// we tried
}
}
if (fileIn != null) {
try {
fileIn.close();
}
catch (IOException e) {
// we tried
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjectName
File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
Repository: NationalSecurityAgency/ghidra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-13623
|
MEDIUM
| 6.8
|
NationalSecurityAgency/ghidra
|
getProjectName
|
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
|
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addTextTag(final String key, final String s, final XmlSerializer serializer) throws Exception
{
serializer.startTag(FormulaList.XML_NS, FormulaList.XML_TERM_TAG);
serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_KEY, key);
serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_TEXT, s);
serializer.endTag(FormulaList.XML_NS, FormulaList.XML_TERM_TAG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTextTag
File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
Repository: mkulesh/microMathematics
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000821
|
HIGH
| 7.5
|
mkulesh/microMathematics
|
addTextTag
|
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
|
5c05ac8de16c569ff0a1816f20be235090d3dd9d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId)
throws InterruptedException {
LOG.debug("remove connection id: {}", id);
TransportConnectionState cs = lookupConnectionState(id);
if (cs != null) {
// Don't allow things to be added to the connection state while we
// are shutting down.
cs.shutdown();
// Cascade the connection stop to the sessions.
for (SessionId sessionId : cs.getSessionIds()) {
try {
processRemoveSession(sessionId, lastDeliveredSequenceId);
} catch (Throwable e) {
SERVICELOG.warn("Failed to remove session {}", sessionId, e);
}
}
// Cascade the connection stop to temp destinations.
for (Iterator<DestinationInfo> iter = cs.getTempDestinations().iterator(); iter.hasNext(); ) {
DestinationInfo di = iter.next();
try {
broker.removeDestination(cs.getContext(), di.getDestination(), 0);
} catch (Throwable e) {
SERVICELOG.warn("Failed to remove tmp destination {}", di.getDestination(), e);
}
iter.remove();
}
try {
broker.removeConnection(cs.getContext(), cs.getInfo(), null);
} catch (Throwable e) {
SERVICELOG.warn("Failed to remove connection {}", cs.getInfo(), e);
}
TransportConnectionState state = unregisterConnectionState(id);
if (state != null) {
synchronized (brokerConnectionStates) {
// If we are the last reference, we should remove the state
// from the broker.
if (state.decrementReference() == 0) {
brokerConnectionStates.remove(id);
}
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRemoveConnection
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processRemoveConnection
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState == null) {
return;
}
String uuid = savedInstanceState.getString(STATE_CONVERSATION_UUID);
ArrayList<Attachment> attachments = savedInstanceState.getParcelableArrayList(STATE_MEDIA_PREVIEWS);
pendingLastMessageUuid.push(savedInstanceState.getString(STATE_LAST_MESSAGE_UUID, null));
if (uuid != null) {
QuickLoader.set(uuid);
this.pendingConversationsUuid.push(uuid);
if (attachments != null && attachments.size() > 0) {
this.pendingMediaPreviews.push(attachments);
}
String takePhotoUri = savedInstanceState.getString(STATE_PHOTO_URI);
if (takePhotoUri != null) {
pendingTakePhotoUri.push(Uri.parse(takePhotoUri));
}
pendingScrollState.push(savedInstanceState.getParcelable(STATE_SCROLL_POSITION));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onActivityCreated
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onActivityCreated
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSystemProcess() {
try {
ServiceManager.addService(Context.ACTIVITY_SERVICE, this, true);
ServiceManager.addService(ProcessStats.SERVICE_NAME, mProcessStats);
ServiceManager.addService("meminfo", new MemBinder(this));
ServiceManager.addService("gfxinfo", new GraphicsBinder(this));
ServiceManager.addService("dbinfo", new DbBinder(this));
if (MONITOR_CPU_USAGE) {
ServiceManager.addService("cpuinfo", new CpuBinder(this));
}
ServiceManager.addService("permission", new PermissionController(this));
ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(
"android", STOCK_PM_FLAGS);
mSystemThread.installSystemApplicationInfo(info, getClass().getClassLoader());
synchronized (this) {
ProcessRecord app = newProcessRecordLocked(info, info.processName, false, 0);
app.persistent = true;
app.pid = MY_PID;
app.maxAdj = ProcessList.SYSTEM_ADJ;
app.makeActive(mSystemThread.getApplicationThread(), mProcessStats);
mProcessNames.put(app.processName, app.uid, app);
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.put(app.pid, app);
}
updateLruProcessLocked(app, false, null);
updateOomAdjLocked();
}
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException(
"Unable to find android system package", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemProcess
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
|
setSystemProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Set<TrustAnchor> trustAnchors(X509Certificate[] certs) {
Set<TrustAnchor> trustAnchors = new HashSet<TrustAnchor>(certs.length);
for (X509Certificate cert : certs) {
trustAnchors.add(new TrustAnchor(cert, null));
}
return trustAnchors;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trustAnchors
File: src/platform/java/org/conscrypt/TrustManagerImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
trustAnchors
|
src/platform/java/org/conscrypt/TrustManagerImpl.java
|
c4ab1b959280413fb11bf4fd7f6b4c2ba38bd779
| 0
|
Analyze the following code function for security vulnerabilities
|
private <R> void getById(String table, JsonArray ids,
FunctionWithException<String, R, Exception> function,
Handler<AsyncResult<Map<String,R>>> replyHandler) {
if (ids == null || ids.isEmpty()) {
replyHandler.handle(Future.succeededFuture(Collections.emptyMap()));
return;
}
client.getConnection(res -> {
if (res.failed()) {
replyHandler.handle(Future.failedFuture(res.cause()));
return;
}
SQLConnection connection = res.result();
StringBuilder sql = new StringBuilder()
.append(SELECT).append(ID_FIELD).append(", ").append(DEFAULT_JSONB_FIELD_NAME)
.append(FROM).append(schemaName).append(DOT).append(table)
.append(WHERE).append(ID_FIELD).append(" IN (?");
for (int i=1; i<ids.size(); i++) {
sql.append(",?");
}
sql.append(")");
connection.queryWithParams(sql.toString(), ids, query -> {
connection.close();
if (query.failed()) {
replyHandler.handle(Future.failedFuture(query.cause()));
return;
}
try {
ResultSet resultSet = query.result();
Map<String,R> result = new HashMap<>();
for (JsonArray jsonArray : resultSet.getResults()) {
result.put(jsonArray.getString(0), function.apply(jsonArray.getString(1)));
}
replyHandler.handle(Future.succeededFuture(result));
} catch (Exception e) {
replyHandler.handle(Future.failedFuture(e));
}
});
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getById
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getById
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract String getExtensionName();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExtensionName
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
getExtensionName
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressFBWarnings("EI_EXPOSE_REP")
public HtmlPage getHtmlPageOrNull() {
if (page_ == null || !page_.isHtmlPage()) {
return null;
}
return (HtmlPage) page_;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHtmlPageOrNull
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getHtmlPageOrNull
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
private void cleanupDanglingBitmapDirectoriesLocked(@UserIdInt int userId) {
if (DEBUG) {
Slog.d(TAG, "cleanupDanglingBitmaps: userId=" + userId);
}
final long start = getStatStartTime();
final ShortcutUser user = getUserShortcutsLocked(userId);
final File bitmapDir = getUserBitmapFilePath(userId);
final File[] children = bitmapDir.listFiles();
if (children == null) {
return;
}
for (File child : children) {
if (!child.isDirectory()) {
continue;
}
final String packageName = child.getName();
if (DEBUG) {
Slog.d(TAG, "cleanupDanglingBitmaps: Found directory=" + packageName);
}
if (!user.hasPackage(packageName)) {
if (DEBUG) {
Slog.d(TAG, "Removing dangling bitmap directory: " + packageName);
}
cleanupBitmapsForPackage(userId, packageName);
} else {
user.getPackageShortcuts(packageName).cleanupDanglingBitmapFiles(child);
}
}
logDurationStat(Stats.CLEANUP_DANGLING_BITMAPS, start);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupDanglingBitmapDirectoriesLocked
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
|
cleanupDanglingBitmapDirectoriesLocked
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanupDisabledPackageComponentsLocked(
String packageName, int userId, boolean killProcess, String[] changedClasses) {
Set<String> disabledClasses = null;
boolean packageDisabled = false;
IPackageManager pm = AppGlobals.getPackageManager();
if (changedClasses == null) {
// Nothing changed...
return;
}
// Determine enable/disable state of the package and its components.
int enabled = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
for (int i = changedClasses.length - 1; i >= 0; i--) {
final String changedClass = changedClasses[i];
if (changedClass.equals(packageName)) {
try {
// Entire package setting changed
enabled = pm.getApplicationEnabledSetting(packageName,
(userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_OWNER);
} catch (Exception e) {
// No such package/component; probably racing with uninstall. In any
// event it means we have nothing further to do here.
return;
}
packageDisabled = enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
&& enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
if (packageDisabled) {
// Entire package is disabled.
// No need to continue to check component states.
disabledClasses = null;
break;
}
} else {
try {
enabled = pm.getComponentEnabledSetting(
new ComponentName(packageName, changedClass),
(userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_OWNER);
} catch (Exception e) {
// As above, probably racing with uninstall.
return;
}
if (enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
&& enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
if (disabledClasses == null) {
disabledClasses = new ArraySet<>(changedClasses.length);
}
disabledClasses.add(changedClass);
}
}
}
if (!packageDisabled && disabledClasses == null) {
// Nothing to do here...
return;
}
// Clean-up disabled activities.
if (mStackSupervisor.finishDisabledPackageActivitiesLocked(
packageName, disabledClasses, true, false, userId) && mBooted) {
mStackSupervisor.resumeTopActivitiesLocked();
mStackSupervisor.scheduleIdleLocked();
}
// Clean-up disabled tasks
cleanupDisabledPackageTasksLocked(packageName, disabledClasses, userId);
// Clean-up disabled services.
mServices.bringDownDisabledPackageServicesLocked(
packageName, disabledClasses, userId, false, killProcess, true);
// Clean-up disabled providers.
ArrayList<ContentProviderRecord> providers = new ArrayList<>();
mProviderMap.collectPackageProvidersLocked(
packageName, disabledClasses, true, false, userId, providers);
for (int i = providers.size() - 1; i >= 0; i--) {
removeDyingProviderLocked(null, providers.get(i), true);
}
// Clean-up disabled broadcast receivers.
for (int i = mBroadcastQueues.length - 1; i >= 0; i--) {
mBroadcastQueues[i].cleanupDisabledPackageReceiversLocked(
packageName, disabledClasses, userId, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupDisabledPackageComponentsLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
cleanupDisabledPackageComponentsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void resetSurfacePositionForAnimationLeash(SurfaceControl.Transaction t) {
// Noop as Activity may be offset for letterbox
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetSurfacePositionForAnimationLeash
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
resetSurfacePositionForAnimationLeash
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private String parseUuid(X509Certificate cert) {
X500Principal x500 = cert.getSubjectX500Principal();
String dn = x500.getName();
Map<String, String> dnAttributes = new HashMap<>();
for (String attribute : dn.split(",")) {
attribute = attribute.trim();
String[] pair = attribute.split("=");
dnAttributes.put(pair[0], pair[1]);
}
return dnAttributes.get(UUID_DN_ATTRIBUTE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseUuid
File: server/src/main/java/org/candlepin/auth/SSLAuth.java
Repository: candlepin
The code follows secure coding practices.
|
[
"CWE-639"
] |
CVE-2021-4142
|
MEDIUM
| 5.5
|
candlepin
|
parseUuid
|
server/src/main/java/org/candlepin/auth/SSLAuth.java
|
87bb26761cb0d563d2eb697331ebd0dd85a67e5f
| 0
|
Analyze the following code function for security vulnerabilities
|
@CriticalNative
private static final native int nativeGetAttributeName(long state, int idx);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetAttributeName
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
|
nativeGetAttributeName
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void _addExplicitDelegatingCreator(DeserializationContext ctxt,
BeanDescription beanDesc, CreatorCollector creators,
CreatorCandidate candidate)
throws JsonMappingException
{
// Somewhat simple: find injectable values, if any, ensure there is one
// and just one delegated argument; report violations if any
int ix = -1;
final int argCount = candidate.paramCount();
SettableBeanProperty[] properties = new SettableBeanProperty[argCount];
for (int i = 0; i < argCount; ++i) {
AnnotatedParameter param = candidate.parameter(i);
JacksonInject.Value injectId = candidate.injection(i);
if (injectId != null) {
properties[i] = constructCreatorProperty(ctxt, beanDesc, null, i, param, injectId);
continue;
}
if (ix < 0) {
ix = i;
continue;
}
// Illegal to have more than one value to delegate to
ctxt.reportBadTypeDefinition(beanDesc,
"More than one argument (#%d and #%d) left as delegating for Creator %s: only one allowed",
ix, i, candidate);
}
// Also, let's require that one Delegating argument does eixt
if (ix < 0) {
ctxt.reportBadTypeDefinition(beanDesc,
"No argument left as delegating for Creator %s: exactly one required", candidate);
}
// 17-Jan-2018, tatu: as per [databind#1853] need to ensure we will distinguish
// "well-known" single-arg variants (String, int/long, boolean) from "generic" delegating...
if (argCount == 1) {
_handleSingleArgumentCreator(creators, candidate.creator(), true, true);
// one more thing: sever link to creator property, to avoid possible later
// problems with "unresolved" constructor property
BeanPropertyDefinition paramDef = candidate.propertyDef(0);
if (paramDef != null) {
((POJOPropertyBuilder) paramDef).removeConstructors();
}
return;
}
creators.addDelegatingCreator(candidate.creator(), true, properties, ix);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _addExplicitDelegatingCreator
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_addExplicitDelegatingCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private float _decodeHalfSizeFloat() throws IOException
{
int i16 = _decode16Bits() & 0xFFFF;
boolean neg = (i16 >> 15) != 0;
int e = (i16 >> 10) & 0x1F;
int f = i16 & 0x03FF;
if (e == 0) {
float result = (float) (MATH_POW_2_NEG14 * (f / MATH_POW_2_10));
return neg ? -result : result;
}
if (e == 0x1F) {
if (f != 0) return Float.NaN;
return neg ? Float.NEGATIVE_INFINITY : Float.POSITIVE_INFINITY;
}
float result = (float) (Math.pow(2, e - 15) * (1 + f / MATH_POW_2_10));
return neg ? -result : result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _decodeHalfSizeFloat
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_decodeHalfSizeFloat
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder withDefaultVirtualHost(Consumer<? super VirtualHostBuilder> customizer) {
customizer.accept(defaultVirtualHostBuilder);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withDefaultVirtualHost
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
|
withDefaultVirtualHost
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isMagnificationSettingsOn(SettingsState secureSettings) {
if ("1".equals(secureSettings.getSettingLocked(
Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED).getValue())) {
return true;
}
final Set<String> a11yButtonTargets = transformColonDelimitedStringToSet(
secureSettings.getSettingLocked(
Secure.ACCESSIBILITY_BUTTON_TARGETS).getValue());
if (a11yButtonTargets != null && a11yButtonTargets.contains(
MAGNIFICATION_CONTROLLER_NAME)) {
return true;
}
final Set<String> a11yShortcutServices = transformColonDelimitedStringToSet(
secureSettings.getSettingLocked(
Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE).getValue());
if (a11yShortcutServices != null && a11yShortcutServices.contains(
MAGNIFICATION_CONTROLLER_NAME)) {
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMagnificationSettingsOn
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
isMagnificationSettingsOn
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean installCaCertsToKeyChain(IKeyChainService keyChainService) {
for (X509Certificate caCert : mCaCerts) {
byte[] bytes = null;
try {
bytes = caCert.getEncoded();
} catch (CertificateEncodingException e) {
throw new AssertionError(e);
}
if (bytes != null) {
try {
keyChainService.installCaCertificate(bytes);
} catch (RemoteException e) {
Log.w(TAG, "installCaCertsToKeyChain(): " + e);
return false;
}
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installCaCertsToKeyChain
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
installCaCertsToKeyChain
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isTampered() {
return tampered;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTampered
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
isTampered
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeAllowlistedRestrictedPermission(String packageName, String permissionName,
int flags, int userId) {
return mPermissionManagerServiceImpl.removeAllowlistedRestrictedPermission(packageName,
permissionName, flags, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllowlistedRestrictedPermission
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
|
removeAllowlistedRestrictedPermission
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean addOrReplaceDynamicShortcut(@NonNull ShortcutInfo newShortcut) {
Preconditions.checkArgument(newShortcut.isEnabled(),
"add/setDynamicShortcuts() cannot publish disabled shortcuts");
newShortcut.addFlags(ShortcutInfo.FLAG_DYNAMIC);
final ShortcutInfo oldShortcut = findShortcutById(newShortcut.getId());
if (oldShortcut != null) {
// It's an update case.
// Make sure the target is updatable. (i.e. should be mutable.)
oldShortcut.ensureUpdatableWith(newShortcut, /*isUpdating=*/ false);
// If it was originally pinned or cached, the new one should be pinned or cached too.
newShortcut.addFlags(oldShortcut.getFlags()
& (ShortcutInfo.FLAG_PINNED | ShortcutInfo.FLAG_CACHED_ALL));
}
if (newShortcut.isExcludedFromSurfaces(ShortcutInfo.SURFACE_LAUNCHER)) {
if (isAppSearchEnabled()) {
synchronized (mLock) {
mTransientShortcuts.put(newShortcut.getId(), newShortcut);
}
}
} else {
forceReplaceShortcutInner(newShortcut);
}
return oldShortcut != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOrReplaceDynamicShortcut
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
addOrReplaceDynamicShortcut
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEmpty()
{
return xObjects.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEmpty
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
isEmpty
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeSetBegin(TSet set) throws TException {
writeCollectionBegin(set.elemType, set.size);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeSetBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeSetBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopSystemLockTaskMode() throws RemoteException {
enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "stopSystemLockTaskMode");
stopLockTaskModeInternal(null, true /* isSystemCaller */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopSystemLockTaskMode
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
|
stopSystemLockTaskMode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showImeIfNeeded() {
if (mNativeContentViewCore != 0) nativeShowImeIfNeeded(mNativeContentViewCore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showImeIfNeeded
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
showImeIfNeeded
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Modification> modificationsSince(Revision revision) {
InMemoryStreamConsumer consumer = inMemoryConsumer();
bombUnless(pull(consumer), "Failed to run hg pull command: " + consumer.getAllOutput());
CommandLine hg = hg("log",
"-r", "tip:" + revision.getRevision(),
"-b", branch,
"--style", templatePath());
return new HgModificationSplitter(execute(hg)).filterOutRevision(revision);
}
|
Vulnerability Classification:
- CWE: CWE-77
- CVE: CVE-2022-29184
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Improve escaping of arguments when constructing Hg command calls
Function: modificationsSince
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
Fixed Code:
public List<Modification> modificationsSince(Revision revision) {
InMemoryStreamConsumer consumer = inMemoryConsumer();
bombUnless(pull(consumer), "Failed to run hg pull command: " + consumer.getAllOutput());
CommandLine hg = hg("log", "-r", "tip:" + revision.getRevision(), branchArg(), "--style", templatePath());
return new HgModificationSplitter(execute(hg)).filterOutRevision(revision);
}
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
modificationsSince
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 1
|
Analyze the following code function for security vulnerabilities
|
private int getRequestedPasswordHistoryLength(int userId) {
return getDevicePolicyManager().getPasswordHistoryLength(null, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedPasswordHistoryLength
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
getRequestedPasswordHistoryLength
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWRateAndDS() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:1h-avg:rate:sys.cpu.0");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
assertTrue(sub.getRate());
assertEquals("1h-avg", sub.getDownsample());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWRateAndDS
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWRateAndDS
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cacheResult(List<KBTemplate> kbTemplates) {
for (KBTemplate kbTemplate : kbTemplates) {
if (entityCache.getResult(
KBTemplateModelImpl.ENTITY_CACHE_ENABLED,
KBTemplateImpl.class, kbTemplate.getPrimaryKey()) == null) {
cacheResult(kbTemplate);
}
else {
kbTemplate.resetOriginalValues();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheResult
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
cacheResult
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public void ensureIsOpen()
throws AlreadyClosedException
{
if (!isOpen()) {
throw new AlreadyClosedException(getCloseReason());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureIsOpen
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
ensureIsOpen
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCellDescriptionGenerator(CellDescriptionGenerator generator) {
/*
* When porting this to the v7 version in Framework 8, the default
* should be changed to PREFORMATTED to preserve the more secure
* default that has accidentally been used there.
*/
setCellDescriptionGenerator(generator, ContentMode.HTML);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCellDescriptionGenerator
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
|
setCellDescriptionGenerator
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final boolean cleanUpApplicationRecordLocked(ProcessRecord app, int pid,
boolean restarting, boolean allowRestart, int index, boolean replacingPid,
boolean fromBinderDied) {
boolean restart;
synchronized (mProcLock) {
if (index >= 0) {
removeLruProcessLocked(app);
ProcessList.remove(pid);
}
// We don't want to unlinkDeathRecipient immediately, if it's not called from binder
// and it's not isolated, as we'd need the signal to bookkeeping the dying process list.
restart = app.onCleanupApplicationRecordLSP(mProcessStats, allowRestart,
fromBinderDied || app.isolated /* unlinkDeath */);
// Cancel pending frozen task and clean up frozen record if there is any.
mOomAdjuster.mCachedAppOptimizer.onCleanupApplicationRecordLocked(app);
}
mAppProfiler.onCleanupApplicationRecordLocked(app);
skipCurrentReceiverLocked(app);
updateProcessForegroundLocked(app, false, 0, false);
mServices.killServicesLocked(app, allowRestart);
mPhantomProcessList.onAppDied(pid);
// If the app is undergoing backup, tell the backup manager about it
final BackupRecord backupTarget = mBackupTargets.get(app.userId);
if (backupTarget != null && pid == backupTarget.app.getPid()) {
if (DEBUG_BACKUP || DEBUG_CLEANUP) Slog.d(TAG_CLEANUP, "App "
+ backupTarget.appInfo + " died during backup");
mHandler.post(new Runnable() {
@Override
public void run(){
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
bm.agentDisconnectedForUser(app.userId, app.info.packageName);
} catch (RemoteException e) {
// can't happen; backup manager is local
}
}
});
}
mProcessList.scheduleDispatchProcessDiedLocked(pid, app.info.uid);
// If this is a preceding instance of another process instance
allowRestart = mProcessList.handlePrecedingAppDiedLocked(app);
// If somehow this process was still waiting for the death of its predecessor,
// (probably it's "killed" before starting for real), reset the bookkeeping.
final ProcessRecord predecessor = app.mPredecessor;
if (predecessor != null) {
predecessor.mSuccessor = null;
predecessor.mSuccessorStartRunnable = null;
app.mPredecessor = null;
}
// If the caller is restarting this app, then leave it in its
// current lists and let the caller take care of it.
if (restarting) {
return false;
}
if (!app.isPersistent() || app.isolated) {
if (DEBUG_PROCESSES || DEBUG_CLEANUP) Slog.v(TAG_CLEANUP,
"Removing non-persistent process during cleanup: " + app);
if (!replacingPid) {
mProcessList.removeProcessNameLocked(app.processName, app.uid, app);
}
mAtmInternal.clearHeavyWeightProcessIfEquals(app.getWindowProcessController());
} else if (!app.isRemoved()) {
// This app is persistent, so we need to keep its record around.
// If it is not already on the pending app list, add it there
// and start a new process for it.
if (mPersistentStartingProcesses.indexOf(app) < 0) {
mPersistentStartingProcesses.add(app);
restart = true;
}
}
if ((DEBUG_PROCESSES || DEBUG_CLEANUP) && mProcessesOnHold.contains(app)) Slog.v(
TAG_CLEANUP, "Clean-up removing on hold: " + app);
mProcessesOnHold.remove(app);
mAtmInternal.onCleanUpApplicationRecord(app.getWindowProcessController());
mProcessList.noteProcessDiedLocked(app);
if (restart && allowRestart && !app.isolated) {
// We have components that still need to be running in the
// process, so re-launch it.
if (index < 0) {
ProcessList.remove(pid);
}
// Remove provider publish timeout because we will start a new timeout when the
// restarted process is attaching (if the process contains launching providers).
mHandler.removeMessages(CONTENT_PROVIDER_PUBLISH_TIMEOUT_MSG, app);
mProcessList.addProcessNameLocked(app);
app.setPendingStart(false);
mProcessList.startProcessLocked(app, new HostingRecord(
HostingRecord.HOSTING_TYPE_RESTART, app.processName),
ZYGOTE_POLICY_FLAG_EMPTY);
return true;
} else if (pid > 0 && pid != MY_PID) {
// Goodbye!
removePidLocked(pid, app);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
}
app.setPid(0);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpApplicationRecordLocked
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
|
cleanUpApplicationRecordLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addAttachedWindowToListLocked(final WindowState win, boolean addToToken) {
final WindowToken token = win.mToken;
final DisplayContent displayContent = win.getDisplayContent();
if (displayContent == null) {
return;
}
final WindowState attached = win.mAttachedWindow;
WindowList tokenWindowList = getTokenWindowsOnDisplay(token, displayContent);
// Figure out this window's ordering relative to the window
// it is attached to.
final int NA = tokenWindowList.size();
final int sublayer = win.mSubLayer;
int largestSublayer = Integer.MIN_VALUE;
WindowState windowWithLargestSublayer = null;
int i;
for (i = 0; i < NA; i++) {
WindowState w = tokenWindowList.get(i);
final int wSublayer = w.mSubLayer;
if (wSublayer >= largestSublayer) {
largestSublayer = wSublayer;
windowWithLargestSublayer = w;
}
if (sublayer < 0) {
// For negative sublayers, we go below all windows
// in the same sublayer.
if (wSublayer >= sublayer) {
if (addToToken) {
if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(i, win);
}
placeWindowBefore(wSublayer >= 0 ? attached : w, win);
break;
}
} else {
// For positive sublayers, we go above all windows
// in the same sublayer.
if (wSublayer > sublayer) {
if (addToToken) {
if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(i, win);
}
placeWindowBefore(w, win);
break;
}
}
}
if (i >= NA) {
if (addToToken) {
if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(win);
}
if (sublayer < 0) {
placeWindowBefore(attached, win);
} else {
placeWindowAfter(largestSublayer >= 0
? windowWithLargestSublayer
: attached,
win);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachedWindowToListLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
addAttachedWindowToListLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean copyResource(File file, String filename, File targetDirectory) {
return copyResource(file, filename, targetDirectory, new YesMatcher());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyResource
File: src/main/java/org/olat/fileresource/types/FileResource.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
copyResource
|
src/main/java/org/olat/fileresource/types/FileResource.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAltSubjectMatch(String altSubjectMatch) {
setFieldValue(ALTSUBJECT_MATCH_KEY, altSubjectMatch, "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAltSubjectMatch
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
setAltSubjectMatch
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.