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 Integer getServerIndex() {
return serverIndex;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerIndex
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getServerIndex
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized boolean isPendingStop() {
return pendingStop;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPendingStop
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
|
isPendingStop
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean migratePoliciesToDevicePolicyEngine() {
return mInjector.binderWithCleanCallingIdentity(() -> {
try {
synchronized (getLockObject()) {
Slogf.i(LOG_TAG,
"Started device policies migration to the device policy engine.");
if (isUnicornFlagEnabled()) {
migrateAutoTimezonePolicy();
migratePermissionGrantStatePolicies();
}
migrateScreenCapturePolicyLocked();
migratePermittedInputMethodsPolicyLocked();
migrateAccountManagementDisabledPolicyLocked();
migrateUserControlDisabledPackagesLocked();
mOwners.markMigrationToPolicyEngine();
return true;
}
} catch (Exception e) {
mDevicePolicyEngine.clearAllPolicies();
Slogf.e(LOG_TAG, e, "Error occurred during device policy migration, will "
+ "reattempt on the next system server restart.");
return false;
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migratePoliciesToDevicePolicyEngine
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
|
migratePoliciesToDevicePolicyEngine
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceTelecomFeature() {
PackageManager pm = mContext.getPackageManager();
if (!pm.hasSystemFeature(PackageManager.FEATURE_TELECOM)
&& !pm.hasSystemFeature(PackageManager.FEATURE_CONNECTION_SERVICE)) {
throw new UnsupportedOperationException(
"System does not support feature " + PackageManager.FEATURE_TELECOM);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceTelecomFeature
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
enforceTelecomFeature
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void systemOut(String content){
Log.d(Display.getInstance().getProperty("AppName", "CodenameOne"), content);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: systemOut
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
systemOut
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void restart() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restart
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
restart
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addParameterHeader(String name, String fileName, DataOutputStream postRequest) throws IOException {
postRequest.writeBytes(TWO_HYPHENS + BOUNDARY + CRLF);
postRequest.writeBytes("Content-Disposition: form-data; name=\"" + name + "\"" +
(fileName != null? "; filename=\"" + fileName + "\"" + CRLF + "Content-Type: application/octet-stream" : "") + CRLF);
postRequest.writeBytes(CRLF);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addParameterHeader
File: src/main/java/com/mxgraph/online/ConverterServlet.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-3398
|
HIGH
| 7.5
|
jgraph/drawio
|
addParameterHeader
|
src/main/java/com/mxgraph/online/ConverterServlet.java
|
064729fec4262f9373d9fdcafda0be47cd18dd50
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean handleApplicationWtf(final IBinder app, final String tag, boolean system,
final ApplicationErrorReport.CrashInfo crashInfo) {
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
if (system) {
// If this is coming from the system, we could very well have low-level
// system locks held, so we want to do this all asynchronously. And we
// never want this to become fatal, so there is that too.
mHandler.post(new Runnable() {
@Override public void run() {
handleApplicationWtfInner(callingUid, callingPid, app, tag, crashInfo);
}
});
return false;
}
final ProcessRecord r = handleApplicationWtfInner(callingUid, callingPid, app, tag,
crashInfo);
if (r != null && r.pid != Process.myPid() &&
Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.WTF_IS_FATAL, 0) != 0) {
crashApplication(r, crashInfo);
return true;
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationWtf
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
|
handleApplicationWtf
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void operationComplete(ChannelFuture closeNotifyFuture) throws Exception {
if (!(closeNotifyFuture.getCause() instanceof ClosedChannelException)) {
Channels.close(context, e.getFuture());
} else {
e.getFuture().setSuccess();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: operationComplete
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
operationComplete
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Element toDOM(Document document) {
Element element = document.createElement("AsymKeyGenerationRequest");
toDOM(document, element);
return element;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/key/AsymKeyGenerationRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/key/AsymKeyGenerationRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private VaadinSession doFindOrCreateVaadinSession(VaadinRequest request,
boolean requestCanCreateSession)
throws SessionExpiredException, ServiceException {
assert ((ReentrantLock) getSessionLock(request.getWrappedSession()))
.isHeldByCurrentThread() : "Session has not been locked by this thread";
/* Find an existing session for this request. */
VaadinSession session = getExistingSession(request,
requestCanCreateSession);
if (session != null) {
/*
* There is an existing session. We can use this as long as the user
* not specifically requested to close or restart it.
*/
final boolean restartApplication = hasParameter(request,
URL_PARAMETER_RESTART_APPLICATION)
&& !hasParameter(request,
BootstrapHandler.IGNORE_RESTART_PARAM);
final boolean closeApplication = hasParameter(request,
URL_PARAMETER_CLOSE_APPLICATION);
if (closeApplication) {
closeSession(session, request.getWrappedSession(false));
return null;
} else if (restartApplication) {
closeSession(session, request.getWrappedSession(false));
return createAndRegisterSession(request);
} else {
return session;
}
}
// No existing session was found
if (requestCanCreateSession) {
/*
* If the request is such that it should create a new session if one
* as not found, we do that.
*/
return createAndRegisterSession(request);
} else {
/*
* The session was not found and a new one should not be created.
* Assume the session has expired.
*/
throw new SessionExpiredException();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doFindOrCreateVaadinSession
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
doFindOrCreateVaadinSession
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull List<String> getMeteredDataDisabledPackages(@NonNull ComponentName admin) {
throwIfParentInstance("getMeteredDataDisabled");
if (mService != null) {
try {
return mService.getMeteredDataDisabledPackages(admin);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return new ArrayList<>();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMeteredDataDisabledPackages
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
|
getMeteredDataDisabledPackages
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public int getPasswordHistoryLength(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
return mService.getPasswordHistoryLength(admin, userHandle, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordHistoryLength
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
|
getPasswordHistoryLength
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAlwaysOnVpnLockdownEnabledForUser(int userHandle) {
Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()),
String.format(NOT_SYSTEM_CALLER_MSG, "call isAlwaysOnVpnLockdownEnabledForUser"));
synchronized (getLockObject()) {
ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userHandle);
return admin != null && admin.mAlwaysOnVpnLockdown;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlwaysOnVpnLockdownEnabledForUser
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
|
isAlwaysOnVpnLockdownEnabledForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onBeforeRender()
{
super.onBeforeRender();
if (lazyBinding == false) {
actionButtons.render();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBeforeRender
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
onBeforeRender
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSortOrder(List<GridSortOrder<T>> order) {
setSortOrder(order, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSortOrder
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
|
setSortOrder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Connection onCreateUnknownConnection(
PhoneAccountHandle connectionManagerPhoneAccount, ConnectionRequest request) {
mLatestConnection = new FakeConnection(request.getVideoState(), request.getAddress());
return mLatestConnection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateUnknownConnection
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
onCreateUnknownConnection
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Uri insert(Uri uri, ContentValues values) {
if (DEBUG) {
Slog.v(LOG_TAG, "insert() for user: " + UserHandle.getCallingUserId());
}
String table = getValidTableOrThrow(uri);
// If a legacy table that is gone, done.
if (REMOVED_LEGACY_TABLES.contains(table)) {
return null;
}
String name = values.getAsString(Settings.Secure.NAME);
if (!isKeyValid(name)) {
return null;
}
String value = values.getAsString(Settings.Secure.VALUE);
switch (table) {
case TABLE_GLOBAL: {
if (insertGlobalSetting(name, value, UserHandle.getCallingUserId(), false)) {
return Uri.withAppendedPath(Settings.Global.CONTENT_URI, name);
}
} break;
case TABLE_SECURE: {
if (insertSecureSetting(name, value, UserHandle.getCallingUserId(), false)) {
return Uri.withAppendedPath(Settings.Secure.CONTENT_URI, name);
}
} break;
case TABLE_SYSTEM: {
if (insertSystemSetting(name, value, UserHandle.getCallingUserId())) {
return Uri.withAppendedPath(Settings.System.CONTENT_URI, name);
}
} break;
default: {
throw new IllegalArgumentException("Bad Uri path:" + uri);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insert
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
insert
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isHidden()
{
return this.doc.isHidden();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHidden
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
isHidden
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private Properties getLastSnapshot() {
if (isSnapshotDisabled()) {
return null;
}
SnapshotSerializer serializer = SnapshotSerializerFactory.getSerializer();
return serializer.getLastSnapshot();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastSnapshot
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getLastSnapshot
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void removeFactoryIteratorProvider(final FactoryIteratorProvider provider) {
FactoryIteratorProviders.removeFactoryIteratorProvider(provider);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeFactoryIteratorProvider
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
removeFactoryIteratorProvider
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder http2InitialStreamWindowSize(int http2InitialStreamWindowSize) {
checkArgument(http2InitialStreamWindowSize > 0,
"http2InitialStreamWindowSize: %s (expected: > 0)",
http2InitialStreamWindowSize);
this.http2InitialStreamWindowSize = http2InitialStreamWindowSize;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: http2InitialStreamWindowSize
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
|
http2InitialStreamWindowSize
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getOutputRoot() {
return this.outputRoot;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutputRoot
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
getOutputRoot
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, List<LifeEvent>> groupByBM(List<LifeEvent> events) {
return events.stream().collect(Collectors.groupingBy(LifeEvent::getBareMetalId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: groupByBM
File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java
Repository: fit2cloud/rackshift
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-42405
|
CRITICAL
| 9.8
|
fit2cloud/rackshift
|
groupByBM
|
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
|
305aea3b20d36591d519f7d04e0a25be05a51e93
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveTaskToFront(int taskId, int flags, Bundle options) {
enforceCallingPermission(android.Manifest.permission.REORDER_TASKS, "moveTaskToFront()");
if (DEBUG_STACK) Slog.d(TAG_STACK, "moveTaskToFront: moving taskId=" + taskId);
synchronized(this) {
moveTaskToFrontLocked(taskId, flags, options);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToFront
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
|
moveTaskToFront
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showPrimarySecurityScreen(boolean turningOff) {
SecurityMode securityMode = whitelistIpcs(() -> mSecurityModel.getSecurityMode(
KeyguardUpdateMonitor.getCurrentUser()));
if (DEBUG) Log.v(TAG, "showPrimarySecurityScreen(turningOff=" + turningOff + ")");
showSecurityScreen(securityMode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showPrimarySecurityScreen
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
showPrimarySecurityScreen
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int getIntegerFromStringTimeout(String validity) {
Resources resources = NextcloudTalkApplication.Companion.getSharedApplication().getResources();
List<String> entryValues = Arrays.asList(resources.getStringArray(R.array.screen_lock_timeout_entry_values));
int[] entryIntValues = resources.getIntArray(R.array.screen_lock_timeout_entry_int_values);
int indexOfValidity = entryValues.indexOf(validity);
return entryIntValues[indexOfValidity];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntegerFromStringTimeout
File: app/src/main/java/com/nextcloud/talk/utils/SecurityUtils.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-22473
|
LOW
| 2.1
|
nextcloud/talk-android
|
getIntegerFromStringTimeout
|
app/src/main/java/com/nextcloud/talk/utils/SecurityUtils.java
|
12cb7e423bcb3cc8def9a41d3e4a9bb75738b6a9
| 0
|
Analyze the following code function for security vulnerabilities
|
private int verifyAndGetMinSdkVersion(DataSource apk, ApkUtils.ZipSections zipSections)
throws ApkFormatException, IOException {
if (mMinSdkVersion != null) {
if (mMinSdkVersion < 0) {
throw new IllegalArgumentException(
"minSdkVersion must not be negative: " + mMinSdkVersion);
}
if ((mMinSdkVersion != null) && (mMinSdkVersion > mMaxSdkVersion)) {
throw new IllegalArgumentException(
"minSdkVersion (" + mMinSdkVersion + ") > maxSdkVersion (" + mMaxSdkVersion
+ ")");
}
return mMinSdkVersion;
}
ByteBuffer androidManifest = null;
// Need to obtain minSdkVersion from the APK's AndroidManifest.xml
if (androidManifest == null) {
androidManifest = getAndroidManifestFromApk(apk, zipSections);
}
int minSdkVersion =
ApkUtils.getMinSdkVersionFromBinaryAndroidManifest(androidManifest.slice());
if (minSdkVersion > mMaxSdkVersion) {
throw new IllegalArgumentException(
"minSdkVersion from APK (" + minSdkVersion + ") > maxSdkVersion ("
+ mMaxSdkVersion + ")");
}
return minSdkVersion;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyAndGetMinSdkVersion
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verifyAndGetMinSdkVersion
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setNeedClientAuth(boolean need) {
need_client_auth = need;
// reset the want_client_auth setting
want_client_auth = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNeedClientAuth
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
setNeedClientAuth
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean deleteFromPending(PendingOperation op) {
boolean res = false;
synchronized (mAuthorities) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "deleteFromPending: account=" + op.toString());
}
if (mPendingOperations.remove(op)) {
if (mPendingOperations.size() == 0
|| mNumPendingFinished >= PENDING_FINISH_TO_WRITE) {
writePendingOperationsLocked();
mNumPendingFinished = 0;
} else {
mNumPendingFinished++;
}
AuthorityInfo authority = getAuthorityLocked(op.target, "deleteFromPending");
if (authority != null) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "removing - " + authority.toString());
}
final int N = mPendingOperations.size();
boolean morePending = false;
for (int i = 0; i < N; i++) {
PendingOperation cur = mPendingOperations.get(i);
if (cur.equals(op)) {
morePending = true;
break;
}
}
if (!morePending) {
if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "no more pending!");
SyncStatusInfo status = getOrCreateSyncStatusLocked(authority.ident);
status.pending = false;
}
}
res = true;
}
}
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_PENDING);
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteFromPending
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
deleteFromPending
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
private WindowState getFocusedWindow() {
synchronized (mWindowMap) {
return getFocusedWindowLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFocusedWindow
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
|
getFocusedWindow
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {
throw logAndRethrowRuntimeExceptionOnTransact(TAG, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTransact
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onTransact
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void execute(String path, File outputDirectory) throws ArchiverException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
execute
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
default void orElse(final Runnable callback) {
orElse(conf -> callback.run());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: orElse
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
|
orElse
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getIndexableNames() {
return indexableNames;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-36634
- Severity: MEDIUM
- CVSS Score: 5.4
Description: COMMON-3969: Explicit alphanumeric n-gram indexes
Explicitly build alphanumeric n-gram indexes to avoid XSS due
to unescaped characters in the rendered n-gram indexes JSON
Function: getIndexableNames
File: varexport/src/main/java/com/indeed/util/varexport/Variable.java
Repository: indeedeng/util
Fixed Code:
@Deprecated
public String[] getIndexableNames() {
return indexableNames;
}
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
getIndexableNames
|
varexport/src/main/java/com/indeed/util/varexport/Variable.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isChecked() {
return Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, 0) == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isChecked
File: src/com/android/settings/location/BluetoothScanningMainSwitchPreferenceController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21247
|
HIGH
| 7.8
|
android
|
isChecked
|
src/com/android/settings/location/BluetoothScanningMainSwitchPreferenceController.java
|
edd4023805bc7fa54ae31de222cde02b9012bbc4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkPreAccess(Right right)
{
if (CONTENT_AUTHOR_RIGHTS.contains(right)) {
if (this.renderingContext.isRestricted()) {
return false;
} else if (right == Right.PROGRAM && this.xcontextProvider.get().hasDroppedPermissions()) {
return false;
}
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-459
- CVE: CVE-2023-36468
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20594: Mark old revisions and deleted documents as restricted
* Introduce a new "restricted" attribute on XWikiDocument
* Mark any document that is restored from XML as restricted
* Deny script right when the secure document is restricted
* Make transformations restricted when the document is restricted
* Do not execute Velocity in titles when the document is restricted
* Make sure saved documents aren't restricted.
* Add tests
* Display a warning when a document is rendered in restricted mode and
the user is advanced or there is actually an error in the output.
Function: checkPreAccess
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
Repository: xwiki/xwiki-platform
Fixed Code:
private boolean checkPreAccess(Right right)
{
if (CONTENT_AUTHOR_RIGHTS.contains(right)) {
XWikiDocument doc = getProgrammingDocument();
boolean restricted = this.renderingContext.isRestricted() || (doc != null && doc.isRestricted());
return !(restricted || (right == Right.PROGRAM && this.xcontextProvider.get().hasDroppedPermissions()));
}
return true;
}
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
checkPreAccess
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 1
|
Analyze the following code function for security vulnerabilities
|
public static URL convertToUrl(String url) {
try {
return new URL(url);
} catch (MalformedURLException e) {
throw ErrorUtil.createCommandException(e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToUrl
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
convertToUrl
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<ClassDefinition> getClassDefinitions() {
if (classDefinitions == null) {
classDefinitions = new HashSet<ClassDefinition>();
}
return classDefinitions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassDefinitions
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getClassDefinitions
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void verifyNfcPermission() {
NfcPermissions.enforceUserPermissions(mContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyNfcPermission
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
verifyNfcPermission
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setConnectionServiceFocusListener(
ConnectionServiceFocusManager.ConnectionServiceFocusListener listener) {
mConnSvrFocusListener = listener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConnectionServiceFocusListener
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setConnectionServiceFocusListener
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startLockTaskModeOnCurrent() throws RemoteException {
enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
"startLockTaskModeOnCurrent");
long ident = Binder.clearCallingIdentity();
try {
synchronized (this) {
ActivityRecord r = mStackSupervisor.topRunningActivityLocked();
if (r != null) {
startLockTaskModeLocked(r.task);
}
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskModeOnCurrent
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
|
startLockTaskModeOnCurrent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void extract(File zipFile, File destDir)
throws IOException
{
try (ZipFile zf = new ZipFile(zipFile)) {
extract(zf, destDir);
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-20227
- Severity: MEDIUM
- CVSS Score: 6.4
Description: Verify that zip file entries don't try to escape the parent dir + test
Signed-off-by: Bart Hanssens <bart.hanssens@bosa.fgov.be>
Function: extract
File: util/src/main/java/org/eclipse/rdf4j/common/io/ZipUtil.java
Repository: eclipse-rdf4j/rdf4j
Fixed Code:
public static void extract(File zipFile, File destDir) throws IOException {
try (ZipFile zf = new ZipFile(zipFile)) {
extract(zf, destDir);
}
}
|
[
"CWE-22"
] |
CVE-2018-20227
|
MEDIUM
| 6.4
|
eclipse-rdf4j/rdf4j
|
extract
|
util/src/main/java/org/eclipse/rdf4j/common/io/ZipUtil.java
|
df15a4d7a8f2789c043b27c9eafe1b30316cfa79
| 1
|
Analyze the following code function for security vulnerabilities
|
public synchronized boolean isStarting() {
return starting;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isStarting
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
|
isStarting
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resizeStack(int stackBoxId, Rect r) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(stackBoxId);
r.writeToParcel(data, 0);
mRemote.transact(RESIZE_STACK_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resizeStack
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
resizeStack
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private EnforcingAdmin enforcePermissionsAndGetEnforcingAdmin(@Nullable ComponentName admin,
String[] permissions, String callerPackageName, int targetUserId) {
enforcePermissions(permissions, callerPackageName, targetUserId);
return getEnforcingAdminForCaller(admin, callerPackageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePermissionsAndGetEnforcingAdmin
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
|
enforcePermissionsAndGetEnforcingAdmin
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void configurationChanged() {
// Don't reuse task stack views if the configuration changes
mCanReuseTaskStackViews = false;
// Reload the header bar layout
reloadHeaderBarLayout(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configurationChanged
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
configurationChanged
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getStorageEncryptionStatus(@Nullable String callerPackage, int userHandle) {
if (!mHasFeature) {
// Ok to return current status.
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity(callerPackage);
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
final ApplicationInfo ai;
try {
ai = mIPackageManager.getApplicationInfo(callerPackage, 0, userHandle);
} catch (RemoteException e) {
throw new SecurityException(e);
}
boolean legacyApp = false;
if (ai.targetSdkVersion <= Build.VERSION_CODES.M) {
legacyApp = true;
}
final int rawStatus = getEncryptionStatus();
if ((rawStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_PER_USER) && legacyApp) {
return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
}
return rawStatus;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStorageEncryptionStatus
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
|
getStorageEncryptionStatus
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean stopBinderTrackingAndDump(ParcelFileDescriptor fd) throws RemoteException {
try {
synchronized (this) {
mBinderTransactionTrackingEnabled = false;
// TODO: hijacking SET_ACTIVITY_WATCHER, but should be changed to its own
// permission (same as profileControl).
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
if (fd == null) {
throw new IllegalArgumentException("null fd");
}
PrintWriter pw = new FastPrintWriter(new FileOutputStream(fd.getFileDescriptor()));
pw.println("Binder transaction traces for all processes.\n");
for (ProcessRecord process : mLruProcesses) {
if (!processSanityChecksLocked(process)) {
continue;
}
pw.println("Traces for process: " + process.processName);
pw.flush();
try {
TransferPipe tp = new TransferPipe();
try {
process.thread.stopBinderTrackingAndDump(tp.getWriteFd());
tp.go(fd.getFileDescriptor());
} finally {
tp.kill();
}
} catch (IOException e) {
pw.println("Failure while dumping IPC traces from " + process +
". Exception: " + e);
pw.flush();
} catch (RemoteException e) {
pw.println("Got a RemoteException while dumping IPC traces from " +
process + ". Exception: " + e);
pw.flush();
}
}
fd = null;
return true;
}
} finally {
if (fd != null) {
try {
fd.close();
} catch (IOException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopBinderTrackingAndDump
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
|
stopBinderTrackingAndDump
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public Server start() throws SQLException {
try {
started = true;
service.start();
String url = service.getURL();
int idx = url.indexOf('?');
if (idx >= 0) {
url = url.substring(0, idx);
}
String name = service.getName() + " (" + url + ')';
Thread t = new Thread(this, name);
t.setDaemon(service.isDaemon());
t.start();
for (int i = 1; i < 64; i += i) {
wait(i);
if (isRunning(false)) {
return this;
}
}
if (isRunning(true)) {
return this;
}
throw DbException.get(ErrorCode.EXCEPTION_OPENING_PORT_2,
name, "timeout; " +
"please check your network configuration, specially the file /etc/hosts");
} catch (DbException e) {
throw DbException.toSQLException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: start
File: h2/src/main/org/h2/tools/Server.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
start
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSubSection() {
return subSection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubSection
File: src/main/java/com/gitblit/StoredUserConfig.java
Repository: gitblit-org/gitblit
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2022-31267
|
HIGH
| 7.5
|
gitblit-org/gitblit
|
getSubSection
|
src/main/java/com/gitblit/StoredUserConfig.java
|
9b4afad6f4be212474809533ec2c280cce86501a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
if (getActivity() == null) {
return;
}
parent.fireWebEvent("onStart", new ActionEvent(url));
super.onPageStarted(view, url, favicon);
dismissProgress();
//show the progress only if there is no ActionBar
if(!hideProgress && !isNativeTitle()){
progressBar = ProgressDialog.show(getActivity(), null, "Loading...");
//if the page hasn't finished for more the 10 sec, dismiss
//the dialog
Timer t= new Timer();
t.schedule(new TimerTask() {
@Override
public void run() {
dismissProgress();
}
}, 10000);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPageStarted
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onPageStarted
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
@Override
public float getFloat(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getFloat columnIndex: {0}", columnIndex);
byte[] value = getRawValue(columnIndex);
if (value == null) {
return 0; // SQL NULL
}
if (isBinary(columnIndex)) {
int col = columnIndex - 1;
int oid = fields[col].getOID();
if (oid == Oid.FLOAT4) {
return ByteConverter.float4(value, 0);
}
return (float) readDoubleValue(value, oid, "float");
}
return toFloat(getFixedString(columnIndex));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFloat
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getFloat
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNotificationListenerAccessGranted(ComponentName cn) {
try {
return sINM.isNotificationListenerAccessGranted(cn);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotificationListenerAccessGranted
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
isNotificationListenerAccessGranted
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull ActiveAdmin getDeviceOwnerLocked(final CallerIdentity caller) {
ensureLocked();
ComponentName doComponent = mOwners.getDeviceOwnerComponent();
Preconditions.checkState(doComponent != null,
"No device owner for user %d", caller.getUid());
// Use the user ID of the caller instead of mOwners.getDeviceOwnerUserId() because
// secondary, affiliated users will have their own admin.
ActiveAdmin doAdmin = getUserData(caller.getUserId()).mAdminMap.get(doComponent);
Preconditions.checkState(doAdmin != null,
"Device owner %s for user %d not found", doComponent,
caller.getUid());
Preconditions.checkCallAuthorization(doAdmin.getUid() == caller.getUid(),
"Admin %s is not owned by uid %d, but uid %d", doComponent,
caller.getUid(), doAdmin.getUid());
Preconditions.checkCallAuthorization(
!caller.hasAdminComponent()
|| doAdmin.info.getComponent().equals(caller.getComponentName()),
"Caller component %s is not device owner",
caller.getComponentName());
return doAdmin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerLocked
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
|
getDeviceOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] calcSecret()
{
return bigIntToBytes(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calcSecret
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyAgreementSpi.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-320"
] |
CVE-2016-1000346
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
calcSecret
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyAgreementSpi.java
|
1127131c89021612c6eefa26dbe5714c194e7495
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends SocketAddress> A getLocalAddress(Class<A> type) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalAddress
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
|
getLocalAddress
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setCategory(String category) {
mN.category = category;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCategory
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setCategory
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getAvailableRestoreToken(String packageName) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"getAvailableRestoreToken");
long token = mAncestralToken;
synchronized (mQueueLock) {
if (mEverStoredApps.contains(packageName)) {
if (MORE_DEBUG) {
Slog.i(TAG, "App in ever-stored, so using current token");
}
token = mCurrentToken;
}
}
if (MORE_DEBUG) Slog.i(TAG, "getAvailableRestoreToken() == " + token);
return token;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAvailableRestoreToken
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
getAvailableRestoreToken
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@XmlElement
public String getSenderName() {
return senderName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSenderName
File: core-web/src/main/java/org/silverpeas/core/webapi/notification/user/InboxUserNotificationEntity.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getSenderName
|
core-web/src/main/java/org/silverpeas/core/webapi/notification/user/InboxUserNotificationEntity.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readHeaders(long fileLength) throws IOException, RarException {
markHead = null;
newMhd = null;
headers.clear();
currentHeaderIndex = 0;
int toRead = 0;
while (true) {
int size = 0;
long newpos = 0;
byte[] baseBlockBuffer = new byte[BaseBlock.BaseBlockSize];
long position = rof.getPosition();
// Weird, but is trying to read beyond the end of the file
if (position >= fileLength) {
break;
}
// logger.info("\n--------reading header--------");
size = rof.readFully(baseBlockBuffer, BaseBlock.BaseBlockSize);
if (size == 0) {
break;
}
BaseBlock block = new BaseBlock(baseBlockBuffer);
block.setPositionInFile(position);
switch (block.getHeaderType()) {
case MarkHeader:
markHead = new MarkHeader(block);
if (!markHead.isSignature()) {
throw new RarException(
RarException.RarExceptionType.badRarArchive);
}
headers.add(markHead);
// markHead.print();
break;
case MainHeader:
toRead = block.hasEncryptVersion() ? MainHeader.mainHeaderSizeWithEnc
: MainHeader.mainHeaderSize;
byte[] mainbuff = new byte[toRead];
rof.readFully(mainbuff, toRead);
MainHeader mainhead = new MainHeader(block, mainbuff);
headers.add(mainhead);
this.newMhd = mainhead;
if (newMhd.isEncrypted()) {
throw new RarException(
RarExceptionType.rarEncryptedException);
}
// mainhead.print();
break;
case SignHeader:
toRead = SignHeader.signHeaderSize;
byte[] signBuff = new byte[toRead];
rof.readFully(signBuff, toRead);
SignHeader signHead = new SignHeader(block, signBuff);
headers.add(signHead);
// logger.info("HeaderType: SignHeader");
break;
case AvHeader:
toRead = AVHeader.avHeaderSize;
byte[] avBuff = new byte[toRead];
rof.readFully(avBuff, toRead);
AVHeader avHead = new AVHeader(block, avBuff);
headers.add(avHead);
// logger.info("headertype: AVHeader");
break;
case CommHeader:
toRead = CommentHeader.commentHeaderSize;
byte[] commBuff = new byte[toRead];
rof.readFully(commBuff, toRead);
CommentHeader commHead = new CommentHeader(block, commBuff);
headers.add(commHead);
// logger.info("method: "+commHead.getUnpMethod()+"; 0x"+
// Integer.toHexString(commHead.getUnpMethod()));
newpos = commHead.getPositionInFile()
+ commHead.getHeaderSize();
rof.setPosition(newpos);
break;
case EndArcHeader:
toRead = 0;
if (block.hasArchiveDataCRC()) {
toRead += EndArcHeader.endArcArchiveDataCrcSize;
}
if (block.hasVolumeNumber()) {
toRead += EndArcHeader.endArcVolumeNumberSize;
}
EndArcHeader endArcHead;
if (toRead > 0) {
byte[] endArchBuff = new byte[toRead];
rof.readFully(endArchBuff, toRead);
endArcHead = new EndArcHeader(block, endArchBuff);
// logger.info("HeaderType: endarch\ndatacrc:"+
// endArcHead.getArchiveDataCRC());
} else {
// logger.info("HeaderType: endarch - no Data");
endArcHead = new EndArcHeader(block, null);
}
headers.add(endArcHead);
// logger.info("\n--------end header--------");
return;
default:
byte[] blockHeaderBuffer = new byte[BlockHeader.blockHeaderSize];
rof.readFully(blockHeaderBuffer, BlockHeader.blockHeaderSize);
BlockHeader blockHead = new BlockHeader(block,
blockHeaderBuffer);
switch (blockHead.getHeaderType()) {
case NewSubHeader:
case FileHeader:
toRead = blockHead.getHeaderSize()
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
byte[] fileHeaderBuffer = new byte[toRead];
rof.readFully(fileHeaderBuffer, toRead);
FileHeader fh = new FileHeader(blockHead, fileHeaderBuffer);
headers.add(fh);
newpos = fh.getPositionInFile() + fh.getHeaderSize()
+ fh.getFullPackSize();
rof.setPosition(newpos);
break;
case ProtectHeader:
toRead = blockHead.getHeaderSize()
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
byte[] protectHeaderBuffer = new byte[toRead];
rof.readFully(protectHeaderBuffer, toRead);
ProtectHeader ph = new ProtectHeader(blockHead,
protectHeaderBuffer);
newpos = ph.getPositionInFile() + ph.getHeaderSize()
+ ph.getDataSize();
rof.setPosition(newpos);
break;
case SubHeader: {
byte[] subHeadbuffer = new byte[SubBlockHeader.SubBlockHeaderSize];
rof.readFully(subHeadbuffer,
SubBlockHeader.SubBlockHeaderSize);
SubBlockHeader subHead = new SubBlockHeader(blockHead,
subHeadbuffer);
subHead.print();
switch (subHead.getSubType()) {
case MAC_HEAD: {
byte[] macHeaderbuffer = new byte[MacInfoHeader.MacInfoHeaderSize];
rof.readFully(macHeaderbuffer,
MacInfoHeader.MacInfoHeaderSize);
MacInfoHeader macHeader = new MacInfoHeader(subHead,
macHeaderbuffer);
macHeader.print();
headers.add(macHeader);
break;
}
// TODO implement other subheaders
case BEEA_HEAD:
break;
case EA_HEAD: {
byte[] eaHeaderBuffer = new byte[EAHeader.EAHeaderSize];
rof.readFully(eaHeaderBuffer, EAHeader.EAHeaderSize);
EAHeader eaHeader = new EAHeader(subHead,
eaHeaderBuffer);
eaHeader.print();
headers.add(eaHeader);
break;
}
case NTACL_HEAD:
break;
case STREAM_HEAD:
break;
case UO_HEAD:
toRead = subHead.getHeaderSize();
toRead -= BaseBlock.BaseBlockSize;
toRead -= BlockHeader.blockHeaderSize;
toRead -= SubBlockHeader.SubBlockHeaderSize;
byte[] uoHeaderBuffer = new byte[toRead];
rof.readFully(uoHeaderBuffer, toRead);
UnixOwnersHeader uoHeader = new UnixOwnersHeader(
subHead, uoHeaderBuffer);
uoHeader.print();
headers.add(uoHeader);
break;
default:
break;
}
break;
}
default:
logger.warning("Unknown Header");
throw new RarException(RarExceptionType.notRarArchive);
}
}
// logger.info("\n--------end header--------");
}
}
|
Vulnerability Classification:
- CWE: CWE-835
- CVE: CVE-2018-12418
- Severity: MEDIUM
- CVSS Score: 4.3
Description: make Archive slightly more robust against corrupt files. Add (#8)
unit test file from Apache Tika.
Function: readHeaders
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
Fixed Code:
private void readHeaders(long fileLength) throws IOException, RarException {
markHead = null;
newMhd = null;
headers.clear();
currentHeaderIndex = 0;
int toRead = 0;
//keep track of positions already processed for
//more robustness against corrupt files
Set<Long> processedPositions = new HashSet<Long>();
while (true) {
int size = 0;
long newpos = 0;
byte[] baseBlockBuffer = safelyAllocate(BaseBlock.BaseBlockSize, MAX_HEADER_SIZE);
long position = rof.getPosition();
// Weird, but is trying to read beyond the end of the file
if (position >= fileLength) {
break;
}
// logger.info("\n--------reading header--------");
size = rof.readFully(baseBlockBuffer, BaseBlock.BaseBlockSize);
if (size == 0) {
break;
}
BaseBlock block = new BaseBlock(baseBlockBuffer);
block.setPositionInFile(position);
switch (block.getHeaderType()) {
case MarkHeader:
markHead = new MarkHeader(block);
if (!markHead.isSignature()) {
throw new RarException(
RarException.RarExceptionType.badRarArchive);
}
headers.add(markHead);
// markHead.print();
break;
case MainHeader:
toRead = block.hasEncryptVersion() ? MainHeader.mainHeaderSizeWithEnc
: MainHeader.mainHeaderSize;
byte[] mainbuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(mainbuff, toRead);
MainHeader mainhead = new MainHeader(block, mainbuff);
headers.add(mainhead);
this.newMhd = mainhead;
if (newMhd.isEncrypted()) {
throw new RarException(
RarExceptionType.rarEncryptedException);
}
// mainhead.print();
break;
case SignHeader:
toRead = SignHeader.signHeaderSize;
byte[] signBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(signBuff, toRead);
SignHeader signHead = new SignHeader(block, signBuff);
headers.add(signHead);
// logger.info("HeaderType: SignHeader");
break;
case AvHeader:
toRead = AVHeader.avHeaderSize;
byte[] avBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(avBuff, toRead);
AVHeader avHead = new AVHeader(block, avBuff);
headers.add(avHead);
// logger.info("headertype: AVHeader");
break;
case CommHeader:
toRead = CommentHeader.commentHeaderSize;
byte[] commBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(commBuff, toRead);
CommentHeader commHead = new CommentHeader(block, commBuff);
headers.add(commHead);
// logger.info("method: "+commHead.getUnpMethod()+"; 0x"+
// Integer.toHexString(commHead.getUnpMethod()));
newpos = commHead.getPositionInFile()
+ commHead.getHeaderSize();
if (processedPositions.contains(newpos)) {
throw new RarException(RarExceptionType.badRarArchive);
}
processedPositions.add(newpos);
rof.setPosition(newpos);
break;
case EndArcHeader:
toRead = 0;
if (block.hasArchiveDataCRC()) {
toRead += EndArcHeader.endArcArchiveDataCrcSize;
}
if (block.hasVolumeNumber()) {
toRead += EndArcHeader.endArcVolumeNumberSize;
}
EndArcHeader endArcHead;
if (toRead > 0) {
byte[] endArchBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(endArchBuff, toRead);
endArcHead = new EndArcHeader(block, endArchBuff);
// logger.info("HeaderType: endarch\ndatacrc:"+
// endArcHead.getArchiveDataCRC());
} else {
// logger.info("HeaderType: endarch - no Data");
endArcHead = new EndArcHeader(block, null);
}
headers.add(endArcHead);
// logger.info("\n--------end header--------");
return;
default:
byte[] blockHeaderBuffer = safelyAllocate(BlockHeader.blockHeaderSize, MAX_HEADER_SIZE);
rof.readFully(blockHeaderBuffer, BlockHeader.blockHeaderSize);
BlockHeader blockHead = new BlockHeader(block,
blockHeaderBuffer);
switch (blockHead.getHeaderType()) {
case NewSubHeader:
case FileHeader:
toRead = blockHead.getHeaderSize()
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
byte[] fileHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(fileHeaderBuffer, toRead);
FileHeader fh = new FileHeader(blockHead, fileHeaderBuffer);
headers.add(fh);
newpos = fh.getPositionInFile() + fh.getHeaderSize()
+ fh.getFullPackSize();
if (processedPositions.contains(newpos)) {
throw new RarException(RarExceptionType.badRarArchive);
}
processedPositions.add(newpos);
rof.setPosition(newpos);
break;
case ProtectHeader:
toRead = blockHead.getHeaderSize()
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
byte[] protectHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(protectHeaderBuffer, toRead);
ProtectHeader ph = new ProtectHeader(blockHead,
protectHeaderBuffer);
newpos = ph.getPositionInFile() + ph.getHeaderSize()
+ ph.getDataSize();
if (processedPositions.contains(newpos)) {
throw new RarException(RarExceptionType.badRarArchive);
}
processedPositions.add(newpos);
rof.setPosition(newpos);
break;
case SubHeader: {
byte[] subHeadbuffer = safelyAllocate(SubBlockHeader.SubBlockHeaderSize, MAX_HEADER_SIZE);
rof.readFully(subHeadbuffer,
SubBlockHeader.SubBlockHeaderSize);
SubBlockHeader subHead = new SubBlockHeader(blockHead,
subHeadbuffer);
subHead.print();
switch (subHead.getSubType()) {
case MAC_HEAD: {
byte[] macHeaderbuffer = safelyAllocate(MacInfoHeader.MacInfoHeaderSize, MAX_HEADER_SIZE);
rof.readFully(macHeaderbuffer,
MacInfoHeader.MacInfoHeaderSize);
MacInfoHeader macHeader = new MacInfoHeader(subHead,
macHeaderbuffer);
macHeader.print();
headers.add(macHeader);
break;
}
// TODO implement other subheaders
case BEEA_HEAD:
break;
case EA_HEAD: {
byte[] eaHeaderBuffer = safelyAllocate(EAHeader.EAHeaderSize, MAX_HEADER_SIZE);
rof.readFully(eaHeaderBuffer, EAHeader.EAHeaderSize);
EAHeader eaHeader = new EAHeader(subHead,
eaHeaderBuffer);
eaHeader.print();
headers.add(eaHeader);
break;
}
case NTACL_HEAD:
break;
case STREAM_HEAD:
break;
case UO_HEAD:
toRead = subHead.getHeaderSize();
toRead -= BaseBlock.BaseBlockSize;
toRead -= BlockHeader.blockHeaderSize;
toRead -= SubBlockHeader.SubBlockHeaderSize;
byte[] uoHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rof.readFully(uoHeaderBuffer, toRead);
UnixOwnersHeader uoHeader = new UnixOwnersHeader(
subHead, uoHeaderBuffer);
uoHeader.print();
headers.add(uoHeader);
break;
default:
break;
}
break;
}
default:
logger.warning("Unknown Header");
throw new RarException(RarExceptionType.notRarArchive);
}
}
// logger.info("\n--------end header--------");
}
}
|
[
"CWE-835"
] |
CVE-2018-12418
|
MEDIUM
| 4.3
|
junrar
|
readHeaders
|
src/main/java/com/github/junrar/Archive.java
|
ad8d0ba8e155630da8a1215cee3f253e0af45817
| 1
|
Analyze the following code function for security vulnerabilities
|
private static boolean isCompatible(InterfacesConfig c1, InterfacesConfig c2) {
boolean c1Disabled = c1 == null || !c1.isEnabled();
boolean c2Disabled = c2 == null || !c2.isEnabled();
return c1 == c2 || (c1Disabled && c2Disabled) || (c1 != null && c2 != null
&& nullSafeEqual(new ArrayList<String>(c1.getInterfaces()), new ArrayList<String>(c2.getInterfaces())));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatible
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
isCompatible
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void cleanField(String structureInode, Field field) throws DotDataException, DotStateException, DotSecurityException {
/*Client client = new ESClient().getClient();
QueryBuilder query = QueryBuilders.termQuery("stInode", structureInode);
SearchResponse searchResponse = client.prepareSearch().setSearchType(SearchType.SCAN).setQuery(query).setSize(10)
.setScroll(TimeValue.timeValueMinutes(30)).execute().actionGet();
while (true) {
searchResponse = client.prepareSearchScroll(searchResponse.scrollId()).setScroll(TimeValue.timeValueMinutes(30)).execute()
.actionGet();
for (SearchHit hit : searchResponse.hits()) {
try {
Contentlet con = loadInode(hit);
con.getMap().remove(field.getVelocityVarName());
save(con);
} catch (DotMappingException e) {
throw new DotDataException(e.getMessage());
}
}
if (searchResponse.hits().totalHits() == 0) {
break;
}
}*/
StringBuffer sql = new StringBuffer("update contentlet set " );
if(field.getFieldContentlet().indexOf("float") != -1){
if(DbConnectionFactory.isMySql())
sql.append(field.getFieldContentlet() + " = ");
else
sql.append("\""+field.getFieldContentlet()+"\"" + " = ");
}else{
sql.append(field.getFieldContentlet() + " = ");
}
if(field.getFieldContentlet().indexOf("bool") != -1){
sql.append(DbConnectionFactory.getDBFalse());
}else if(field.getFieldContentlet().indexOf("date") != -1){
sql.append(DbConnectionFactory.getDBDateTimeFunction());
}else if(field.getFieldContentlet().indexOf("float") != -1){
sql.append(0.0);
}else if(field.getFieldContentlet().indexOf("integer") != -1){
sql.append(0);
}else{
sql.append("''");
}
sql.append(" where structure_inode = ?");
DotConnect dc = new DotConnect();
dc.setSQL(sql.toString());
dc.addParam(structureInode);
dc.loadResult();
//we could do a select here to figure out exactly which guys to evict
cc.clearCache();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanField
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
cleanField
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProperty(ArrayList<CssProperty> properties) {
style.setProperty(properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProperty
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
setProperty
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setConfigProvider(SAMLConfigurationProvider configurationProvider) {
this.configProvider = configurationProvider;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConfigProvider
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
setConfigProvider
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
private WaitFragment getWaitFragment() {
return (WaitFragment) getFragmentManager().findFragmentByTag(TAG_WAIT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWaitFragment
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
getWaitFragment
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Node composeValueNode(MappingNode node) {
return composeNode(node);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: composeValueNode
File: src/main/java/org/yaml/snakeyaml/composer/Composer.java
Repository: snakeyaml
The code follows secure coding practices.
|
[
"CWE-776"
] |
CVE-2022-25857
|
HIGH
| 7.5
|
snakeyaml
|
composeValueNode
|
src/main/java/org/yaml/snakeyaml/composer/Composer.java
|
fc300780da21f4bb92c148bc90257201220cf174
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getFqdnExactMatch() {
return mFqdnExactMatch;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFqdnExactMatch
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
getFqdnExactMatch
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void get(String table, Class<T> clazz, String[] fields, String filter,
boolean returnCount, boolean setId,
Handler<AsyncResult<Results<T>>> replyHandler) {
String where = "";
if(filter != null){
where = filter;
}
String fieldsStr = Arrays.toString(fields);
get(table, clazz, fieldsStr.substring(1, fieldsStr.length()-1), where, returnCount, true, setId, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
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
|
get
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void bindCameraPrewarmService() {
Intent intent = getCameraIntent();
ActivityInfo targetInfo = PreviewInflater.getTargetActivityInfo(mContext, intent,
KeyguardUpdateMonitor.getCurrentUser(), true /* onlyDirectBootAware */);
if (targetInfo != null && targetInfo.metaData != null) {
String clazz = targetInfo.metaData.getString(
MediaStore.META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE);
if (clazz != null) {
Intent serviceIntent = new Intent();
serviceIntent.setClassName(targetInfo.packageName, clazz);
serviceIntent.setAction(CameraPrewarmService.ACTION_PREWARM);
try {
if (getContext().bindServiceAsUser(serviceIntent, mPrewarmConnection,
Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
new UserHandle(UserHandle.USER_CURRENT))) {
mPrewarmBound = true;
}
} catch (SecurityException e) {
Log.w(TAG, "Unable to bind to prewarm service package=" + targetInfo.packageName
+ " class=" + clazz, e);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindCameraPrewarmService
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
bindCameraPrewarmService
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @Nullable String bindSelection(@Nullable String selection,
@Nullable Object... selectionArgs) {
if (selection == null) return null;
// If no arguments provided, so we can't bind anything
if (ArrayUtils.isEmpty(selectionArgs)) return selection;
// If no bindings requested, so we can shortcut
if (selection.indexOf('?') == -1) return selection;
// Track the chars immediately before and after each bind request, to
// decide if it needs additional whitespace added
char before = ' ';
char after = ' ';
int argIndex = 0;
final int len = selection.length();
final StringBuilder res = new StringBuilder(len);
for (int i = 0; i < len; ) {
char c = selection.charAt(i++);
if (c == '?') {
// Assume this bind request is guarded until we find a specific
// trailing character below
after = ' ';
// Sniff forward to see if the selection is requesting a
// specific argument index
int start = i;
for (; i < len; i++) {
c = selection.charAt(i);
if (c < '0' || c > '9') {
after = c;
break;
}
}
if (start != i) {
argIndex = Integer.parseInt(selection.substring(start, i)) - 1;
}
// Manually bind the argument into the selection, adding
// whitespace when needed for clarity
final Object arg = selectionArgs[argIndex++];
if (before != ' ' && before != '=') res.append(' ');
switch (DatabaseUtils.getTypeOfObject(arg)) {
case Cursor.FIELD_TYPE_NULL:
res.append("NULL");
break;
case Cursor.FIELD_TYPE_INTEGER:
res.append(((Number) arg).longValue());
break;
case Cursor.FIELD_TYPE_FLOAT:
res.append(((Number) arg).doubleValue());
break;
case Cursor.FIELD_TYPE_BLOB:
throw new IllegalArgumentException("Blobs not supported");
case Cursor.FIELD_TYPE_STRING:
default:
if (arg instanceof Boolean) {
// Provide compatibility with legacy applications which may pass
// Boolean values in bind args.
res.append(((Boolean) arg).booleanValue() ? 1 : 0);
} else {
res.append('\'');
res.append(arg.toString());
res.append('\'');
}
break;
}
if (after != ' ') res.append(' ');
} else {
res.append(c);
before = c;
}
}
return res.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindSelection
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
bindSelection
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IActivityContainer createVirtualActivityContainer(IBinder parentActivityToken,
IActivityContainerCallback callback) throws RemoteException {
enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
"createActivityContainer()");
synchronized (this) {
if (parentActivityToken == null) {
throw new IllegalArgumentException("parent token must not be null");
}
ActivityRecord r = ActivityRecord.forTokenLocked(parentActivityToken);
if (r == null) {
return null;
}
if (callback == null) {
throw new IllegalArgumentException("callback must not be null");
}
return mStackSupervisor.createVirtualActivityContainer(r, callback);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createVirtualActivityContainer
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
|
createVirtualActivityContainer
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
void removePendingActivityLaunchesLocked(ActivityStack stack) {
for (int palNdx = mPendingActivityLaunches.size() - 1; palNdx >= 0; --palNdx) {
PendingActivityLaunch pal = mPendingActivityLaunches.get(palNdx);
if (pal.stack == stack) {
mPendingActivityLaunches.remove(palNdx);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePendingActivityLaunchesLocked
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
|
removePendingActivityLaunchesLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Dialog onCreateDialog(int dialogId) {
return VoicemailDialogUtil.getDialog(this, dialogId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateDialog
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onCreateDialog
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<QuestionItem> process(File file) {
//export zip file
List<QuestionItem> items = new ArrayList<>();
try(FileSystem fs = FileSystems.newFileSystem(file.toPath(), null)) {
Path fPath = fs.getPath("/");
if(fPath != null) {
ImsManifestVisitor visitor = new ImsManifestVisitor();
Files.walkFileTree(fPath, visitor);
List<Path> imsmanifests = visitor.getImsmanifestFiles();
for(Path imsmanifest:imsmanifests) {
ManifestBuilder manifestBuilder = ManifestBuilder.read(imsmanifest);
List<ResourceType> resources = manifestBuilder.getResourceList();
for(ResourceType resource:resources) {
ManifestMetadataBuilder metadataBuilder = manifestBuilder.getMetadataBuilder(resource, true);
QuestionItem qitem = processResource(resource, imsmanifest, metadataBuilder);
if(qitem != null) {
items.add(qitem);
}
}
}
}
} catch (IOException e) {
log.error("", e);
}
return items;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: process
File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
process
|
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getHttpMethod() {
return isMethodBrowserSupported(getMethod()) ? getMethod() : DEFAULT_METHOD;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHttpMethod
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
getHttpMethod
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public V get(K name, V defaultValue) {
V value = get(name);
if (value == null) {
return defaultValue;
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
get
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void writeBody(ObjectOutput out, ByteArrayOutputStream bout) throws IOException {
this.out.flush();
byte[] buf = this.bout.toByteArray();
out.writeInt(buf.length);
out.write(buf);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeBody
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
writeBody
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private File getKeyFile() {
File dir = new File(Hudson.getInstance().getRootDir(),"subversion-credentials");
if(dir.mkdirs()) {
// make sure the directory exists. if we created it, try to set the permission to 600
// since this is sensitive information
setFilePermissions(dir, "600");
}
return new File(dir,id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyFile
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getKeyFile
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPermissionRequest(final PermissionRequest request) {
Log.d("Codename One", "onPermissionRequest");
getActivity().runOnUiThread(new Runnable() {
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void run() {
String allowedOrigins = Display.getInstance().getProperty("android.WebView.grantPermissionsFrom", null);
if (allowedOrigins != null) {
String[] origins = Util.split(allowedOrigins, " ");
boolean allowed = false;
for (String origin : origins) {
if (request.getOrigin().toString().equals(origin)) {
allowed = true;
break;
}
}
if (allowed) {
Log.d("Codename One", "Allowing permission for "+Arrays.toString(request.getResources())+" in web view for origin "+request.getOrigin());
request.grant(request.getResources());
} else {
Log.d("Codename One", "Denying permission for "+Arrays.toString(request.getResources())+" in web view for origin "+request.getOrigin());
request.deny();
}
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPermissionRequest
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onPermissionRequest
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public HashMap getNamedDestinationFromNames(boolean keepNames) {
HashMap names = new HashMap();
if (catalog.get(PdfName.DESTS) != null) {
PdfDictionary dic = (PdfDictionary)getPdfObjectRelease(catalog.get(PdfName.DESTS));
if (dic == null)
return names;
Set keys = dic.getKeys();
for (Iterator it = keys.iterator(); it.hasNext();) {
PdfName key = (PdfName)it.next();
PdfArray arr = getNameArray(dic.get(key));
if (arr == null)
continue;
if (keepNames) {
names.put(key, arr);
}
else {
String name = PdfName.decodeName(key.toString());
names.put(name, arr);
}
}
}
return names;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNamedDestinationFromNames
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
|
getNamedDestinationFromNames
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void handleResult(boolean success, boolean invalidNumber) {
if (success) {
if (DBG) log("handleResult: success!");
showStatus(getResources().getText(mAddContact ?
R.string.fdn_contact_added : R.string.fdn_contact_updated));
} else {
if (DBG) log("handleResult: failed!");
if (invalidNumber) {
showStatus(getResources().getString(R.string.fdn_invalid_number,
mFdnNumberLimitLength));
} else {
if (PhoneFactory.getDefaultPhone().getIccCard().getIccPin2Blocked()) {
showStatus(getResources().getText(R.string.fdn_enable_puk2_requested));
} else if (PhoneFactory.getDefaultPhone().getIccCard().getIccPuk2Blocked()) {
showStatus(getResources().getText(R.string.puk2_blocked));
} else {
// There's no way to know whether the failure is due to incorrect PIN2 or
// an inappropriate phone number.
showStatus(getResources().getText(R.string.pin2_or_fdn_invalid));
}
}
}
mHandler.postDelayed(() -> finish(), 2000);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleResult
File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
handleResult
|
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CharSink asCharSink(File file, Charset charset, FileWriteMode... modes) {
return asByteSink(file, modes).asCharSink(charset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asCharSink
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
asCharSink
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean sendMessages(final byte[]... rawMessages) {
state = new AjpRequestParseState();
final StreamConnection underlyingChannel = connection.getChannel();
underlyingChannel.getSourceChannel().suspendReads();
// detect buffer size
int bufferSize = 0;
for (int i = 0; i < rawMessages.length; i++) {
bufferSize += rawMessages[i].length;
}
// fill in buffer
final ByteBuffer buffer = ByteBuffer.allocate(bufferSize);
for (int i = 0; i < rawMessages.length; i++) {
buffer.put(rawMessages[i]);
}
buffer.flip();
// send buffer content
int res;
try {
do {
res = underlyingChannel.getSinkChannel().write(buffer);
if (res == 0) {
underlyingChannel.getSinkChannel().setWriteListener(new ChannelListener<ConduitStreamSinkChannel>() {
@Override
public void handleEvent(ConduitStreamSinkChannel channel) {
int res;
do {
try {
res = channel.write(buffer);
if (res == 0) {
return;
}
} catch (IOException e) {
UndertowLogger.REQUEST_IO_LOGGER.ioException(e);
safeClose(connection);
}
} while (buffer.hasRemaining());
channel.suspendWrites();
AjpReadListener.this.handleEvent(underlyingChannel.getSourceChannel());
}
});
underlyingChannel.getSinkChannel().resumeWrites();
return false;
}
} while (buffer.hasRemaining());
return true;
} catch (IOException e) {
UndertowLogger.REQUEST_IO_LOGGER.ioException(e);
safeClose(connection);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMessages
File: core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-252"
] |
CVE-2022-1319
|
HIGH
| 7.5
|
undertow-io/undertow
|
sendMessages
|
core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
|
1443a1a2bbb8e32e56788109d8285db250d55c8b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<String> convertToStrings(Object value) {
if (value instanceof String)
return Lists.newArrayList((String)value);
else
return new ArrayList<>();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToStrings
File: server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/TextInput.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21248
|
MEDIUM
| 6.5
|
theonedev/onedev
|
convertToStrings
|
server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/TextInput.java
|
39d95ab8122c5d9ed18e69dc024870cae08d2d60
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPosition() {
return super.getPosition() + entryPositionCounter + STATIC_TABLE_LENGTH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPosition
File: core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getPosition
|
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @Nullable String extractFileName(@Nullable String data) {
if (data == null) return null;
data = extractDisplayName(data);
final int lastDot = data.lastIndexOf('.');
if (lastDot == -1) {
return data;
} else {
return data.substring(0, lastDot);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractFileName
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
extractFileName
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setName(String name)
{
if (name != null) {
DocumentReference reference = getDocumentReference();
// TODO: ensure that other parameters are copied properly
setDocumentReferenceInternal(
new DocumentReference(name, new SpaceReference(reference.getParent()), reference.getLocale()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
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
|
setName
|
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
|
protected CompletableFuture<RetentionPolicies> internalGetRetention(boolean applied) {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getRetentionPolicies).orElseGet(() -> {
if (applied) {
RetentionPolicies policies = getNamespacePolicies(namespaceName).retention_policies;
return policies == null ? new RetentionPolicies(
config().getDefaultRetentionTimeInMinutes(), config().getDefaultRetentionSizeInMB())
: policies;
}
return null;
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetRetention
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGetRetention
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
@Override
public @Nullable String getString(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getString columnIndex: {0}", columnIndex);
byte[] value = getRawValue(columnIndex);
if (value == null) {
return null;
}
// varchar in binary is same as text, other binary fields are converted to their text format
if (isBinary(columnIndex) && getSQLType(columnIndex) != Types.VARCHAR) {
Field field = fields[columnIndex - 1];
Object obj = internalGetObject(columnIndex, field);
if (obj == null) {
// internalGetObject() knows jdbc-types and some extra like hstore. It does not know of
// PGobject based types like geometric types but getObject does
obj = getObject(columnIndex);
if (obj == null) {
return null;
}
return obj.toString();
}
// hack to be compatible with text protocol
if (obj instanceof java.util.Date) {
int oid = field.getOID();
return getTimestampUtils().timeToString((java.util.Date) obj,
oid == Oid.TIMESTAMPTZ || oid == Oid.TIMETZ);
}
if ("hstore".equals(getPGType(columnIndex))) {
return HStoreConverter.toString((Map<?, ?>) obj);
}
return trimString(columnIndex, obj.toString());
}
Encoding encoding = connection.getEncoding();
try {
return trimString(columnIndex, encoding.decode(value));
} catch (IOException ioe) {
throw new PSQLException(
GT.tr(
"Invalid character data was found. This is most likely caused by stored data containing characters that are invalid for the character set the database was created in. The most common example of this is storing 8bit data in a SQL_ASCII database."),
PSQLState.DATA_ERROR, ioe);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getString
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void useAvatar(Project project, String avatarData) {
Lock avatarLock = LockUtils.getLock("uploaded-project-avatar:" + project.getId());
avatarLock.lock();
try {
File avatarFile = getUploaded(project.getId());
FileUtils.createDir(avatarFile.getParentFile());
AvatarUploadField.writeToFile(avatarFile, avatarData);
} finally {
avatarLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: useAvatar
File: server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2022-39208
|
HIGH
| 7.5
|
theonedev/onedev
|
useAvatar
|
server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java
|
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserSwitchComplete(int newUserId) throws RemoteException {
mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCH_COMPLETE,
newUserId, 0));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserSwitchComplete
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onUserSwitchComplete
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private String extractOriginOrReferer(HttpExchange pExchange) {
Headers headers = pExchange.getRequestHeaders();
String origin = headers.getFirst("Origin");
if (origin == null) {
origin = headers.getFirst("Referer");
}
return origin != null ? origin.replaceAll("[\\n\\r]*","") : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractOriginOrReferer
File: agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-1000129
|
MEDIUM
| 4.3
|
jolokia
|
extractOriginOrReferer
|
agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java
|
5895d5c137c335e6b473e9dcb9baf748851bbc5f
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private Set<Integer> updatePasswordExpirationsLocked(int userHandle) {
final ArraySet<Integer> affectedUserIds = new ArraySet<>();
List<ActiveAdmin> admins = getActiveAdminsForLockscreenPoliciesLocked(userHandle);
for (int i = 0; i < admins.size(); i++) {
ActiveAdmin admin = admins.get(i);
if (admin.isPermissionBased || admin.info.usesPolicy(DeviceAdminInfo.USES_POLICY_EXPIRE_PASSWORD)) {
affectedUserIds.add(admin.getUserHandle().getIdentifier());
long timeout = admin.passwordExpirationTimeout;
admin.passwordExpirationDate =
timeout > 0L ? (timeout + System.currentTimeMillis()) : 0L;
}
}
return affectedUserIds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePasswordExpirationsLocked
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
|
updatePasswordExpirationsLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getComments() {
return comments;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComments
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getComments
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void saveNfcOnSetting(boolean on) {
synchronized (NfcService.this) {
mPrefsEditor.putBoolean(PREF_NFC_ON, on);
mPrefsEditor.apply();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveNfcOnSetting
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
saveNfcOnSetting
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object getWindowManagerLock() {
return mWindowMap;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWindowManagerLock
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
|
getWindowManagerLock
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private AttachmentVersioningStore getAttachmentVersioningStore(XWikiAttachment attachment)
throws ComponentLookupException
{
String storeHint = attachment.getArchiveStore();
if (storeHint != null && !storeHint.equals(HINT)) {
return this.componentManager.getInstance(AttachmentVersioningStore.class, storeHint);
}
return this.attachmentArchiveStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentVersioningStore
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getAttachmentVersioningStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUserApproveNoCaCert(int networkId, boolean approved) {
WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
if (internalConfig == null) return;
if (!internalConfig.isEnterprise()) return;
if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) return;
internalConfig.enterpriseConfig.setUserApproveNoCaCert(approved);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserApproveNoCaCert
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
setUserApproveNoCaCert
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void replace(final DomNode newNode) {
if (newNode != this) {
final DomNode exParent = parent_;
final DomNode exNextSibling = nextSibling_;
remove();
exParent.insertBefore(newNode, exNextSibling);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replace
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
|
replace
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.