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 setTimeAndTimezone(String timeZone, long localTime) {
try {
final AlarmManager alarmManager = mContext.getSystemService(AlarmManager.class);
if (timeZone != null) {
alarmManager.setTimeZone(timeZone);
}
if (localTime > 0) {
alarmManager.setTime(localTime);
}
} catch (Exception e) {
// Do not stop provisioning and ignore this error.
Slogf.e(LOG_TAG, "Alarm manager failed to set the system time/timezone.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTimeAndTimezone
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
|
setTimeAndTimezone
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStudyUsersTypesExpected() {
this.unsetTypeExpected();
int i = 1;
this.setTypeExpected(i, TypeNames.INT); // user_id
++i;
this.setTypeExpected(i, TypeNames.STRING); // first_name
++i;
this.setTypeExpected(i, TypeNames.STRING); // last_name
++i;
this.setTypeExpected(i, TypeNames.STRING); // institution_affilition
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStudyUsersTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setStudyUsersTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public @UserOperationResult int stopUser(
@NonNull ComponentName admin, @NonNull UserHandle userHandle) {
throwIfParentInstance("stopUser");
try {
return mService.stopUser(admin, userHandle);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopUser
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
|
stopUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendSetCallerDisplayName(String id) throws Exception {
for (IConnectionServiceAdapter a : mConnectionServiceAdapters) {
a.setCallerDisplayName(
id,
mConnectionById.get(id).callerDisplayName,
mConnectionById.get(id).callerDisplayNamePresentation, null /*Session.Info*/);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSetCallerDisplayName
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
sendSetCallerDisplayName
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getCrfVersionStatus(String seSubjectEventStatus, int cvStatusId, int ecStatusId, int validatorId) {
DataEntryStage stage = DataEntryStage.INVALID;
Status status = Status.get(ecStatusId);
// At this time, EventCRFBean stage is not in database.
//
// if (stage != null) {
// if (!stage.equals(DataEntryStage.INVALID)) {
// return stage.getName();
// }
// }
//
// if (!active || !status.isActive()) {
// stage = DataEntryStage.UNCOMPLETED;
// }
if (stage.equals(DataEntryStage.INVALID) || status.equals(Status.INVALID)) {
stage = DataEntryStage.UNCOMPLETED;
}
if (status.equals(Status.AVAILABLE)) {
stage = DataEntryStage.INITIAL_DATA_ENTRY;
}
if (status.equals(Status.PENDING)) {
if (validatorId != 0) {
stage = DataEntryStage.DOUBLE_DATA_ENTRY;
} else {
stage = DataEntryStage.INITIAL_DATA_ENTRY_COMPLETE;
}
}
if (status.equals(Status.UNAVAILABLE)) {
stage = DataEntryStage.DOUBLE_DATA_ENTRY_COMPLETE;
}
if (status.equals(Status.LOCKED)) {
stage = DataEntryStage.LOCKED;
}
try {
if (seSubjectEventStatus.equals(SubjectEventStatus.LOCKED.getName()) || seSubjectEventStatus.equals(SubjectEventStatus.SKIPPED.getName())
|| seSubjectEventStatus.equals(SubjectEventStatus.STOPPED.getName())) {
stage = DataEntryStage.LOCKED;
} else if (seSubjectEventStatus.equals(SubjectEventStatus.INVALID.getName())) {
stage = DataEntryStage.LOCKED;
} else if (cvStatusId != 1) {
stage = DataEntryStage.LOCKED;
}
} catch (NullPointerException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
//System.out.println("caught NPE here");
logger.debug("caught NPE here");
}
logger.debug("returning " + stage.getName());
return stage.getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrfVersionStatus
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getCrfVersionStatus
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean containsTimeMillis(CharSequence name, long value) {
return contains(name, fromTimeMillis(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsTimeMillis
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
containsTimeMillis
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean updateUserBasicInfo(EditUserRequest request) {
// 校验修改的用户邮箱是否已存在
if (StringUtils.isNotEmpty(request.getEmail())) {
if (this.count(new LambdaQueryWrapper<User>().ne(User::getId, request.getId()).eq(User::getEmail, request.getEmail())) > 0) {
throw new RuntimeException("邮箱已存在");
}
}
User user = new User();
BeanUtils.copyProperties(request, user);
user.setUpdateTime(null);
baseMapper.updateById(user);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateUserBasicInfo
File: framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
Repository: CloudExplorer-Dev/CloudExplorer-Lite
The code follows secure coding practices.
|
[
"CWE-521"
] |
CVE-2023-3423
|
HIGH
| 8.8
|
CloudExplorer-Dev/CloudExplorer-Lite
|
updateUserBasicInfo
|
framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
|
7d4dab60352079953b7be120afe9bd14983ae3bc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public ServerBuilder tlsAllowUnsafeCiphers() {
virtualHostTemplate.tlsAllowUnsafeCiphers();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tlsAllowUnsafeCiphers
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
tlsAllowUnsafeCiphers
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCounter(String name)
{
XWikiEngineContext econtext = this.context.getEngineContext();
Integer counter = (Integer) econtext.getAttribute(name);
if (counter == null) {
counter = 0;
}
counter = counter.intValue() + 1;
econtext.setAttribute(name, counter);
return counter.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCounter
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getCounter
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int rawRead(Object array, int byteOffset, int byteLength)
throws IOException
{
int writtenBytes = 0;
for (; writtenBytes < byteLength; ) {
if (uncompressedCursor >= uncompressedLimit) {
if (hasNextChunk()) {
continue;
}
else {
return writtenBytes == 0 ? -1 : writtenBytes;
}
}
int bytesToWrite = Math.min(uncompressedLimit - uncompressedCursor, byteLength - writtenBytes);
Snappy.arrayCopy(uncompressed, uncompressedCursor, bytesToWrite, array, byteOffset + writtenBytes);
writtenBytes += bytesToWrite;
uncompressedCursor += bytesToWrite;
}
return writtenBytes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rawRead
File: src/main/java/org/xerial/snappy/SnappyInputStream.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-34455
|
HIGH
| 7.5
|
xerial/snappy-java
|
rawRead
|
src/main/java/org/xerial/snappy/SnappyInputStream.java
|
3bf67857fcf70d9eea56eed4af7c925671e8eaea
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String login(ServerHttpRequest request, LoginRequest loginRequest) {
if (StringUtils.isBlank(loginRequest.getUsername())) {
throw new RuntimeException("用户名为空");
}
if (StringUtils.isBlank(loginRequest.getPassword())) {
throw new RuntimeException("密码为空");
}
UserDto user = getUserByIdOrEmail(loginRequest.getUsername());
if (user == null) {
throw new RuntimeException("用户不存在");
}
if (!user.getEnabled()) {
throw new RuntimeException("用户已被禁用");
}
if (!checkPassword(user, loginRequest.getPassword())) {
throw new RuntimeException("密码错误");
}
//将当前用户的授权角色更新到redis
userRoleService.saveCachedUserRoleMap(user.getId());
System.out.println(IpUtil.getIpAddress(request));
user.setIp(IpUtil.getIpAddress(request));
user.setLoginTime(LocalDateTime.now());
KeyValue<String, String> jwt = JwtTokenUtils.createJwtToken(user);
tokenPoolService.saveJwt(user.getId(), jwt.getKey());
return jwt.getValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: login
File: framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
Repository: CloudExplorer-Dev/CloudExplorer-Lite
The code follows secure coding practices.
|
[
"CWE-521"
] |
CVE-2023-3423
|
HIGH
| 8.8
|
CloudExplorer-Dev/CloudExplorer-Lite
|
login
|
framework/sdk/backend/src/main/java/com/fit2cloud/base/service/impl/BaseUserServiceImpl.java
|
7d4dab60352079953b7be120afe9bd14983ae3bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder workerGroup(EventLoopGroup workerGroup, boolean shutdownOnStop) {
this.workerGroup = requireNonNull(workerGroup, "workerGroup");
// We don't use ShutdownSupport to shutdown with other instances because we shut down workerGroup first.
shutdownWorkerGroupOnStop = shutdownOnStop;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: workerGroup
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
workerGroup
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getTypesForCaller(
int callingUid, int userId, boolean isOtherwisePermitted) {
List<String> managedAccountTypes = new ArrayList<>();
final long identityToken = Binder.clearCallingIdentity();
Collection<RegisteredServicesCache.ServiceInfo<AuthenticatorDescription>> serviceInfos;
try {
serviceInfos = mAuthenticatorCache.getAllServices(userId);
} finally {
Binder.restoreCallingIdentity(identityToken);
}
PackageManagerInternal pmi = LocalServices.getService(PackageManagerInternal.class);
for (RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> serviceInfo :
serviceInfos) {
if (isOtherwisePermitted || pmi.hasSignatureCapability(
serviceInfo.uid, callingUid, CertCapabilities.AUTH)) {
managedAccountTypes.add(serviceInfo.type.type);
}
}
return managedAccountTypes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTypesForCaller
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getTypesForCaller
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getNumOfLayers()
{
return this.vi.length - 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNumOfLayers
File: core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getNumOfLayers
|
core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean supportsFreeformInDisplayArea(@Nullable TaskDisplayArea tda) {
return mAtmService.mSupportsFreeformWindowManagement
&& supportsMultiWindowInDisplayArea(tda);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supportsFreeformInDisplayArea
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
supportsFreeformInDisplayArea
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void applyStableConstraints(int sysui, int fl, Rect r) {
if ((sysui & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) {
// If app is requesting a stable layout, don't let the
// content insets go below the stable values.
if ((fl & FLAG_FULLSCREEN) != 0) {
if (r.left < mStableFullscreenLeft) r.left = mStableFullscreenLeft;
if (r.top < mStableFullscreenTop) r.top = mStableFullscreenTop;
if (r.right > mStableFullscreenRight) r.right = mStableFullscreenRight;
if (r.bottom > mStableFullscreenBottom) r.bottom = mStableFullscreenBottom;
} else {
if (r.left < mStableLeft) r.left = mStableLeft;
if (r.top < mStableTop) r.top = mStableTop;
if (r.right > mStableRight) r.right = mStableRight;
if (r.bottom > mStableBottom) r.bottom = mStableBottom;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyStableConstraints
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
applyStableConstraints
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void jsFunction_loadAxisConfigOfTenant(Context cx, Scriptable thisObj,
Object[] args, Function funObj) {
if (!isStringArray(args)) {
return;
}
String tenantDomain = args[0].toString();
if (tenantDomain != null &&
!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
APIUtil.loadTenantConfig(tenantDomain);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_loadAxisConfigOfTenant
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_loadAxisConfigOfTenant
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isPreOApplication(String packageName) {
try {
final long identityToken = clearCallingIdentity();
ApplicationInfo applicationInfo;
try {
applicationInfo = mPackageManager.getApplicationInfo(packageName, 0);
} finally {
restoreCallingIdentity(identityToken);
}
if (applicationInfo != null) {
int version = applicationInfo.targetSdkVersion;
return version < android.os.Build.VERSION_CODES.O;
}
return true;
} catch (NameNotFoundException e) {
Log.d(TAG, "Package not found " + e.getMessage());
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPreOApplication
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
isPreOApplication
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private Stream<UserSessionModel> loadUserSessionsWithClientSessions(TypedQuery<PersistentUserSessionEntity> query, String offlineStr) {
List<PersistentUserSessionAdapter> userSessionAdapters = closing(query.getResultStream()
.map(this::toAdapter)
.filter(Objects::nonNull))
.collect(Collectors.toList());
Map<String, PersistentUserSessionAdapter> sessionsById = userSessionAdapters.stream()
.collect(Collectors.toMap(UserSessionModel::getId, Function.identity()));
Set<String> removedClientUUIDs = new HashSet<>();
if (!sessionsById.isEmpty()) {
String fromUserSessionId = userSessionAdapters.get(0).getId();
String toUserSessionId = userSessionAdapters.get(userSessionAdapters.size() - 1).getId();
TypedQuery<PersistentClientSessionEntity> queryClientSessions = em.createNamedQuery("findClientSessionsOrderedById", PersistentClientSessionEntity.class);
queryClientSessions.setParameter("offline", offlineStr);
queryClientSessions.setParameter("fromSessionId", fromUserSessionId);
queryClientSessions.setParameter("toSessionId", toUserSessionId);
closing(queryClientSessions.getResultStream()).forEach(clientSession -> {
PersistentUserSessionAdapter userSession = sessionsById.get(clientSession.getUserSessionId());
// check if we have a user session for the client session
if (userSession != null) {
boolean added = addClientSessionToAuthenticatedClientSessionsIfPresent(userSession, clientSession);
if (!added) {
// client was removed in the meantime
removedClientUUIDs.add(clientSession.getClientId());
}
}
});
}
for (String clientUUID : removedClientUUIDs) {
onClientRemoved(clientUUID);
}
return userSessionAdapters.stream().map(UserSessionModel.class::cast);
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2023-6563
- Severity: HIGH
- CVSS Score: 7.7
Description: Fix performance issues with many offline sessions
Fixes: #13340
Function: loadUserSessionsWithClientSessions
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
Fixed Code:
private Stream<UserSessionModel> loadUserSessionsWithClientSessions(TypedQuery<PersistentUserSessionEntity> query, String offlineStr, boolean useExact) {
List<PersistentUserSessionAdapter> userSessionAdapters = closing(query.getResultStream()
.map(this::toAdapter)
.filter(Objects::nonNull))
.collect(Collectors.toList());
Map<String, PersistentUserSessionAdapter> sessionsById = userSessionAdapters.stream()
.collect(Collectors.toMap(UserSessionModel::getId, Function.identity()));
Set<String> userSessionIds = sessionsById.keySet();
Set<String> removedClientUUIDs = new HashSet<>();
if (!sessionsById.isEmpty()) {
TypedQuery<PersistentClientSessionEntity> queryClientSessions;
if (useExact) {
queryClientSessions = em.createNamedQuery("findClientSessionsOrderedByIdExact", PersistentClientSessionEntity.class);
queryClientSessions.setParameter("offline", offlineStr);
queryClientSessions.setParameter("userSessionIds", userSessionIds);
} else {
String fromUserSessionId = userSessionAdapters.get(0).getId();
String toUserSessionId = userSessionAdapters.get(userSessionAdapters.size() - 1).getId();
queryClientSessions = em.createNamedQuery("findClientSessionsOrderedByIdInterval", PersistentClientSessionEntity.class);
queryClientSessions.setParameter("offline", offlineStr);
queryClientSessions.setParameter("fromSessionId", fromUserSessionId);
queryClientSessions.setParameter("toSessionId", toUserSessionId);
}
closing(queryClientSessions.getResultStream()).forEach(clientSession -> {
PersistentUserSessionAdapter userSession = sessionsById.get(clientSession.getUserSessionId());
// check if we have a user session for the client session
if (userSession != null) {
boolean added = addClientSessionToAuthenticatedClientSessionsIfPresent(userSession, clientSession);
if (!added) {
// client was removed in the meantime
removedClientUUIDs.add(clientSession.getClientId());
}
}
});
}
for (String clientUUID : removedClientUUIDs) {
onClientRemoved(clientUUID);
}
return userSessionAdapters.stream().map(UserSessionModel.class::cast);
}
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
loadUserSessionsWithClientSessions
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 1
|
Analyze the following code function for security vulnerabilities
|
private List<String> _getUserNames() {
final List<String> userNames = new ArrayList<String>();
userNames.addAll(m_users.keySet());
return userNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _getUserNames
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
_getUserNames
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void applyEndpointAccessAuthentication(URLConnection http, SecurityAuthentication authentication) {
if (authentication.isPublic())
// Shortcut: No need to apply authentication.
return;
if (http instanceof HttpsURLConnection || SecurityUtils.isNonSSLAuthenticationAllowed()) {
SecurityAccessInterceptor accessInterceptor = SecurityUtils.getAccessInterceptor(authentication);
accessInterceptor.apply(authentication, http);
} else {
// We cannot allow applying secret tokens on plain connections. Everyone can
// read the data.
throw new IllegalStateException(
"The transport of authentication data over an unencrypted http connection is not allowed");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyEndpointAccessAuthentication
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
applyEndpointAccessAuthentication
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder removeRequestFilter(RequestFilter requestFilter) {
requestFilters.remove(requestFilter);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeRequestFilter
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
removeRequestFilter
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public static KeyRequestInfoCollection fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element element = document.getDocumentElement();
return fromDOM(element);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfoCollection.java
Repository: dogtagpki/pki
Fixed Code:
public static KeyRequestInfoCollection fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element element = document.getDocumentElement();
return fromDOM(element);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfoCollection.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public TargetInfo targetInfoForPosition(int position, boolean filtered) {
int offset = 0;
final int callerTargetCount = getCallerTargetCount();
if (position < callerTargetCount) {
return mCallerTargets.get(position);
}
offset += callerTargetCount;
final int serviceTargetCount = getServiceTargetCount();
if (position - offset < serviceTargetCount) {
return mServiceTargets.get(position - offset);
}
offset += serviceTargetCount;
return filtered ? super.getItem(position - offset)
: getDisplayInfoAt(position - offset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: targetInfoForPosition
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
targetInfoForPosition
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
private XWikiDocument prepareDocumentForSave(XWikiDocument document, String comment, boolean isMinorEdit,
XWikiContext context) throws XWikiException
{
// Set the store so we can use it for checking the max length.
if (document.getStore() == null) {
document.setStore(this.getStore());
}
String fullName = getLocalStringEntityReferenceSerializer().serialize(document.getDocumentReference());
// If it's a new doc we check its name length to avoid a nasty SQL error.
if (document.isNew() && fullName.length() > document.getLocalReferenceMaxLength()) {
java.lang.Object[] args = { fullName, document.getLocalReferenceMaxLength(), fullName.length() };
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_APP_DOCUMENT_PATH_TOO_LONG,
"Cannot create document {0} because its full path is too long: only {1} characters are allowed and "
+ "current length is {2}.",
null, args);
}
// Setting comment & minor edit before saving
document.setComment(StringUtils.defaultString(comment));
document.setMinorEdit(isMinorEdit);
// We need to save the original document since saveXWikiDoc() will reset it and we
// need that original document for the notification below.
XWikiDocument originalDocument = document.getOriginalDocument();
// Make sure to always have an original document for listeners that need to compare with it.
// The only case where we have a null original document is supposedly when the document
// instance has been crafted and passed #saveDocument without using #getDocument
// (which is not a good practice)
// Also for document indicated as new make sure the previous document is accurate.
if (originalDocument == null || document.isNew()) {
XWikiDocument existing = getDocument(document.getDocumentReferenceWithLocale(), context);
// Switch the original document only if we actually find an existing document or if there is no original
// document in the first place
if (originalDocument == null || !existing.isNew()) {
originalDocument = existing;
document.setOriginalDocument(originalDocument);
}
}
return originalDocument;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareDocumentForSave
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
|
prepareDocumentForSave
|
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 void reportFailedPasswordAttempt(int userId) {
getDevicePolicyManager().reportFailedPasswordAttempt(userId);
getTrustManager().reportUnlockAttempt(false /* authenticated */, userId);
requireStrongAuth(StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_WRONG_CREDENTIAL, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportFailedPasswordAttempt
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
reportFailedPasswordAttempt
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyLockoutResetMonitors() {
for (int i = 0; i < mLockoutMonitors.size(); i++) {
mLockoutMonitors.get(i).sendLockoutReset();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyLockoutResetMonitors
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
notifyLockoutResetMonitors
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getAccountRemovedReceivers(Account account, UserAccounts accounts) {
Intent intent = new Intent(AccountManager.ACTION_ACCOUNT_REMOVED);
intent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
List<ResolveInfo> receivers =
mPackageManager.queryBroadcastReceiversAsUser(intent, 0, accounts.userId);
List<String> result = new ArrayList<>();
if (receivers == null) {
return result;
}
for (ResolveInfo resolveInfo: receivers) {
String packageName = resolveInfo.activityInfo.applicationInfo.packageName;
int visibility = resolveAccountVisibility(account, packageName, accounts);
if (visibility == AccountManager.VISIBILITY_VISIBLE
|| visibility == AccountManager.VISIBILITY_USER_MANAGED_VISIBLE) {
result.add(packageName);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountRemovedReceivers
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getAccountRemovedReceivers
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected InputStream getFileInputLocal(String name) throws DirectoryException {
try {
return new FileInputStream(generatePath(name));
} catch (FileNotFoundException e) {
throw new DirectoryException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileInputLocal
File: brut.j.dir/src/main/java/brut/directory/FileDirectory.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
getFileInputLocal
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDelegatedScopes(@NonNull ComponentName admin, @NonNull String delegatePackage,
@NonNull List<String> scopes) {
throwIfParentInstance("setDelegatedScopes");
if (mService != null) {
try {
mService.setDelegatedScopes(admin, delegatePackage, scopes);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDelegatedScopes
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
|
setDelegatedScopes
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void putDocumentOnContext(XWikiDocument document, XWikiContext context)
{
context.put("tdoc", document);
// Old XWiki applications that are still using the inline action might expect the cdoc (content document) to be
// properly set on the context. Let's expose the given document also as cdoc for backward compatibility.
context.put("cdoc", context.get("tdoc"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putDocumentOnContext
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
|
putDocumentOnContext
|
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
|
public PrintWriter createPrintWriter(String charset) throws FileNotFoundException, UnsupportedEncodingException {
return new PrintWriter(internal, charset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPrintWriter
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
createPrintWriter
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
@RequiresPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)
public boolean triggerDevicePolicyEngineMigration(boolean forceMigration) {
if (mService != null) {
try {
return mService.triggerDevicePolicyEngineMigration(forceMigration);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggerDevicePolicyEngineMigration
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
|
triggerDevicePolicyEngineMigration
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getDelegatedUid() {
return mDelegatedUid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDelegatedUid
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
|
getDelegatedUid
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
pw.println("Permission Denial: can't dump NotificationManager from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid());
return;
}
final DumpFilter filter = DumpFilter.parseFromArguments(args);
if (filter != null && filter.stats) {
dumpJson(pw, filter);
} else {
dumpImpl(pw, filter);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
dump
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getBooleanProperty(String name) throws JMSException {
Object o = this.getObjectProperty(name);
if (o == null) {
//default value for null is false
return false;
} else if (o instanceof String) {
return Boolean.parseBoolean((String) o);
} else if (o instanceof Boolean) {
return (Boolean) o;
} else {
throw new MessageFormatException(String.format("Unable to convert from class [%s]", o.getClass().getName()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBooleanProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getBooleanProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@Override
public byte[] backupRuntimePermissions(@UserIdInt int userId) {
return mPermissionManagerServiceImpl.backupRuntimePermissions(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backupRuntimePermissions
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
|
backupRuntimePermissions
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onGeolocationPermissionsShowPrompt(String origin,
GeolocationPermissions.Callback callback) {
// Always grant permission since the app itself requires location
// permission and the user has therefore already granted it
callback.invoke(origin, true, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onGeolocationPermissionsShowPrompt
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onGeolocationPermissionsShowPrompt
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static final short getNamesValue(String value) {
if (value.equals("lower")) {
return NAMES_LOWERCASE;
}
if (value.equals("upper")) {
return NAMES_UPPERCASE;
}
return NAMES_NO_CHANGE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNamesValue
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
getNamesValue
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCluster() {
return cluster;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCluster
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
getCluster
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
public DropFileContainer setTooltip(final String content)
{
WicketUtils.addTooltip(main, content);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTooltip
File: src/main/java/org/projectforge/web/wicket/components/DropFileContainer.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
setTooltip
|
src/main/java/org/projectforge/web/wicket/components/DropFileContainer.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SurfaceControl getAnimationLeashParent() {
if (isStartingWindowAssociatedToTask()) {
return mStartingData.mAssociatedTask.mSurfaceControl;
}
return super.getAnimationLeashParent();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAnimationLeashParent
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
|
getAnimationLeashParent
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void launchDeepLinkIntentToRight() {
if (!mIsEmbeddingActivityEnabled) {
return;
}
final Intent intent = getIntent();
if (intent == null || !TextUtils.equals(intent.getAction(),
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY)) {
return;
}
if (!(this instanceof DeepLinkHomepageActivity
|| this instanceof DeepLinkHomepageActivityInternal)) {
Log.e(TAG, "Not a deep link component");
finish();
return;
}
final String intentUriString = intent.getStringExtra(
EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI);
if (TextUtils.isEmpty(intentUriString)) {
Log.e(TAG, "No EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI to deep link");
finish();
return;
}
final Intent targetIntent;
try {
targetIntent = Intent.parseUri(intentUriString, Intent.URI_INTENT_SCHEME);
} catch (URISyntaxException e) {
Log.e(TAG, "Failed to parse deep link intent: " + e);
finish();
return;
}
final ComponentName targetComponentName = targetIntent.resolveActivity(getPackageManager());
if (targetComponentName == null) {
Log.e(TAG, "No valid target for the deep link intent: " + targetIntent);
finish();
return;
}
ActivityInfo targetActivityInfo = null;
try {
targetActivityInfo = getPackageManager().getActivityInfo(targetComponentName,
/* flags= */ 0);
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Failed to get target ActivityInfo: " + e);
finish();
return;
}
int callingUid = -1;
try {
callingUid = ActivityManager.getService().getLaunchedFromUid(getActivityToken());
} catch (RemoteException re) {
Log.e(TAG, "Not able to get callingUid: " + re);
finish();
return;
}
if (!hasPrivilegedAccess(callingUid, targetActivityInfo)) {
if (!targetActivityInfo.exported) {
Log.e(TAG, "Target Activity is not exported");
finish();
return;
}
if (!isCallingAppPermitted(targetActivityInfo.permission)) {
Log.e(TAG, "Calling app must have the permission of deep link Activity");
finish();
return;
}
}
targetIntent.setComponent(targetComponentName);
// To prevent launchDeepLinkIntentToRight again for configuration change.
intent.setAction(null);
targetIntent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
targetIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
// Sender of intent may want to send intent extra data to the destination of targetIntent.
targetIntent.replaceExtras(intent);
targetIntent.putExtra(EXTRA_IS_FROM_SETTINGS_HOMEPAGE, true);
targetIntent.putExtra(SettingsActivity.EXTRA_IS_FROM_SLICE, false);
targetIntent.setData(intent.getParcelableExtra(
SettingsHomepageActivity.EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_DATA));
// Only allow FLAG_GRANT_READ/WRITE_URI_PERMISSION if calling app has the permission to
// access specified Uri.
int uriPermissionFlags = targetIntent.getFlags()
& (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
if (targetIntent.getData() != null
&& uriPermissionFlags != 0
&& checkUriPermission(targetIntent.getData(), /* pid= */ -1, callingUid,
uriPermissionFlags) == PackageManager.PERMISSION_DENIED) {
Log.e(TAG, "Calling app must have the permission to access Uri and grant permission");
finish();
return;
}
// Set 2-pane pair rule for the deep link page.
ActivityEmbeddingRulesController.registerTwoPanePairRule(this,
new ComponentName(getApplicationContext(), getClass()),
targetComponentName,
targetIntent.getAction(),
SplitRule.FINISH_ALWAYS,
SplitRule.FINISH_ALWAYS,
true /* clearTop */);
ActivityEmbeddingRulesController.registerTwoPanePairRule(this,
new ComponentName(getApplicationContext(), Settings.class),
targetComponentName,
targetIntent.getAction(),
SplitRule.FINISH_ALWAYS,
SplitRule.FINISH_ALWAYS,
true /* clearTop */);
final UserHandle user = intent.getParcelableExtra(EXTRA_USER_HANDLE, UserHandle.class);
if (user != null) {
startActivityAsUser(targetIntent, user);
} else {
startActivity(targetIntent);
}
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21256
- Severity: HIGH
- CVSS Score: 7.8
Description: Refine permission check process of 2-pane deep link
- Check the deep link activity instance before redirecting to the
internal activity for the managed profile invocation, so the caller
can't bypass the permission check.
- Get the referrer as the caller so that onNewIntent can recognize the
new caller and check if it has a permission to open the target page.
Test: robotest & manual
Bug: 268193384
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0f13f70655099543ba34eb8aeaa74b34a3993a3b)
Merged-In: Ie69742983fb74ee2316b7aad16461db95ed927c2
Change-Id: Ie69742983fb74ee2316b7aad16461db95ed927c2
Function: launchDeepLinkIntentToRight
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
Fixed Code:
private void launchDeepLinkIntentToRight() {
if (!mIsEmbeddingActivityEnabled) {
return;
}
final Intent intent = getIntent();
if (intent == null || !TextUtils.equals(intent.getAction(),
ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY)) {
return;
}
if (!(this instanceof DeepLinkHomepageActivity
|| this instanceof DeepLinkHomepageActivityInternal)) {
Log.e(TAG, "Not a deep link component");
finish();
return;
}
final String intentUriString = intent.getStringExtra(
EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI);
if (TextUtils.isEmpty(intentUriString)) {
Log.e(TAG, "No EXTRA_SETTINGS_EMBEDDED_DEEP_LINK_INTENT_URI to deep link");
finish();
return;
}
final Intent targetIntent;
try {
targetIntent = Intent.parseUri(intentUriString, Intent.URI_INTENT_SCHEME);
} catch (URISyntaxException e) {
Log.e(TAG, "Failed to parse deep link intent: " + e);
finish();
return;
}
final ComponentName targetComponentName = targetIntent.resolveActivity(getPackageManager());
if (targetComponentName == null) {
Log.e(TAG, "No valid target for the deep link intent: " + targetIntent);
finish();
return;
}
ActivityInfo targetActivityInfo;
try {
targetActivityInfo = getPackageManager().getActivityInfo(targetComponentName,
/* flags= */ 0);
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Failed to get target ActivityInfo: " + e);
finish();
return;
}
UserHandle user = intent.getParcelableExtra(EXTRA_USER_HANDLE, UserHandle.class);
String caller = getInitialReferrer();
int callerUid = -1;
if (caller != null) {
try {
callerUid = getPackageManager().getApplicationInfoAsUser(caller,
ApplicationInfoFlags.of(/* flags= */ 0),
user != null ? user.getIdentifier() : getUserId()).uid;
} catch (PackageManager.NameNotFoundException e) {
Log.e(TAG, "Not able to get callerUid: " + e);
finish();
return;
}
}
if (!hasPrivilegedAccess(caller, callerUid, targetActivityInfo.packageName)) {
if (!targetActivityInfo.exported) {
Log.e(TAG, "Target Activity is not exported");
finish();
return;
}
if (!isCallingAppPermitted(targetActivityInfo.permission, callerUid)) {
Log.e(TAG, "Calling app must have the permission of deep link Activity");
finish();
return;
}
}
targetIntent.setComponent(targetComponentName);
// To prevent launchDeepLinkIntentToRight again for configuration change.
intent.setAction(null);
targetIntent.removeFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
targetIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
// Sender of intent may want to send intent extra data to the destination of targetIntent.
targetIntent.replaceExtras(intent);
targetIntent.putExtra(EXTRA_IS_FROM_SETTINGS_HOMEPAGE, true);
targetIntent.putExtra(SettingsActivity.EXTRA_IS_FROM_SLICE, false);
targetIntent.setData(intent.getParcelableExtra(
SettingsHomepageActivity.EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_DATA));
// Only allow FLAG_GRANT_READ/WRITE_URI_PERMISSION if calling app has the permission to
// access specified Uri.
int uriPermissionFlags = targetIntent.getFlags()
& (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
if (targetIntent.getData() != null
&& uriPermissionFlags != 0
&& checkUriPermission(targetIntent.getData(), /* pid= */ -1, callerUid,
uriPermissionFlags) == PackageManager.PERMISSION_DENIED) {
Log.e(TAG, "Calling app must have the permission to access Uri and grant permission");
finish();
return;
}
// Set 2-pane pair rule for the deep link page.
ActivityEmbeddingRulesController.registerTwoPanePairRule(this,
new ComponentName(getApplicationContext(), getClass()),
targetComponentName,
targetIntent.getAction(),
SplitRule.FINISH_ALWAYS,
SplitRule.FINISH_ALWAYS,
true /* clearTop */);
ActivityEmbeddingRulesController.registerTwoPanePairRule(this,
new ComponentName(getApplicationContext(), Settings.class),
targetComponentName,
targetIntent.getAction(),
SplitRule.FINISH_ALWAYS,
SplitRule.FINISH_ALWAYS,
true /* clearTop */);
if (user != null) {
startActivityAsUser(targetIntent, user);
} else {
startActivity(targetIntent);
}
}
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
launchDeepLinkIntentToRight
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getSerialTo() {
return serialTo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSerialTo
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
|
getSerialTo
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.OneArgHandler promise(final String executor,
final Deferred.Initializer initializer) {
return req -> new Deferred(executor, initializer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: promise
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
promise
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseClass getRightsClass(String pagename, XWikiContext context) throws XWikiException
{
return getMandatoryClass(context, new DocumentReference(context.getWikiId(), SYSTEM_SPACE, pagename));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRightsClass
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
|
getRightsClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static MessageDigest getMessageDigestInstance(DigestAlgorithm digestAlgorithm)
throws NoSuchAlgorithmException {
String jcaAlgorithm = digestAlgorithm.getJcaMessageDigestAlgorithm();
return MessageDigest.getInstance(jcaAlgorithm);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessageDigestInstance
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getMessageDigestInstance
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 namespace(String prefix, String namespaceURI) {
super.namespaceImpl(prefix, namespaceURI);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: namespace
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
|
namespace
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCharacterEncoding(String arg0) {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCharacterEncoding
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
|
setCharacterEncoding
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCertRequestType() {
return certRequestType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCertRequestType
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getCertRequestType
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void install(final Logger log, final Jooby.Module module, final Env env, final Config config,
final Binder binder) throws Throwable {
module.configure(env, config, binder);
try {
binder.install(ProviderMethodsModule.forObject(module));
} catch (NoClassDefFoundError x) {
// Allow dynamic linking of optional dependencies (required by micrometer module), we ignore
// missing classes here, if there is a missing class Jooby is going to fails early (not here)
log.debug("ignoring class not found from guice provider method", x);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: install
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
install
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void createsCountQueryForScalarSelects() {
assertCountQuery("select p.lastname,p.firstname from Person p", "select count(p) from Person p");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createsCountQueryForScalarSelects
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
createsCountQueryForScalarSelects
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
private String columnValue(String value) {
return value.replaceAll("\r", "CR").replaceAll("\n", "LF");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: columnValue
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
columnValue
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void deletePeerConnection(PeerConnectionWrapper peerConnectionWrapper) {
peerConnectionWrapper.removePeerConnection();
peerConnectionWrapperList.remove(peerConnectionWrapper);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deletePeerConnection
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
deletePeerConnection
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract PushCallback getPushCallbackInstance();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPushCallbackInstance
File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getPushCallbackInstance
|
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isDecimalNotation(final String val) {
return val.indexOf('.') > -1 || val.indexOf('e') > -1
|| val.indexOf('E') > -1 || "-0".equals(val);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDecimalNotation
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
isDecimalNotation
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object optQuery(JSONPointer jsonPointer) {
try {
return jsonPointer.queryFrom(this);
} catch (JSONPointerException e) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optQuery
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
|
optQuery
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Jiffle.Result<Map<String, Jiffle.ImageRole>> getScriptImageParams(ParseTree tree) {
ImagesBlockWorker reader = new ImagesBlockWorker(tree);
return new Jiffle.Result(reader.imageVars, reader.messages);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScriptImageParams
File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
Repository: geosolutions-it/jai-ext
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-24816
|
HIGH
| 7.5
|
geosolutions-it/jai-ext
|
getScriptImageParams
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String handlePwaUnavailablePage(Map<String, Object> data) {
return UserviewUtil.getTemplate(this, data, "/templates/userview/pwaUnavailable.ftl");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePwaUnavailablePage
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
handlePwaUnavailablePage
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@JRubyMethod(name = "column")
public IRubyObject
column(ThreadContext context)
{
final Integer number = handler.getColumn();
if (number == null) { return context.getRuntime().getNil(); }
return RubyFixnum.newFixnum(context.getRuntime(), number.longValue());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: column
File: ext/java/nokogiri/XmlSaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
column
|
ext/java/nokogiri/XmlSaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract boolean hasPageExtensions(XWikiContext context);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasPageExtensions
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
hasPageExtensions
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ActivityOptions makeBasic() {
final ActivityOptions opts = new ActivityOptions();
return opts;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeBasic
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
makeBasic
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private static MappedByteBuffer mapInternal(File file, MapMode mode, long size)
throws IOException {
checkNotNull(file);
checkNotNull(mode);
Closer closer = Closer.create();
try {
RandomAccessFile raf =
closer.register(new RandomAccessFile(file, mode == MapMode.READ_ONLY ? "r" : "rw"));
FileChannel channel = closer.register(raf.getChannel());
return channel.map(mode, 0, size == -1 ? channel.size() : size);
} catch (Throwable e) {
throw closer.rethrow(e);
} finally {
closer.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mapInternal
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
mapInternal
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private Syntax resolveSyntax(String syntaxId)
{
Syntax syntax;
try {
syntax = getSyntaxRegistry().resolveSyntax(syntaxId);
} catch (ParseException e) {
syntax = getDefaultDocumentSyntax();
LOGGER.warn("Failed to set syntax [{}] for [{}], setting syntax [{}] instead.", syntaxId,
getDefaultEntityReferenceSerializer().serialize(getDocumentReference()), syntax.toIdString(), e);
}
return syntax;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveSyntax
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
|
resolveSyntax
|
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
|
private void updateSecureSessionFlag() {
try {
ServletContext context = Jenkins.getInstance().servletContext;
Method m;
try {
m = context.getClass().getMethod("getSessionCookieConfig");
} catch (NoSuchMethodException x) { // 3.0+
LOGGER.log(Level.FINE, "Failed to set secure cookie flag", x);
return;
}
Object sessionCookieConfig = m.invoke(context);
// not exposing session cookie to JavaScript to mitigate damage caused by XSS
Class scc = Class.forName("javax.servlet.SessionCookieConfig");
Method setHttpOnly = scc.getMethod("setHttpOnly",boolean.class);
setHttpOnly.invoke(sessionCookieConfig,true);
Method setSecure = scc.getMethod("setSecure",boolean.class);
boolean v = fixNull(jenkinsUrl).startsWith("https");
setSecure.invoke(sessionCookieConfig,v);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to set secure cookie flag", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-254
- CVE: CVE-2014-9634
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [FIXED JENKINS-25019]
A truly conforming servlet 3.0 container does not allow us to set "secure cookie" flag beyond ServletContextListener.onInitialized().
If we see that, don't scare the users.
Function: updateSecureSessionFlag
File: core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
Repository: jenkinsci/jenkins
Fixed Code:
private void updateSecureSessionFlag() {
try {
ServletContext context = Jenkins.getInstance().servletContext;
Method m;
try {
m = context.getClass().getMethod("getSessionCookieConfig");
} catch (NoSuchMethodException x) { // 3.0+
LOGGER.log(Level.FINE, "Failed to set secure cookie flag", x);
return;
}
Object sessionCookieConfig = m.invoke(context);
Class scc = Class.forName("javax.servlet.SessionCookieConfig");
Method setSecure = scc.getMethod("setSecure", boolean.class);
boolean v = fixNull(jenkinsUrl).startsWith("https");
setSecure.invoke(sessionCookieConfig, v);
} catch (InvocationTargetException e) {
if (e.getTargetException() instanceof IllegalStateException) {
// servlet 3.0 spec seems to prohibit this from getting set at runtime,
// though Winstone is happy to accept i. see JENKINS-25019
return;
}
LOGGER.log(Level.WARNING, "Failed to set secure cookie flag", e);
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to set secure cookie flag", e);
}
}
|
[
"CWE-254"
] |
CVE-2014-9634
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
updateSecureSessionFlag
|
core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java
|
582128b9ac179a788d43c1478be8a5224dc19710
| 1
|
Analyze the following code function for security vulnerabilities
|
public void call(Ruby runtime, RubyHash data, ByteList buffer, int at, int length);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: call
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
call
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 0
|
Analyze the following code function for security vulnerabilities
|
void super_onConfigurationChanged(Configuration newConfig);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: super_onConfigurationChanged
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
|
super_onConfigurationChanged
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean hasNullPointer(byte[][] in)
{
if (in == null)
{
return true;
}
for (int i = 0; i < in.length; i++)
{
if (in[i] == null)
{
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasNullPointer
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
hasNullPointer
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getClassList(XWikiContext context) throws XWikiException
{
List<String> result = getStore().getClassList(context);
Collections.sort(result);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassList
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
|
getClassList
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void characters(final char[] ch, final int start, final int length) throws SAXException {
final String text = new String(ch, start, length);
if (logger.isDebugEnabled()) {
logger.debug("Text: " + text);
}
textBuf.append(text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: characters
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
characters
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
private int jjMoveStringLiteralDfa8_1(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_1(6, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_1(7, active0);
return 8;
}
switch(curChar)
{
case 111:
return jjMoveStringLiteralDfa9_1(active0, 0x400000000000L);
default :
break;
}
return jjStartNfa_1(7, active0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjMoveStringLiteralDfa8_1
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjMoveStringLiteralDfa8_1
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String addRegionSql(String sql) {
for (Region region : Input.regionList) {
if (Input.query.contains(":")
&& region.getEnd() - region.getStart() > 100000) {
errorMsg = "Your region is too large. "
+ "Please submit a region of at most 100 kb.";
return "";
}
sql += "chr = '" + region.getChr() + "' "
+ "AND pos >= " + region.getStart() + " "
+ "AND pos <= " + region.getEnd() + " AND ";
}
sql += " TRUE ORDER BY chr,pos";
return sql;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRegionSql
File: src/main/java/model/Output.java
Repository: nickzren/alsdb
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15021
|
MEDIUM
| 5.2
|
nickzren/alsdb
|
addRegionSql
|
src/main/java/model/Output.java
|
cbc79a68145e845f951113d184b4de207c341599
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String createRequestString(String query, int start)
throws UnsupportedEncodingException {
String encoded_query = URLEncoder.encode(query, "utf8");
StringBuffer buffer = new StringBuffer();
buffer.append("https://www.googleapis.com/customsearch/v1?");
buffer.append("key=").append(API_KEY);
buffer.append("&cx=").append(CUSTOM_SEARCH_ENGINE_ID);
buffer.append("&q=").append(encoded_query);
buffer.append("&alt=atom");
buffer.append("&start=").append(start);
return buffer.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createRequestString
File: src/main/java/custom/application/search.java
Repository: m0ver/bible-online
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-4454
|
CRITICAL
| 9.8
|
m0ver/bible-online
|
createRequestString
|
src/main/java/custom/application/search.java
|
6ef0aabfb2d4ccd53fcaa9707781303af357410e
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("task/{taskId}")
public ModelAndView pageTask(@PathVariable String taskId,
HttpServletRequest request, HttpServletResponse response) throws IOException {
final ID taskId2 = ID.isId(taskId) ? ID.valueOf(taskId) : null;
if (taskId2 == null) {
response.sendError(404);
return null;
}
final ID user = getRequestUser(request);
if (!ProjectHelper.checkReadable(taskId2, user)) {
response.sendError(403, Language.L("你无权查看此任务"));
return null;
}
ConfigBean project = ProjectManager.instance.getProjectByX(taskId2, user);
ModelAndView mv = createModelAndView("/project/task-view");
mv.getModel().put("id", taskId2.toLiteral());
mv.getModel().put("projectIcon", project.getString("iconName"));
mv.getModel().put("projectStatus", project.getInteger("status"));
mv.getModel().put("isMember", project.get("members", Set.class).contains(user));
return mv;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageTask
File: src/main/java/com/rebuild/web/project/ProjectTaskController.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
pageTask
|
src/main/java/com/rebuild/web/project/ProjectTaskController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void set(Object itemId) {
this.itemId = itemId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
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
|
set
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public UserDTO getLoginUser(String userId, List<String> list) {
UserExample example = new UserExample();
example.createCriteria().andIdEqualTo(userId).andSourceIn(list);
long count = userMapper.countByExample(example);
if (count == 0) {
LogUtil.error("get login user error, userid is {}, sources is {}", userId, list);
return null;
}
return getUserDTO(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLoginUser
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
getLoginUser
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCompressable(String contentType, FacesContext ctx) {
// No compression when developing.
if (contentType == null || ctx.isProjectStage(ProjectStage.Development)) {
return false;
} else {
if (compressableTypes != null && !compressableTypes.isEmpty()) {
for (Pattern p : compressableTypes) {
boolean matches = p.matcher(contentType).matches();
if (matches) {
return true;
}
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompressable
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
|
isCompressable
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
static void logCriticalInfo(int priority, String msg) {
Slog.println(priority, TAG, msg);
EventLogTags.writePmCriticalInfo(msg);
try {
File fname = getSettingsProblemFile();
FileOutputStream out = new FileOutputStream(fname, true);
PrintWriter pw = new FastPrintWriter(out);
SimpleDateFormat formatter = new SimpleDateFormat();
String dateString = formatter.format(new Date(System.currentTimeMillis()));
pw.println(dateString + ": " + msg);
pw.close();
FileUtils.setPermissions(
fname.toString(),
FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IROTH,
-1, -1);
} catch (java.io.IOException e) {
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logCriticalInfo
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
|
logCriticalInfo
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
int getAdapterConnectionState() {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
return mAdapterProperties.getConnectionState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdapterConnectionState
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getAdapterConnectionState
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void get(String table, T entity, String[] fields, boolean returnCount, boolean returnIdField,
Handler<AsyncResult<Results<T>>> replyHandler) {
get(table, entity, fields, returnCount, returnIdField, -1, -1, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
get
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable Ref getRef(int i) throws SQLException {
checkClosed();
// The backend doesn't yet have SQL3 REF types
throw org.postgresql.Driver.notImplemented(this.getClass(), "getRef(int)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRef
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getRef
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addActiveData(Stream<T> dataObjects) {
dataObjects.map(getKeyMapper()::key)
.filter(key -> !activeData.contains(key))
.forEach(activeData::add);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addActiveData
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
addActiveData
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void upsertX(TestContext context) {
createFoo(context)
.upsert(FOO, randomUuid(), xPojo, context.asyncAssertSuccess());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: upsertX
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
|
upsertX
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dispatchFinishedGoingToSleep(int why) {
synchronized(this) {
mDeviceInteractive = false;
}
mHandler.sendMessage(mHandler.obtainMessage(MSG_FINISHED_GOING_TO_SLEEP, why, 0));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchFinishedGoingToSleep
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
dispatchFinishedGoingToSleep
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ParcelFileDescriptor blobFileDescriptorForQuery(SQLiteStatement prog,
String[] selectionArgs) {
prog.bindAllArgsAsStrings(selectionArgs);
return prog.simpleQueryForBlobFileDescriptor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: blobFileDescriptorForQuery
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
blobFileDescriptorForQuery
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getClassId() {
return classId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassId
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getClassId
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendEnableIntentLocked(Provider p) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_ENABLED);
intent.setComponent(p.info.provider);
sendBroadcastAsUser(intent, p.info.getProfile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendEnableIntentLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
sendEnableIntentLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private void scheduleConfigurationChanged(Configuration config) {
if (!attachedToProcess()) {
ProtoLog.w(WM_DEBUG_CONFIGURATION, "Can't report activity configuration "
+ "update - client not running, activityRecord=%s", this);
return;
}
try {
ProtoLog.v(WM_DEBUG_CONFIGURATION, "Sending new config to %s, "
+ "config: %s", this, config);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
ActivityConfigurationChangeItem.obtain(config));
} catch (RemoteException e) {
// If process died, whatever.
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleConfigurationChanged
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
scheduleConfigurationChanged
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
int increaseConfigurationSeqLocked() {
mConfigurationSeq = Math.max(++mConfigurationSeq, 1);
return mConfigurationSeq;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: increaseConfigurationSeqLocked
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
|
increaseConfigurationSeqLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read(byte[] b) throws IOException {
return this.read(b, 0, b.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
read
|
src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<String> getAllConfiguredTenantNames() {
return Collections.unmodifiableSet(tenants.getCEntries().keySet());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllConfiguredTenantNames
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
getAllConfiguredTenantNames
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] getCurrentProfileIds() {
return mUserController.getCurrentProfileIds();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentProfileIds
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getCurrentProfileIds
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
List<DictModel> queryTableDictByKeysAndFilterSql(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql, @Param("codeValues") List<String> codeValues);
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-45207
- Severity: CRITICAL
- CVSS Score: 9.8
Description: 【#4127】sql漏洞写法修复
Function: queryTableDictByKeysAndFilterSql
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
@Deprecated
List<DictModel> queryTableDictByKeysAndFilterSql(@Param("table") String table, @Param("text") String text, @Param("code") String code, @Param("filterSql") String filterSql, @Param("codeValues") List<String> codeValues);
|
[
"CWE-89"
] |
CVE-2022-45207
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
queryTableDictByKeysAndFilterSql
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
|
8632a835c23f558dfee3584d7658cc6a13ccec6f
| 1
|
Analyze the following code function for security vulnerabilities
|
private final boolean removeDyingProviderLocked(ProcessRecord proc,
ContentProviderRecord cpr, boolean always) {
final boolean inLaunching = mLaunchingProviders.contains(cpr);
if (!inLaunching || always) {
synchronized (cpr) {
cpr.launchingApp = null;
cpr.notifyAll();
}
mProviderMap.removeProviderByClass(cpr.name, UserHandle.getUserId(cpr.uid));
String names[] = cpr.info.authority.split(";");
for (int j = 0; j < names.length; j++) {
mProviderMap.removeProviderByName(names[j], UserHandle.getUserId(cpr.uid));
}
}
for (int i = cpr.connections.size() - 1; i >= 0; i--) {
ContentProviderConnection conn = cpr.connections.get(i);
if (conn.waiting) {
// If this connection is waiting for the provider, then we don't
// need to mess with its process unless we are always removing
// or for some reason the provider is not currently launching.
if (inLaunching && !always) {
continue;
}
}
ProcessRecord capp = conn.client;
conn.dead = true;
if (conn.stableCount > 0) {
if (!capp.persistent && capp.thread != null
&& capp.pid != 0
&& capp.pid != MY_PID) {
capp.kill("depends on provider "
+ cpr.name.flattenToShortString()
+ " in dying proc " + (proc != null ? proc.processName : "??")
+ " (adj " + (proc != null ? proc.setAdj : "??") + ")", true);
}
} else if (capp.thread != null && conn.provider.provider != null) {
try {
capp.thread.unstableProviderDied(conn.provider.provider.asBinder());
} catch (RemoteException e) {
}
// In the protocol here, we don't expect the client to correctly
// clean up this connection, we'll just remove it.
cpr.connections.remove(i);
if (conn.client.conProviders.remove(conn)) {
stopAssociationLocked(capp.uid, capp.processName, cpr.uid, cpr.name);
}
}
}
if (inLaunching && always) {
mLaunchingProviders.remove(cpr);
}
return inLaunching;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDyingProviderLocked
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
|
removeDyingProviderLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long findInstanceLengthFromContentRange(FileDownloadConnection connection) {
return parseContentRangeFoInstanceLength(getContentRangeHeader(connection));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findInstanceLengthFromContentRange
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
findInstanceLengthFromContentRange
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element dataElement = document.createElement("CertData");
if (serialNumber != null) {
dataElement.setAttribute("id", serialNumber.toHexString());
}
if (issuerDN != null) {
Element issuerDNElement = document.createElement("IssuerDN");
issuerDNElement.appendChild(document.createTextNode(issuerDN));
dataElement.appendChild(issuerDNElement);
}
if (subjectDN != null) {
Element subjectDNElement = document.createElement("SubjectDN");
subjectDNElement.appendChild(document.createTextNode(subjectDN));
dataElement.appendChild(subjectDNElement);
}
if (prettyPrint != null) {
Element prettyPrintElement = document.createElement("PrettyPrint");
prettyPrintElement.appendChild(document.createTextNode(prettyPrint));
dataElement.appendChild(prettyPrintElement);
}
if (encoded != null) {
Element encodedElement = document.createElement("Encoded");
encodedElement.appendChild(document.createTextNode(encoded));
dataElement.appendChild(encodedElement);
}
if (pkcs7CertChain != null) {
Element pkcs7CertChainElement = document.createElement("PKCS7CertChain");
pkcs7CertChainElement.appendChild(document.createTextNode(pkcs7CertChain));
dataElement.appendChild(pkcs7CertChainElement);
}
if (notBefore != null) {
Element notBeforeElement = document.createElement("NotBefore");
notBeforeElement.appendChild(document.createTextNode(notBefore));
dataElement.appendChild(notBeforeElement);
}
if (notAfter != null) {
Element notAfterElement = document.createElement("NotAfter");
notAfterElement.appendChild(document.createTextNode(notAfter));
dataElement.appendChild(notAfterElement);
}
if (status != null) {
Element statusElement = document.createElement("Status");
statusElement.appendChild(document.createTextNode(status));
dataElement.appendChild(statusElement);
}
if (nonce != null) {
Element nonceElement = document.createElement("Nonce");
nonceElement.appendChild(document.createTextNode(Long.toString(nonce)));
dataElement.appendChild(nonceElement);
}
if (revokedOn != null) {
Element revokedOnElement = document.createElement("RevokedOn");
revokedOnElement.appendChild(document.createTextNode(Long.toString(revokedOn.getTime())));
dataElement.appendChild(revokedOnElement);
}
if (revokedBy != null) {
Element revokedByElement = document.createElement("RevokedBy");
revokedByElement.appendChild(document.createTextNode(revokedBy));
dataElement.appendChild(revokedByElement);
}
if (revocationReason != null) {
Element revocationReasonElement = document.createElement("RevocationReason");
revocationReasonElement.appendChild(document.createTextNode(Integer.toString(revocationReason)));
dataElement.appendChild(revocationReasonElement);
}
return dataElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private String spannedBodyToHtml(Spanned body, boolean removedComposing) {
if (!removedComposing) {
body = removeComposingSpans(body);
}
final HtmlifyBeginResult r = onHtmlifyBegin(body);
return onHtmlifyEnd(Html.toHtml(r.result), r.extras);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: spannedBodyToHtml
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
spannedBodyToHtml
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelPendingUploads(String accountName) {
mPendingUploads.remove(accountName);
mUploadsStorageManager.removeUploads(accountName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelPendingUploads
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
cancelPendingUploads
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showSystemReadyErrorDialogsIfNeeded() {
synchronized (mGlobalLock) {
try {
if (AppGlobals.getPackageManager().hasSystemUidErrors()) {
Slog.e(TAG, "UIDs on the system are inconsistent, you need to wipe your"
+ " data partition or your device will be unstable.");
mUiHandler.post(() -> {
if (mShowDialogs) {
AlertDialog d = new BaseErrorDialog(mUiContext);
d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
d.setCancelable(false);
d.setTitle(mUiContext.getText(R.string.android_system_label));
d.setMessage(mUiContext.getText(R.string.system_error_wipe_data));
d.setButton(DialogInterface.BUTTON_POSITIVE,
mUiContext.getText(R.string.ok),
mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d));
d.show();
}
});
}
} catch (RemoteException e) {
}
if (!Build.isBuildConsistent()) {
Slog.e(TAG, "Build fingerprint is not consistent, warning user");
mUiHandler.post(() -> {
if (mShowDialogs) {
AlertDialog d = new BaseErrorDialog(mUiContext);
d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
d.setCancelable(false);
d.setTitle(mUiContext.getText(R.string.android_system_label));
d.setMessage(mUiContext.getText(R.string.system_error_manufacturer));
d.setButton(DialogInterface.BUTTON_POSITIVE,
mUiContext.getText(R.string.ok),
mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d));
d.show();
}
});
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showSystemReadyErrorDialogsIfNeeded
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
|
showSystemReadyErrorDialogsIfNeeded
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void showInvalidChargerNotification() {
final Notification.Builder nb = new Notification.Builder(mContext)
.setSmallIcon(R.drawable.ic_power_low)
.setWhen(0)
.setShowWhen(false)
.setOngoing(true)
.setContentTitle(mContext.getString(R.string.invalid_charger_title))
.setContentText(mContext.getString(R.string.invalid_charger_text))
.setPriority(Notification.PRIORITY_MAX)
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setColor(mContext.getColor(
com.android.internal.R.color.system_notification_accent_color));
final Notification n = nb.build();
if (n.headsUpContentView != null) {
n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE);
}
mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showInvalidChargerNotification
File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3854
|
MEDIUM
| 5
|
android
|
showInvalidChargerNotification
|
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
|
05e0705177d2078fa9f940ce6df723312cfab976
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.