instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private void logPasswordComplexityRequiredIfSecurityLogEnabled(String adminPackageName,
int userId,
boolean parent, int complexity) {
if (SecurityLog.isLoggingEnabled()) {
final int affectedUserId = parent ? getProfileParentId(userId) : userId;
SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_COMPLEXITY_REQUIRED,
adminPackageName, userId, affectedUserId, complexity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logPasswordComplexityRequiredIfSecurityLogEnabled
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
|
logPasswordComplexityRequiredIfSecurityLogEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
final int startActivitiesInPackage(int uid, String callingPackage,
Intent[] intents, String[] resolvedTypes, IBinder resultTo,
Bundle bOptions, int userId) {
userId = mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
userId, false, ALLOW_FULL_ONLY, "startActivityInPackage", null);
// TODO: Switch to user app stacks here.
int ret = mActivityStarter.startActivities(null, uid, callingPackage, intents, resolvedTypes,
resultTo, bOptions, userId);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivitiesInPackage
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
startActivitiesInPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeLockDocument(XWikiDocument document, XWikiContext context)
{
try {
XWikiLock lock = document.getLock(context);
EditForm editForm = (EditForm) context.getForm();
if (lock == null || lock.getUserName().equals(context.getUser()) || editForm.isLockForce()) {
document.setLock(context.getUser(), context);
}
} catch (Exception e) {
// Lock should never make XWiki fail, but we should log any related information.
LOGGER.error("Exception while setting up lock", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeLockDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-46242
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
maybeLockDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
|
cf8eb861998ea423c3645d2e5e974420b0e882be
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setDeviceOwnerType(@NonNull ComponentName admin,
@DeviceOwnerType int deviceOwnerType) {
Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(
permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));
synchronized (getLockObject()) {
setDeviceOwnerTypeLocked(admin, deviceOwnerType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceOwnerType
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
|
setDeviceOwnerType
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWebhookUrl(@Nullable URI webhookUrl) {
this.webhookUrl = webhookUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWebhookUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setWebhookUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
private ZoneId getZone(DeserializationContext context)
{
// Instants are always in UTC, so don't waste compute cycles
return (_valueClass == Instant.class) ? null : context.getTimeZone().toZoneId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getZone
File: datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
getZone
|
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void insertUrl(AjaxRequestTarget target, boolean isImage, String url,
String name, @Nullable String replaceMessage) {
String script = String.format("onedev.server.markdown.insertUrl('%s', %s, '%s', '%s', %s);",
container.getMarkupId(), isImage, StringEscapeUtils.escapeEcmaScript(url),
StringEscapeUtils.escapeEcmaScript(name),
replaceMessage!=null?"'"+replaceMessage+"'":"undefined");
target.appendJavaScript(script);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertUrl
File: server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21242
|
HIGH
| 7.5
|
theonedev/onedev
|
insertUrl
|
server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
PhoneAccountRegistrar getPhoneAccountRegistrar() {
return mPhoneAccountRegistrar;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPhoneAccountRegistrar
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
getPhoneAccountRegistrar
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "9.0RC1")
public void fromXML(Document domdoc, boolean withArchive) throws XWikiException
{
// Serialize the Document (could not find a way to convert a dom4j Document into a usable StAX source)
StringWriter writer = new StringWriter();
try {
org.dom4j.io.XMLWriter domWriter = new org.dom4j.io.XMLWriter(writer);
domWriter.write(domdoc);
domWriter.flush();
} catch (IOException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_DOC, XWikiException.ERROR_DOC_XML_PARSING,
"Error parsing xml", e, null);
}
// Actually parse the XML
fromXML(writer.toString(), withArchive);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromXML
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
fromXML
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PackageInfo getPackageInfo(String packageName, int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get package info");
// reader
synchronized (mPackages) {
PackageParser.Package p = mPackages.get(packageName);
if (DEBUG_PACKAGE_INFO)
Log.v(TAG, "getPackageInfo " + packageName + ": " + p);
if (p != null) {
return generatePackageInfo(p, flags, userId);
}
if((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0) {
return generatePackageInfoFromSettingsLPw(packageName, flags, userId);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageInfo
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getPackageInfo
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@HotPath(caller = HotPath.PROCESS_CHANGE)
@Override
public void clearHeavyWeightProcessIfEquals(WindowProcessController proc) {
synchronized (mGlobalLockWithoutBoost) {
ActivityTaskManagerService.this.clearHeavyWeightProcessIfEquals(proc);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearHeavyWeightProcessIfEquals
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
|
clearHeavyWeightProcessIfEquals
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isPatternValid(String input) {
return (CONFIG_MIMETYPE_PATTERN.matcher(input).matches());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPatternValid
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
isPatternValid
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processRemoveProducer(ProducerId id) throws Exception {
SessionId sessionId = id.getParentId();
ConnectionId connectionId = sessionId.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
SessionState ss = cs.getSessionState(sessionId);
if (ss == null) {
throw new IllegalStateException("Cannot remove a producer from a session that had not been registered: "
+ sessionId);
}
ProducerState ps = ss.removeProducer(id);
if (ps == null) {
throw new IllegalStateException("Cannot remove a producer that had not been registered: " + id);
}
removeProducerBrokerExchange(id);
broker.removeProducer(cs.getContext(), ps.getInfo());
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRemoveProducer
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
|
processRemoveProducer
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onDisplayAdded(int displayId) {
if (DEBUG_STACK) Slog.v(TAG, "Display added displayId=" + displayId);
mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISPLAY_ADDED, displayId, 0));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDisplayAdded
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
|
onDisplayAdded
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParceledListSlice<PermissionInfo> queryPermissionsByGroup(String groupName, int flags) {
List<PermissionInfo> permissionInfo =
mPermissionManagerServiceImpl.queryPermissionsByGroup(groupName, flags);
if (permissionInfo == null) {
return null;
}
return new ParceledListSlice<>(permissionInfo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryPermissionsByGroup
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
queryPermissionsByGroup
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
static void checkLicense(AbstractConfiguration configuration) {
if (!configuration.isProductionMode()) {
LicenseChecker.checkLicense(PROJECT_NAME, VERSION);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkLicense
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
checkLicense
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
|
0b82a606eeafdf56a129630f00b9c55a5177b64b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int checkPermissionUncached(@Nullable String permission, int pid, int uid) {
final IActivityManager am = ActivityManager.getService();
if (am == null) {
// Well this is super awkward; we somehow don't have an active ActivityManager
// instance. If we're testing a root or system UID, then they totally have whatever
// permission this is.
final int appId = UserHandle.getAppId(uid);
if (appId == Process.ROOT_UID || appId == Process.SYSTEM_UID) {
if (sShouldWarnMissingActivityManager) {
Slog.w(LOG_TAG, "Missing ActivityManager; assuming " + uid + " holds "
+ permission);
sShouldWarnMissingActivityManager = false;
}
return PackageManager.PERMISSION_GRANTED;
}
Slog.w(LOG_TAG, "Missing ActivityManager; assuming " + uid + " does not hold "
+ permission);
return PackageManager.PERMISSION_DENIED;
}
try {
sShouldWarnMissingActivityManager = true;
return am.checkPermission(permission, pid, uid);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermissionUncached
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
checkPermissionUncached
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean showSilentInStatusBar(String pkg) {
try {
return !sINM.shouldHideSilentStatusIcons(pkg);
} 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: showSilentInStatusBar
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
|
showSilentInStatusBar
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendResourcesChangedBroadcast(boolean mediaStatus, boolean replacing,
ArrayList<String> pkgList, int uidArr[], IIntentReceiver finishedReceiver) {
sendResourcesChangedBroadcast(mediaStatus, replacing,
pkgList.toArray(new String[pkgList.size()]), uidArr, finishedReceiver);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendResourcesChangedBroadcast
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
sendResourcesChangedBroadcast
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void overrideCurrentName(String name)
{
// Simple, but need to look for START_OBJECT/ARRAY's "off-by-one" thing:
CBORReadContext ctxt = _parsingContext;
if (_currToken == JsonToken.START_OBJECT || _currToken == JsonToken.START_ARRAY) {
ctxt = ctxt.getParent();
}
// Unfortunate, but since we did not expose exceptions, need to wrap
try {
ctxt.setCurrentName(name);
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: overrideCurrentName
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
overrideCurrentName
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String makeQueryString(final HttpServletRequest request, final String[] ignores) {
return (makeQueryString(request, EMPTY_MAP, ignores));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeQueryString
File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-0869
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
makeQueryString
|
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
|
66b4ba96a18b9952f25a350bbccc2a7e206238d1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void evaluateJavaScript(String script, JavaScriptCallback callback) {
if (mNativeContentViewCore == 0) return;
nativeEvaluateJavaScript(mNativeContentViewCore, script, callback, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: evaluateJavaScript
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
evaluateJavaScript
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean hasWriteOperations() {
return putOperations != null || invalidateOperations != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasWriteOperations
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
hasWriteOperations
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public XWikiDocument getDocument(String spaces, String fullname, XWikiContext context) throws XWikiException
{
int dotPosition = fullname.lastIndexOf('.');
if (dotPosition != -1) {
String spaceFromFullname = fullname.substring(0, dotPosition);
String name = fullname.substring(dotPosition + 1);
if (name.equals("")) {
name = getDefaultPage(context);
}
return getDocument(spaceFromFullname + "." + name, context);
} else {
return getDocument(spaces + "." + fullname, context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public AsyncHttpClientConfigBean setIdleConnectionTimeoutInMs(int idleConnectionTimeoutInMs) {
this.idleConnectionTimeoutInMs = idleConnectionTimeoutInMs;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIdleConnectionTimeoutInMs
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setIdleConnectionTimeoutInMs
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkRegistrationAuthorization(XWikiDocument document, Scope scope) throws AccessDeniedException
{
switch (scope) {
case GLOBAL:
this.authorizationManager.checkAccess(Right.PROGRAM, document.getAuthorReference(), null);
break;
case WIKI:
this.authorizationManager.checkAccess(Right.ADMIN, document.getAuthorReference(), document
.getDocumentReference().getWikiReference());
break;
default:
break;
}
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2023-29510
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-19749: Require script right for translations with user scope
* Add a new configuration option.
* Migrate tests to JUnit 5 and add a new test.
Function: checkRegistrationAuthorization
File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
Repository: xwiki/xwiki-platform
Fixed Code:
private void checkRegistrationAuthorization(XWikiDocument document, Scope scope) throws AccessDeniedException
{
switch (scope) {
case GLOBAL:
this.authorizationManager.checkAccess(Right.PROGRAM, document.getAuthorReference(), null);
break;
case WIKI:
this.authorizationManager.checkAccess(Right.ADMIN, document.getAuthorReference(), document
.getDocumentReference().getWikiReference());
break;
case USER:
if (this.configuration.isRestrictUserTranslations()) {
this.authorizationManager.checkAccess(Right.SCRIPT, document.getAuthorReference(),
document.getDocumentReference());
}
break;
default:
break;
}
}
|
[
"CWE-74"
] |
CVE-2023-29510
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
checkRegistrationAuthorization
|
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
|
d06ff8a58480abc7f63eb1d4b8b366024d990643
| 1
|
Analyze the following code function for security vulnerabilities
|
private List<ActiveAdmin> getProfileOwnerAdminsForCurrentProfileGroup() {
synchronized (getLockObject()) {
final List<ActiveAdmin> admins = new ArrayList<>();
int[] users = mUserManager.getProfileIdsWithDisabled(
mInjector.userHandleGetCallingUserId());
for (int i = 0; i < users.length; i++) {
final ComponentName componentName = getProfileOwnerAsUser(users[i]);
if (componentName != null) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(componentName, users[i]);
if (admin != null) {
admins.add(admin);
}
}
}
return admins;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerAdminsForCurrentProfileGroup
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
|
getProfileOwnerAdminsForCurrentProfileGroup
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public boolean getCameraDisabled(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
return mService.getCameraDisabled(admin, mContext.getPackageName(), userHandle,
mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCameraDisabled
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
|
getCameraDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getByIdUsingSqlPrimaryKey(TestContext context) {
Async async = context.async();
String uuid = randomUuid();
postgresClient = createFoo(context);
postgresClient.save(FOO, uuid, xPojo, context.asyncAssertSuccess(id -> {
String sql = "WHERE id='" + id + "'";
postgresClient.get(FOO, StringPojo.class, sql, true, false, context.asyncAssertSuccess(results -> {
try {
assertThat(results.getResults(), hasSize(1));
assertThat(results.getResults().get(0).key, is("x"));
async.complete();
} catch (Exception e) {
context.fail(e);
}
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByIdUsingSqlPrimaryKey
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getByIdUsingSqlPrimaryKey
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSelectedDownloadOptionLabel(String selectedDownloadOptionLabel) {
logger.trace("setSelectedDownloadOption: {}", selectedDownloadOptionLabel != null ? selectedDownloadOptionLabel : null);
this.selectedDownloadOptionLabel = selectedDownloadOptionLabel;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSelectedDownloadOptionLabel
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setSelectedDownloadOptionLabel
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getStaticTypeName() {
return RESOURCE_TYPE_NAME;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStaticTypeName
File: src/org/opencms/file/types/CmsResourceTypeImage.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
getStaticTypeName
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<News> newsSortedByDate(String region){
Query query = em.createQuery("SELECT n FROM News n WHERE region = :r ORDER BY date DESC");
query.setParameter("r", region);
@SuppressWarnings("unchecked")
List<News> news = query.getResultList();
return news;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newsSortedByDate
File: Cnn-EJB/ejbModule/ejbs/NewsBean.java
Repository: rfsimoes/IS_Projecto2
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-125038
|
MEDIUM
| 5.2
|
rfsimoes/IS_Projecto2
|
newsSortedByDate
|
Cnn-EJB/ejbModule/ejbs/NewsBean.java
|
aa128b2c9c9fdcbbf5ecd82c1e92103573017fe0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSameNamedOperators(ServiceState s) {
String spn = ((TelephonyManager) mPhone.getContext().
getSystemService(Context.TELEPHONY_SERVICE)).
getSimOperatorNameForPhone(getPhoneId());
String onsl = s.getOperatorAlphaLong();
String onss = s.getOperatorAlphaShort();
boolean equalsOnsl = onsl != null && spn != null && !spn.isEmpty() && spn.equals(onsl);
boolean equalsOnss = onss != null && spn != null && !spn.isEmpty() && spn.equals(onss);
return currentMccEqualsSimMcc(s) && (equalsOnsl || equalsOnss);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSameNamedOperators
File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
isSameNamedOperators
|
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
if (isBodyNullable) {
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
} else {
return obj == null ? "" : json.getMapper().writeValueAsString(obj);
}
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serializeToString
File: samples/client/petstore/java/resteasy/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
|
serializeToString
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getLongAndRemove(K name, long defaultValue) {
Long v = getLongAndRemove(name);
return v != null ? v : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLongAndRemove
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
|
getLongAndRemove
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object otherObj) {
if (this == otherObj) {
return true;
} else if (!(otherObj instanceof NetworkIdentifier)) {
return false;
}
NetworkIdentifier other = (NetworkIdentifier) otherObj;
return Objects.equals(mSsid, other.mSsid) && Arrays.equals(mOui, other.mOui);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
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
|
equals
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void releaseFreeConnections() {
freeConnections.release();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseFreeConnections
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
releaseFreeConnections
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean validate() {
if (mPolicyUpdate == null) {
Log.d(TAG, "PolicyUpdate not specified");
return false;
}
if (!mPolicyUpdate.validate()) {
return false;
}
// Validate SSID exclusion list.
if (mExcludedSsidList != null) {
if (mExcludedSsidList.length > MAX_EXCLUSION_SSIDS) {
Log.d(TAG, "SSID exclusion list size exceeded the max: "
+ mExcludedSsidList.length);
return false;
}
for (String ssid : mExcludedSsidList) {
if (ssid.getBytes(StandardCharsets.UTF_8).length > MAX_SSID_BYTES) {
Log.d(TAG, "Invalid SSID: " + ssid);
return false;
}
}
}
// Validate required protocol to port map.
if (mRequiredProtoPortMap != null) {
for (Map.Entry<Integer, String> entry : mRequiredProtoPortMap.entrySet()) {
String portNumber = entry.getValue();
if (portNumber.getBytes(StandardCharsets.UTF_8).length > MAX_PORT_STRING_BYTES) {
Log.d(TAG, "PortNumber string bytes exceeded the max: " + portNumber);
return false;
}
}
}
// Validate preferred roaming partner list.
if (mPreferredRoamingPartnerList != null) {
for (RoamingPartner partner : mPreferredRoamingPartnerList) {
if (!partner.validate()) {
return false;
}
}
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-21240
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Add size check on PPS#policy
Bug: 275340417
Test: atest android.net.wifi
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1fefc4c0995aabba6fd966bde9bf48dc24cb41b2)
Merged-In: Iede626004a1ea46f47b185777c97794e4d3ded4e
Change-Id: Iede626004a1ea46f47b185777c97794e4d3ded4e
Function: validate
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
Fixed Code:
public boolean validate() {
if (mPolicyUpdate == null) {
Log.d(TAG, "PolicyUpdate not specified");
return false;
}
if (!mPolicyUpdate.validate()) {
return false;
}
// Validate SSID exclusion list.
if (mExcludedSsidList != null) {
if (mExcludedSsidList.length > MAX_EXCLUSION_SSIDS) {
Log.d(TAG, "SSID exclusion list size exceeded the max: "
+ mExcludedSsidList.length);
return false;
}
for (String ssid : mExcludedSsidList) {
if (ssid.getBytes(StandardCharsets.UTF_8).length > MAX_SSID_BYTES) {
Log.e(TAG, "Invalid SSID: " + ssid);
return false;
}
}
}
// Validate required protocol to port map.
if (mRequiredProtoPortMap != null) {
for (Map.Entry<Integer, String> entry : mRequiredProtoPortMap.entrySet()) {
int protocol = entry.getKey();
if (protocol < 0 || protocol > 255) {
Log.e(TAG, "Invalid IP protocol: " + protocol);
return false;
}
String portNumber = entry.getValue();
if (portNumber.getBytes(StandardCharsets.UTF_8).length > MAX_PORT_STRING_BYTES) {
Log.e(TAG, "PortNumber string bytes exceeded the max: " + portNumber);
return false;
}
}
}
// Validate preferred roaming partner list.
if (mPreferredRoamingPartnerList != null) {
if (mPreferredRoamingPartnerList.size() > MAX_NUMBER_OF_ENTRIES) {
Log.e(TAG, "Number of the Preferred Roaming Partner exceed the limit");
return false;
}
for (RoamingPartner partner : mPreferredRoamingPartnerList) {
if (!partner.validate()) {
return false;
}
}
}
return true;
}
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
validate
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 1
|
Analyze the following code function for security vulnerabilities
|
private final void setProcessTrackerStateLocked(ProcessRecord proc, int memFactor, long now) {
if (proc.thread != null) {
if (proc.baseProcessTracker != null) {
proc.baseProcessTracker.setState(proc.repProcState, memFactor, now, proc.pkgList);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProcessTrackerStateLocked
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
|
setProcessTrackerStateLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getIndex()
{
return index;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIndex
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getIndex
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ComponentName getActivityClassForToken(IBinder token) {
synchronized(this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return null;
}
return r.intent.getComponent();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActivityClassForToken
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
|
getActivityClassForToken
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PluggableSCMMaterial pluggableSCMMaterial(String scmId, String scmName, final String pluginid, final String version, List<ConfigurationProperty> properties) {
PluggableSCMMaterial material = new PluggableSCMMaterial(scmId);
material.setId(1);
SCM scmConfig = SCMMother.create(scmId, scmName, pluginid, version, new Configuration(properties));
material.setSCMConfig(scmConfig);
return material;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pluggableSCMMaterial
File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
pluggableSCMMaterial
|
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRequestedSessionId() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedSessionId
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getRequestedSessionId
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public static X509TrustManager getDefaultX509TrustManager()
throws KeyManagementException {
X509TrustManager result = defaultX509TrustManager;
if (result == null) {
// single-check idiom
defaultX509TrustManager = result = createDefaultX509TrustManager();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultX509TrustManager
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getDefaultX509TrustManager
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate14(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Projects.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element projectElement: dom.getRootElement().elements()) {
for (Element branchProtectionElement: projectElement.element("branchProtections").elements()) {
Element submitterElement = branchProtectionElement.addElement("submitter");
submitterElement.addAttribute("class", "com.turbodev.server.model.support.submitter.Anyone");
branchProtectionElement.addElement("noCreation").setText("true");
}
for (Element tagProtectionElement: projectElement.element("tagProtections").elements()) {
tagProtectionElement.detach();
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate14
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate14
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(anyOf = {
android.Manifest.permission.MANAGE_USERS,
android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
})
public boolean isFinancedDevice() {
return isDeviceManaged()
&& getDeviceOwnerType(getDeviceOwnerComponentOnAnyUser())
== DEVICE_OWNER_TYPE_FINANCED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFinancedDevice
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
|
isFinancedDevice
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder parentFolder(File parentFolder) {
this.parentFolder = parentFolder;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parentFolder
File: src/main/java/org/junit/rules/TemporaryFolder.java
Repository: junit-team/junit4
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-15250
|
LOW
| 1.9
|
junit-team/junit4
|
parentFolder
|
src/main/java/org/junit/rules/TemporaryFolder.java
|
610155b8c22138329f0723eec22521627dbc52ae
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Response internalPeekNthMessage(String subName, int messagePosition, boolean authoritative) {
// If the topic name is a partition name, no need to get partition topic metadata again
if (!topicName.isPartitioned() && getPartitionedTopicMetadata(topicName,
authoritative, false).partitions > 0) {
throw new RestException(Status.METHOD_NOT_ALLOWED, "Peek messages on a partitioned topic is not allowed");
}
validateTopicOwnership(topicName, authoritative);
validateTopicOperation(topicName, TopicOperation.PEEK_MESSAGES);
if (!(getTopicReference(topicName) instanceof PersistentTopic)) {
log.error("[{}] Not supported operation of non-persistent topic {} {}", clientAppId(), topicName,
subName);
throw new RestException(Status.METHOD_NOT_ALLOWED,
"Peek messages on a non-persistent topic is not allowed");
}
PersistentTopic topic = (PersistentTopic) getTopicReference(topicName);
PersistentReplicator repl = null;
PersistentSubscription sub = null;
Entry entry = null;
if (subName.startsWith(topic.getReplicatorPrefix())) {
repl = getReplicatorReference(subName, topic);
} else {
sub = (PersistentSubscription) getSubscriptionReference(subName, topic);
}
try {
if (subName.startsWith(topic.getReplicatorPrefix())) {
entry = repl.peekNthMessage(messagePosition).get();
} else {
entry = sub.peekNthMessage(messagePosition).get();
}
return generateResponseWithEntry(entry);
} catch (NullPointerException npe) {
throw new RestException(Status.NOT_FOUND, "Message not found");
} catch (Exception exception) {
log.error("[{}] Failed to peek message at position {} from {} {}", clientAppId(), messagePosition,
topicName, subName, exception);
throw new RestException(exception);
} finally {
if (entry != null) {
entry.release();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalPeekNthMessage
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
|
internalPeekNthMessage
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private RemoteViews makeDecoratedBigContentView() {
RemoteViews bigContentView = mBuilder.mN.bigContentView == null
? mBuilder.mN.contentView
: mBuilder.mN.bigContentView;
if (bigContentView == null) {
return null; // no custom view; use the default behavior
}
TemplateBindResult result = new TemplateBindResult();
StandardTemplateParams p = mBuilder.mParams.reset()
.viewType(StandardTemplateParams.VIEW_TYPE_BIG)
.decorationType(StandardTemplateParams.DECORATION_PARTIAL)
.fillTextsFrom(mBuilder);
RemoteViews remoteViews = mBuilder.applyStandardTemplateWithActions(
mBuilder.getBigBaseLayoutResource(), p, result);
buildCustomContentIntoTemplate(mBuilder.mContext, remoteViews, bigContentView,
p, result);
return remoteViews;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeDecoratedBigContentView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
makeDecoratedBigContentView
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected AppWarnings createAppWarnings(
Context uiContext, Handler handler, Handler uiHandler, File systemDir) {
return new AppWarnings(this, uiContext, handler, uiHandler, systemDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAppWarnings
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
|
createAppWarnings
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void _skipChunked(int expectedType) throws IOException
{
while (true) {
if (_inputPtr >= _inputEnd) {
loadMoreGuaranteed();
}
int ch = _inputBuffer[_inputPtr++] & 0xFF;
if (ch == 0xFF) {
return;
}
// verify that type matches
int type = (ch >> 5);
if (type != expectedType) {
throw _constructError("Mismatched chunk in chunked content: expected "+expectedType
+" but encountered "+type);
}
final int lowBits = ch & 0x1F;
if (lowBits <= 23) {
if (lowBits > 0) {
_skipBytes(lowBits);
}
continue;
}
switch (lowBits) {
case 24:
_skipBytes(_decode8Bits());
break;
case 25:
_skipBytes(_decode16Bits());
break;
case 26:
_skipBytes(_decode32Bits());
break;
case 27: // seriously?
_skipBytesL(_decode64Bits());
break;
case 31:
throw _constructError("Illegal chunked-length indicator within chunked-length value (type "+expectedType+")");
default:
_invalidToken(_typeByte);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _skipChunked
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_skipChunked
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public AppRow loadAppRow(Context context, PackageManager pm, PackageInfo app) {
final AppRow row = loadAppRow(context, pm, app.applicationInfo);
recordCanBeBlocked(app, row);
return row;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadAppRow
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
|
loadAppRow
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Path relativizeIfSamePrefix(Path urlPath, Path basePath) {
if (FilenameUtils.getPrefixLength(urlPath.toString()) > 0 && !urlPath.startsWith(basePath.toAbsolutePath())) {
// if the import folder is configured to be used as root folder we consider
// it as root directory in order to reproduce the same LOAD CSV behaviour
urlPath = urlPath.getRoot().relativize(urlPath);
}
return urlPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: relativizeIfSamePrefix
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
relativizeIfSamePrefix
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setAdminCanGrantSensorsPermissionForUserUnchecked(@UserIdInt int userId,
boolean canGrant) {
Slogf.d(LOG_TAG, "setAdminCanGrantSensorsPermissionForUserUnchecked(%d, %b)",
userId, canGrant);
synchronized (getLockObject()) {
ActiveAdmin owner = getDeviceOrProfileOwnerAdminLocked(userId);
Preconditions.checkState(
isDeviceOwner(owner) && owner.getUserHandle().getIdentifier() == userId,
"May only be set on a the user of a device owner.");
owner.mAdminCanGrantSensorsPermissions = canGrant;
mPolicyCache.setAdminCanGrantSensorsPermissions(userId, canGrant);
saveSettingsLocked(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAdminCanGrantSensorsPermissionForUserUnchecked
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
|
setAdminCanGrantSensorsPermissionForUserUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isMeteredDataDisabledPackageForUser(ComponentName who,
String packageName, int userId) {
Objects.requireNonNull(who);
if (!mHasFeature) {
return false;
}
Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()),
String.format(NOT_SYSTEM_CALLER_MSG, "query restricted pkgs for a specific user"));
synchronized (getLockObject()) {
final ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userId);
if (admin != null && admin.meteredDisabledPackages != null) {
return admin.meteredDisabledPackages.contains(packageName);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMeteredDataDisabledPackageForUser
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
|
isMeteredDataDisabledPackageForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private ContrastColorUtil getColorUtil() {
if (mColorUtil == null) {
mColorUtil = ContrastColorUtil.getInstance(mContext);
}
return mColorUtil;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColorUtil
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getColorUtil
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void temporarilyHideTextHandles() {
if (isSelectionHandleShowing() && !mSelectionHandleController.isDragging()) {
mSelectionHandleController.setHandleVisibility(HandleView.INVISIBLE);
}
if (isInsertionHandleShowing() && !mInsertionHandleController.isDragging()) {
mInsertionHandleController.setHandleVisibility(HandleView.INVISIBLE);
}
scheduleTextHandleFadeIn();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: temporarilyHideTextHandles
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
temporarilyHideTextHandles
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPlace() {
return this.place;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlace
File: src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
getPlace
|
src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public LocalPortForward portForward(int port, int localPort) {
try {
return new PortForwarderWebsocket(client).forward(getResourceUrl(), port, localPort);
} catch (Throwable t) {
throw KubernetesClientException.launderThrowable(t);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: portForward
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
portForward
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseExtra(XmlPullParser parser, Bundle extras) {
String name = parser.getAttributeValue(null, "name");
String type = parser.getAttributeValue(null, "type");
String value1 = parser.getAttributeValue(null, "value1");
String value2 = parser.getAttributeValue(null, "value2");
try {
if ("long".equals(type)) {
extras.putLong(name, Long.parseLong(value1));
} else if ("integer".equals(type)) {
extras.putInt(name, Integer.parseInt(value1));
} else if ("double".equals(type)) {
extras.putDouble(name, Double.parseDouble(value1));
} else if ("float".equals(type)) {
extras.putFloat(name, Float.parseFloat(value1));
} else if ("boolean".equals(type)) {
extras.putBoolean(name, Boolean.parseBoolean(value1));
} else if ("string".equals(type)) {
extras.putString(name, value1);
} else if ("account".equals(type)) {
extras.putParcelable(name, new Account(value1, value2));
}
} catch (NumberFormatException e) {
Log.e(TAG, "error parsing bundle value", e);
} catch (NullPointerException e) {
Log.e(TAG, "error parsing bundle value", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseExtra
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
|
parseExtra
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanAppRestrictionsForPackage(String pkg, int userId) {
synchronized (mPackagesLock) {
File dir = Environment.getUserSystemDirectory(userId);
File resFile = new File(dir, packageToRestrictionsFileName(pkg));
if (resFile.exists()) {
resFile.delete();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanAppRestrictionsForPackage
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
cleanAppRestrictionsForPackage
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native int killProcessGroup(int uid, int pid);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killProcessGroup
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
killProcessGroup
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getState() {
return state;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getState
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setBearerToken(String bearerToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBearerAuth) {
((HttpBearerAuth) auth).setBearerToken(bearerToken);
return this;
}
}
throw new RuntimeException("No Bearer authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBearerToken
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
setBearerToken
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected B autoAckPingFrame(boolean autoAckPingFrame) {
enforceNonCodecConstraints("autoAckPingFrame");
this.autoAckPingFrame = autoAckPingFrame;
return self();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: autoAckPingFrame
File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
netty
|
autoAckPingFrame
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean startInstrumentation(ComponentName className, String profileFile,
int flags, Bundle arguments, IInstrumentationWatcher watcher,
IUiAutomationConnection connection, int userId,
String abiOverride) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startInstrumentation
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startInstrumentation
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void checkSupportedKeySize(int keyLength) throws InvalidKeyException {
switch (keyLength) {
case 16: // AES 128
case 32: // AES 256
return;
default:
throw new InvalidKeyException("Unsupported key size: " + keyLength
+ " bytes (must be 16 or 32)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkSupportedKeySize
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
checkSupportedKeySize
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
private TableEntry findInTable(HttpString headerName, String value) {
TableEntry[] staticTable = ENCODING_STATIC_TABLE.get(headerName);
if (staticTable != null) {
for (TableEntry st : staticTable) {
if (st.value != null && st.value.equals(value)) { //todo: some form of lookup?
return st;
}
}
}
List<TableEntry> dynamic = dynamicTable.get(headerName);
if (dynamic != null) {
for (int i = 0; i < dynamic.size(); ++i) {
TableEntry st = dynamic.get(i);
if (st.value.equals(value)) { //todo: some form of lookup?
return st;
}
}
}
if (staticTable != null) {
return staticTable[0];
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findInTable
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
|
findInTable
|
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native boolean setSwappiness(int pid, boolean is_increased);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSwappiness
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
setSwappiness
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void addObjectsToRemove(BaseObject object)
{
addXObjectToRemove(object);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObjectsToRemove
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
|
addObjectsToRemove
|
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
|
@Deprecated
public JavaType forcedNarrowBy(Class<?> subclass)
{
if (subclass == _class) { // can still optimize for simple case
return this;
}
return _narrow(subclass);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forcedNarrowBy
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
forcedNarrowBy
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public RoutingContext getContext() {
return context;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContext
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
getContext
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logPictureInPictureArgs(PictureInPictureParams params) {
if (params.hasSetActions()) {
MetricsLogger.histogram(mContext, "tron_varz_picture_in_picture_actions_count",
params.getActions().size());
}
if (params.hasSetAspectRatio()) {
LogMaker lm = new LogMaker(MetricsEvent.ACTION_PICTURE_IN_PICTURE_ASPECT_RATIO_CHANGED);
lm.addTaggedData(MetricsEvent.PICTURE_IN_PICTURE_ASPECT_RATIO, params.getAspectRatio());
MetricsLogger.action(lm);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logPictureInPictureArgs
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
|
logPictureInPictureArgs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getMethodParameter() {
return this.methodParam;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMethodParameter
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
|
getMethodParameter
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addCurrentElementToCollection(HierarchicalStreamReader reader, UnmarshallingContext context,
Collection collection, Collection target) {
final Object item = readItem(reader, context, collection); // call readBareItem when deprecated method is removed
target.add(item);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-43859
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Describe and fix CVE-2021-43859.
Function: addCurrentElementToCollection
File: xstream/src/java/com/thoughtworks/xstream/converters/collections/CollectionConverter.java
Repository: x-stream/xstream
Fixed Code:
protected void addCurrentElementToCollection(HierarchicalStreamReader reader, UnmarshallingContext context,
Collection collection, Collection target) {
final Object item = readItem(reader, context, collection); // call readBareItem when deprecated method is removed
long now = System.currentTimeMillis();
target.add(item);
SecurityUtils.checkForCollectionDoSAttack(context, now);
}
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
addCurrentElementToCollection
|
xstream/src/java/com/thoughtworks/xstream/converters/collections/CollectionConverter.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startActivity(IBinder whoThread, String callingPackage,
Intent intent, String resolvedType, Bundle bOptions) {
checkCaller();
int callingUser = UserHandle.getCallingUserId();
TaskRecord tr;
IApplicationThread appThread;
synchronized (ActivityManagerService.this) {
tr = mStackSupervisor.anyTaskForIdLocked(mTaskId);
if (tr == null) {
throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
}
appThread = ApplicationThreadNative.asInterface(whoThread);
if (appThread == null) {
throw new IllegalArgumentException("Bad app thread " + appThread);
}
}
return mActivityStarter.startActivityMayWait(appThread, -1, callingPackage, intent,
resolvedType, null, null, null, null, 0, 0, null, null,
null, bOptions, false, callingUser, null, tr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivity
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
startActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public AuthorizationCodeTokenRequest newTokenRequest(String authorizationCode) {
return new AuthorizationCodeTokenRequest(transport, jsonFactory,
new GenericUrl(tokenServerEncodedUrl), authorizationCode).setClientAuthentication(
clientAuthentication).setRequestInitializer(requestInitializer).setScopes(scopes);
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2020-7692
- Severity: MEDIUM
- CVSS Score: 6.4
Description: feat: add PKCE support to AuthorizationCodeFlow (#470)
* Initial test code for a PKCE enabled Authorization Code Flow
* WIP: work on README.md
* Script to initialize keycloak by adding client via REST API.
* Improve keycloak init script and some code cleanup. Still WIP.
* WIP: work on README.md
* Working PKCE AuthorizationCodeFlow. Some cleanup of test classes.
* Add scopes back to the AuthorizationCodeRequestUrl creation.
* Simplify code by moving PKCE entirely into the AuthorizationCodeFlow class. Add documentation.
* Remove wildcard imports as that seems to be the way to do things here.
* Add @since annotation in JavaDoc to the PKCE parameters of the autorization url class.
* Add PKCE unit test, documentation and minor cleanup of dependencies for code sample.
* Add PKCE unit test, documentation and minor cleanup of dependencies for code sample.
* Annotate PKCE with Beta annotation.
* Responding to code review comments
* Responding to more PR comments
* Improve Keycloak PKCE sample documentation
* Add license header with copyright to new files. Improve documentation.
Function: newTokenRequest
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
Fixed Code:
public AuthorizationCodeTokenRequest newTokenRequest(String authorizationCode) {
HttpExecuteInterceptor pkceClientAuthenticationWrapper = new HttpExecuteInterceptor() {
@Override
public void intercept(HttpRequest request) throws IOException {
clientAuthentication.intercept(request);
if (pkce != null) {
Map<String, Object> data = Data.mapOf(UrlEncodedContent.getContent(request).getData());
data.put("code_verifier", pkce.getVerifier());
}
}
};
return new AuthorizationCodeTokenRequest(transport, jsonFactory,
new GenericUrl(tokenServerEncodedUrl), authorizationCode).setClientAuthentication(
pkceClientAuthenticationWrapper).setRequestInitializer(requestInitializer).setScopes(scopes);
}
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
newTokenRequest
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 1
|
Analyze the following code function for security vulnerabilities
|
public Float optFloatObject(String key) {
return this.optFloatObject(key, Float.NaN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optFloatObject
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
optFloatObject
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private QTI21Infos getInfos(Path imsmanifestPath) {
try {
QTI21IMSManifestExplorerVisitor visitor = new QTI21IMSManifestExplorerVisitor();
Files.walkFileTree(imsmanifestPath, visitor);
return visitor.getInfos();
} catch (IOException e) {
log.error("", e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInfos
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
|
getInfos
|
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReorderingAllowed() {
updateNotifications();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReorderingAllowed
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onReorderingAllowed
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMaximumSearchResultCountInTransaction(Integer theMaximumSearchResultCountInTransaction) {
myMaximumSearchResultCountInTransaction = theMaximumSearchResultCountInTransaction;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaximumSearchResultCountInTransaction
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setMaximumSearchResultCountInTransaction
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMessage(String messageId, Locale locale, Object... args) {
log.debug("getMessage() called with messageId: " + messageId +
" and locale: " + locale);
// Short-circuit the rest of the method if the messageId is null
// See bz 199892
if (messageId == null) {
return getMissingMessageString(messageId);
}
String userLocale = locale == null ? "null" : locale.toString();
if (msgLogger.isDebugEnabled()) {
msgLogger.debug("Resolving message \"" + messageId +
"\" for locale " + userLocale);
}
String mess = null;
Class z = null;
try {
// If the keyMap doesn't contain the requested key
// then there is no hope and we return.
if (!keyToBundleMap.containsKey(messageId)) {
return getMissingMessageString(messageId);
}
z = Class.forName(keyToBundleMap.get(messageId));
// If we already determined that there aren't an bundles
// for this Locale then we shouldn't repeatedly fail
// attempts to parse the bundle. Instead just force a
// call to the default Locale.
mess = XmlMessages.getInstance().format(z, locale,
messageId, args);
}
catch (MissingResourceException e) {
// Try again with DEFAULT_LOCALE
if (msgLogger.isDebugEnabled()) {
msgLogger.debug("Resolving message \"" + messageId +
"\" for locale " + userLocale +
" failed - trying again with default " + "locale " +
DEFAULT_LOCALE.toString());
}
try {
mess = XmlMessages.getInstance().format(z, DEFAULT_LOCALE,
messageId, args);
}
catch (MissingResourceException mre) {
if (msgLogger.isDebugEnabled()) {
msgLogger.debug("Resolving message \"" + messageId + "\" " +
"for default locale " + DEFAULT_LOCALE.toString() +
" failed");
}
return getMissingMessageString(messageId);
}
}
catch (ClassNotFoundException ce) {
String message = "Class not found when trying to fetch a message: " +
ce.toString();
log.error(message, ce);
throw new LocalizationException(message, ce);
}
return getDebugVersionOfString(mess);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getMessage
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 up(int steps) {
Node currNode = super.upImpl(steps);
if (currNode instanceof Document) {
return new XMLBuilder2((Document) currNode);
} else {
return new XMLBuilder2(currNode, null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: up
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
up
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isSwitchingToNonHttp1Protocol(HttpResponse msg) {
if (msg.status().code() != HttpResponseStatus.SWITCHING_PROTOCOLS.code()) {
return false;
}
String newProtocol = msg.headers().get(HttpHeaderNames.UPGRADE);
return newProtocol == null ||
!newProtocol.contains(HttpVersion.HTTP_1_0.text()) &&
!newProtocol.contains(HttpVersion.HTTP_1_1.text());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSwitchingToNonHttp1Protocol
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
isSwitchingToNonHttp1Protocol
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
void keepPages() {
if (refsp == null || keepPages)
return;
keepPages = true;
refsp.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keepPages
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
|
keepPages
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBadges(String badges) {
this.badges = badges;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBadges
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
setBadges
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
OpenSSLSessionImpl getCachedClientSession(ClientSessionContext sessionContext, String hostName,
int port) {
if (hostName == null) {
return null;
}
OpenSSLSessionImpl session = (OpenSSLSessionImpl) sessionContext.getSession(hostName, port);
if (session == null) {
return null;
}
String protocol = session.getProtocol();
boolean protocolFound = false;
for (String enabledProtocol : enabledProtocols) {
if (protocol.equals(enabledProtocol)) {
protocolFound = true;
break;
}
}
if (!protocolFound) {
return null;
}
String cipherSuite = session.getCipherSuite();
boolean cipherSuiteFound = false;
for (String enabledCipherSuite : enabledCipherSuites) {
if (cipherSuite.equals(enabledCipherSuite)) {
cipherSuiteFound = true;
break;
}
}
if (!cipherSuiteFound) {
return null;
}
return session;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCachedClientSession
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getCachedClientSession
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String checkAbiArgument(String abi) {
if (TextUtils.isEmpty(abi)) {
throw new IllegalArgumentException("Missing ABI argument");
}
if ("-".equals(abi)) {
return abi;
}
final String[] supportedAbis = Build.SUPPORTED_ABIS;
for (String supportedAbi : supportedAbis) {
if (supportedAbi.equals(abi)) {
return abi;
}
}
throw new IllegalArgumentException("ABI " + abi + " not supported on this device");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAbiArgument
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
checkAbiArgument
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
void onResponsePicked(@NonNull FillResponse response);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResponsePicked
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
onResponsePicked
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addFlags( String flagSet ) {
StringBuilder sb = new StringBuilder() ;
sb.append( flagSet ) ;
if( !flagSet.contains( "-oX" ) ) {
sb.append( " -oX -" ) ;
}
flags.addFlag( sb.toString() ) ;
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2018-17228
- Severity: HIGH
- CVSS Score: 7.5
Description: Adding hosts validation fixing https://github.com/narkisr/nmap4j/issues/9
Function: addFlags
File: src/main/java/org/nmap4j/Nmap4j.java
Repository: narkisr/nmap4j
Fixed Code:
public void addFlags(String flagSet) {
StringBuilder sb = new StringBuilder();
sb.append(flagSet);
if (!flagSet.contains("-oX")) {
sb.append(" -oX -");
}
flags.addFlag(sb.toString());
}
|
[
"CWE-78"
] |
CVE-2018-17228
|
HIGH
| 7.5
|
narkisr/nmap4j
|
addFlags
|
src/main/java/org/nmap4j/Nmap4j.java
|
06b58aa3345d2f977553685a026b93e61f0c491e
| 1
|
Analyze the following code function for security vulnerabilities
|
private void removePI(Node node) {
addError(ErrorMessageUtil.ERROR_PI_FOUND, new Object[]{HTMLEntityEncoder.htmlEntityEncode(node.getTextContent())});
removeNode(node);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePI
File: src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-28367
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
removePI
|
src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
|
0199e7e194dba5e7d7197703f43ebe22401e61ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ProgramWorkflowState getState(String identifier, ProgramWorkflow workflow) {
if (identifier == null) {
return null;
}
// first try to fetch by id or uuid
ProgramWorkflowState state = getState(identifier);
if (state != null && state.getProgramWorkflow().equals(workflow)) {
return state;
}
// if we didn't find a match, see if this is a concept mapping
else {
identifier = identifier.trim();
int index = identifier.indexOf(":");
if (index != -1) {
Concept concept = getConcept(identifier);
if (concept != null) {
for (ProgramWorkflowState s : workflow.getStates(false)) {
if (s.getConcept().equals(concept)) {
return s;
}
}
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getState
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void assignLayer(Transaction t, int layer) {
if (mStartingData != null) {
// The starting window should cover the task.
t.setLayer(mSurfaceControl, Integer.MAX_VALUE);
return;
}
// See comment in assignRelativeLayerForImeTargetChild
if (needsRelativeLayeringToIme()) {
getDisplayContent().assignRelativeLayerForImeTargetChild(t, this);
return;
}
super.assignLayer(t, layer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assignLayer
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
assignLayer
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getProtocol() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProtocol
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getProtocol
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private void adjustCpuAbisForSharedUserLPw(Set<PackageSetting> packagesForUser,
PackageParser.Package scannedPackage, boolean forceDexOpt, boolean deferDexOpt,
boolean bootComplete) {
String requiredInstructionSet = null;
if (scannedPackage != null && scannedPackage.applicationInfo.primaryCpuAbi != null) {
requiredInstructionSet = VMRuntime.getInstructionSet(
scannedPackage.applicationInfo.primaryCpuAbi);
}
PackageSetting requirer = null;
for (PackageSetting ps : packagesForUser) {
// If packagesForUser contains scannedPackage, we skip it. This will happen
// when scannedPackage is an update of an existing package. Without this check,
// we will never be able to change the ABI of any package belonging to a shared
// user, even if it's compatible with other packages.
if (scannedPackage == null || !scannedPackage.packageName.equals(ps.name)) {
if (ps.primaryCpuAbiString == null) {
continue;
}
final String instructionSet = VMRuntime.getInstructionSet(ps.primaryCpuAbiString);
if (requiredInstructionSet != null && !instructionSet.equals(requiredInstructionSet)) {
// We have a mismatch between instruction sets (say arm vs arm64) warn about
// this but there's not much we can do.
String errorMessage = "Instruction set mismatch, "
+ ((requirer == null) ? "[caller]" : requirer)
+ " requires " + requiredInstructionSet + " whereas " + ps
+ " requires " + instructionSet;
Slog.w(TAG, errorMessage);
}
if (requiredInstructionSet == null) {
requiredInstructionSet = instructionSet;
requirer = ps;
}
}
}
if (requiredInstructionSet != null) {
String adjustedAbi;
if (requirer != null) {
// requirer != null implies that either scannedPackage was null or that scannedPackage
// did not require an ABI, in which case we have to adjust scannedPackage to match
// the ABI of the set (which is the same as requirer's ABI)
adjustedAbi = requirer.primaryCpuAbiString;
if (scannedPackage != null) {
scannedPackage.applicationInfo.primaryCpuAbi = adjustedAbi;
}
} else {
// requirer == null implies that we're updating all ABIs in the set to
// match scannedPackage.
adjustedAbi = scannedPackage.applicationInfo.primaryCpuAbi;
}
for (PackageSetting ps : packagesForUser) {
if (scannedPackage == null || !scannedPackage.packageName.equals(ps.name)) {
if (ps.primaryCpuAbiString != null) {
continue;
}
ps.primaryCpuAbiString = adjustedAbi;
if (ps.pkg != null && ps.pkg.applicationInfo != null) {
ps.pkg.applicationInfo.primaryCpuAbi = adjustedAbi;
Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + adjustedAbi);
int result = mPackageDexOptimizer.performDexOpt(ps.pkg,
null /* instruction sets */, forceDexOpt, deferDexOpt, true,
bootComplete);
if (result == PackageDexOptimizer.DEX_OPT_FAILED) {
ps.primaryCpuAbiString = null;
ps.pkg.applicationInfo.primaryCpuAbi = null;
return;
} else {
mInstaller.rmdex(ps.codePathString,
getDexCodeInstructionSet(getPreferredInstructionSet()));
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustCpuAbisForSharedUserLPw
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
adjustCpuAbisForSharedUserLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected String getPage() {
return _PAGE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPage
File: util-taglib/src/com/liferay/taglib/ui/HeaderTag.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
getPage
|
util-taglib/src/com/liferay/taglib/ui/HeaderTag.java
|
bd92daa70ab77a40eff0eb18e8e91f3e095694e1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean deselectAll(boolean refresh) {
// deselect will fire the event
return deselect(getSelectedRows(), refresh);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deselectAll
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
|
deselectAll
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String mapSimpleType(String className) {
if (className == null) return className;
if (PROPERTY_TYPES.containsValue(className)) {
return Util.getFirstKeyByValue(PROPERTY_TYPES, className);
}
return className;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mapSimpleType
File: ff4j-core/src/main/java/org/ff4j/utils/MappingUtil.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
mapSimpleType
|
ff4j-core/src/main/java/org/ff4j/utils/MappingUtil.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateWifiInfoLinkParamsAfterAssociation() {
mLastConnectionCapabilities = mWifiNative.getConnectionCapabilities(mInterfaceName);
int maxTxLinkSpeedMbps = mThroughputPredictor.predictMaxTxThroughput(
mLastConnectionCapabilities);
int maxRxLinkSpeedMbps = mThroughputPredictor.predictMaxRxThroughput(
mLastConnectionCapabilities);
mWifiInfo.setWifiStandard(mLastConnectionCapabilities.wifiStandard);
mWifiInfo.setMaxSupportedTxLinkSpeedMbps(maxTxLinkSpeedMbps);
mWifiInfo.setMaxSupportedRxLinkSpeedMbps(maxRxLinkSpeedMbps);
mWifiMetrics.setConnectionMaxSupportedLinkSpeedMbps(mInterfaceName,
maxTxLinkSpeedMbps, maxRxLinkSpeedMbps);
if (mLastConnectionCapabilities.wifiStandard == ScanResult.WIFI_STANDARD_11BE) {
WifiNative.ConnectionMloLinksInfo info =
mWifiNative.getConnectionMloLinksInfo(mInterfaceName);
if (info != null) {
for (int i = 0; i < info.links.length; i++) {
mWifiInfo.updateMloLinkStaAddress(info.links[i].linkId,
info.links[i].staMacAddress);
mWifiInfo.updateMloLinkState(
info.links[i].linkId, MloLink.MLO_LINK_STATE_ACTIVE);
}
}
}
if (mVerboseLoggingEnabled) {
StringBuilder sb = new StringBuilder();
logd(sb.append("WifiStandard: ").append(mLastConnectionCapabilities.wifiStandard)
.append(" maxTxSpeed: ").append(maxTxLinkSpeedMbps)
.append(" maxRxSpeed: ").append(maxRxLinkSpeedMbps)
.toString());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateWifiInfoLinkParamsAfterAssociation
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
updateWifiInfoLinkParamsAfterAssociation
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
/*
* one servlet le another servlet ma request garda doGet() ma aauxa. so for
* logout, session use garera login page ma dispatch garxau.
*/
HttpSession session = request.getSession();
session.invalidate();
RequestDispatcher rd = request.getRequestDispatcher("voterlogin.jsp");
request.setAttribute("loggedOutMsg", "Log Out Successful !!");
rd.include(request, response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGet
File: src/com/bijay/onlinevotingsystem/controller/VoterLoginController.java
Repository: bijaythapaa/OnlineVotingSystem
The code follows secure coding practices.
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
doGet
|
src/com/bijay/onlinevotingsystem/controller/VoterLoginController.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.