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
|
@Override
public String getParentName() {
return parentName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentName
File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getParentName
|
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setIsVoipAudioMode(String callId, boolean isVoip, Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.sIVAM", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setIsVoipAudioMode %s %b", callId, isVoip);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.setIsVoipAudioMode(isVoip);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIsVoipAudioMode
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setIsVoipAudioMode
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean hasAllApns(String[] apnTypes) {
if (ArrayUtils.isEmpty(apnTypes)) {
return false;
}
final List apnList = Arrays.asList(apnTypes);
if (apnList.contains(APN_TYPE_ALL)) {
Log.d(TAG, "hasAllApns: true because apnList.contains(APN_TYPE_ALL)");
return true;
}
for (String apn : APN_TYPES) {
if (!apnList.contains(apn)) {
return false;
}
}
Log.d(TAG, "hasAllApns: true");
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAllApns
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
hasAllApns
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean canRead() {
return internal.canRead();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canRead
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
|
canRead
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
void cleanUpResourcesLI() {
throw new UnsupportedOperationException();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpResourcesLI
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
|
cleanUpResourcesLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getThumbPart() throws IndexUnreachableException {
if (viewManager != null) {
return new StringBuilder("/").append(getPersistentIdentifier())
.append('/')
.append(viewManager.getCurrentThumbnailPage())
.append('/')
.toString();
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThumbPart
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
getThumbPart
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryToMoveRosterEntryToGroup(String userName, String groupName)
throws YaximXMPPException {
RosterGroup rosterGroup = getRosterGroup(groupName);
RosterEntry rosterEntry = mRoster.getEntry(userName);
removeRosterEntryFromGroups(rosterEntry);
if (groupName.length() == 0)
return;
else {
try {
rosterGroup.addEntry(rosterEntry);
} catch (XMPPException e) {
throw new YaximXMPPException("tryToMoveRosterEntryToGroup", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToMoveRosterEntryToGroup
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
tryToMoveRosterEntryToGroup
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEditCommentMandatory(XWikiContext context)
{
String bl = getXWikiPreference("editcomment_mandatory", "", context);
if ("1".equals(bl)) {
return true;
}
if ("0".equals(bl)) {
return false;
}
return "1".equals(getConfiguration().getProperty("xwiki.editcomment.mandatory", "0"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEditCommentMandatory
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
|
isEditCommentMandatory
|
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 List<PersistentClientSessionEntity> getClientSessionsByUserSession(String userSessionId, boolean offline) {
String offlineStr = offlineToString(offline);
TypedQuery<PersistentClientSessionEntity> query = em.createNamedQuery("findClientSessionsByUserSession", PersistentClientSessionEntity.class);
query.setParameter("userSessionId", userSessionId);
query.setParameter("offline", offlineStr);
return query.getResultList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientSessionsByUserSession
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
getClientSessionsByUserSession
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(EntryListenerConfig c1, EntryListenerConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.isLocal(), c2.isLocal())
&& nullSafeEqual(c1.isIncludeValue(), c2.isIncludeValue())
&& nullSafeEqual(c1.getClassName(), c2.getClassName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private int stopUserLocked(final int userId, final IStopUserCallback callback) {
if (DEBUG_MU) Slog.i(TAG_MU, "stopUserLocked userId=" + userId);
if (mCurrentUserId == userId && mTargetUserId == UserHandle.USER_NULL) {
return ActivityManager.USER_OP_IS_CURRENT;
}
final UserStartedState uss = mStartedUsers.get(userId);
if (uss == null) {
// User is not started, nothing to do... but we do need to
// callback if requested.
if (callback != null) {
mHandler.post(new Runnable() {
@Override
public void run() {
try {
callback.userStopped(userId);
} catch (RemoteException e) {
}
}
});
}
return ActivityManager.USER_OP_SUCCESS;
}
if (callback != null) {
uss.mStopCallbacks.add(callback);
}
if (uss.mState != UserStartedState.STATE_STOPPING
&& uss.mState != UserStartedState.STATE_SHUTDOWN) {
uss.mState = UserStartedState.STATE_STOPPING;
updateStartedUserArrayLocked();
long ident = Binder.clearCallingIdentity();
try {
// We are going to broadcast ACTION_USER_STOPPING and then
// once that is done send a final ACTION_SHUTDOWN and then
// stop the user.
final Intent stoppingIntent = new Intent(Intent.ACTION_USER_STOPPING);
stoppingIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
stoppingIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
stoppingIntent.putExtra(Intent.EXTRA_SHUTDOWN_USERSPACE_ONLY, true);
final Intent shutdownIntent = new Intent(Intent.ACTION_SHUTDOWN);
// This is the result receiver for the final shutdown broadcast.
final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() {
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
finishUserStop(uss);
}
};
// This is the result receiver for the initial stopping broadcast.
final IIntentReceiver stoppingReceiver = new IIntentReceiver.Stub() {
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
// On to the next.
synchronized (ActivityManagerService.this) {
if (uss.mState != UserStartedState.STATE_STOPPING) {
// Whoops, we are being started back up. Abort, abort!
return;
}
uss.mState = UserStartedState.STATE_SHUTDOWN;
}
mBatteryStatsService.noteEvent(
BatteryStats.HistoryItem.EVENT_USER_RUNNING_FINISH,
Integer.toString(userId), userId);
mSystemServiceManager.stopUser(userId);
broadcastIntentLocked(null, null, shutdownIntent,
null, shutdownReceiver, 0, null, null, null, AppOpsManager.OP_NONE,
true, false, MY_PID, Process.SYSTEM_UID, userId);
}
};
// Kick things off.
broadcastIntentLocked(null, null, stoppingIntent,
null, stoppingReceiver, 0, null, null,
INTERACT_ACROSS_USERS, AppOpsManager.OP_NONE,
true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
return ActivityManager.USER_OP_SUCCESS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopUserLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
stopUserLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition patch(final String path, final Route.ZeroArgHandler handler) {
return appendDefinition(PATCH, path, handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
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
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> Queue<T> newFixedMpscQueue(int capacity) {
return hasUnsafe() ? new MpscArrayQueue<T>(capacity) : new MpscAtomicArrayQueue<T>(capacity);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newFixedMpscQueue
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
newFixedMpscQueue
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopAppSwitches() {
enforceCallerIsRecentsOrHasPermission(STOP_APP_SWITCHES, "stopAppSwitches");
synchronized(this) {
mAppSwitchesAllowedTime = SystemClock.uptimeMillis()
+ APP_SWITCH_DELAY_TIME;
mDidAppSwitch = false;
mActivityStartController.schedulePendingActivityLaunches(APP_SWITCH_DELAY_TIME);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopAppSwitches
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
|
stopAppSwitches
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String buildUnionSubQuery(
String typeDiscriminatorColumn,
String[] unionColumns,
Set<String> columnsPresentInTable,
int computedColumnsOffset,
String typeDiscriminatorValue,
String selection,
String groupBy,
String having) {
int unionColumnsCount = unionColumns.length;
String[] projectionIn = new String[unionColumnsCount];
for (int i = 0; i < unionColumnsCount; i++) {
String unionColumn = unionColumns[i];
if (unionColumn.equals(typeDiscriminatorColumn)) {
projectionIn[i] = "'" + typeDiscriminatorValue + "' AS "
+ typeDiscriminatorColumn;
} else if (i <= computedColumnsOffset
|| columnsPresentInTable.contains(unionColumn)) {
projectionIn[i] = unionColumn;
} else {
projectionIn[i] = "NULL AS " + unionColumn;
}
}
return buildQuery(
projectionIn, selection, groupBy, having,
null /* sortOrder */,
null /* limit */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildUnionSubQuery
File: core/java/android/database/sqlite/SQLiteQueryBuilder.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
buildUnionSubQuery
|
core/java/android/database/sqlite/SQLiteQueryBuilder.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean getSettingMakeDefault(Bundle args) {
return (args != null) && args.getBoolean(Settings.CALL_METHOD_MAKE_DEFAULT_KEY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettingMakeDefault
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getSettingMakeDefault
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
final StringBuilder builder = new StringBuilder("ViewItem:[view=")
.append(view.getAutofillId());
final String datasetId = dataset == null ? null : dataset.getId();
if (datasetId != null) {
builder.append(", dataset=").append(datasetId);
}
if (value != null) {
// Cannot print value because it could contain PII
builder.append(", value=").append(value.length()).append("_chars");
}
if (filterable) {
builder.append(", filterable");
}
if (filter != null) {
// Filter should not have PII, but it could be a huge regexp
builder.append(", filter=").append(filter.pattern().length()).append("_chars");
}
return builder.append(']').toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
toString
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
private KeyguardInputViewController<KeyguardInputView> getCurrentSecurityController() {
return mSecurityViewFlipperController
.getSecurityView(mCurrentSecurityMode, mKeyguardSecurityCallback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentSecurityController
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
getCurrentSecurityController
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
public Policy getPolicy() {
return mPolicy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPolicy
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getPolicy
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Override
public List<String> loadBacklinks(String fullName, XWikiContext inputxcontext, boolean bTransaction)
throws XWikiException
{
List<String> backlinkNames = new ArrayList<>();
List<DocumentReference> backlinkReferences =
loadBacklinks(this.currentMixedDocumentReferenceResolver.resolve(fullName), bTransaction, inputxcontext);
for (DocumentReference backlinkReference : backlinkReferences) {
backlinkNames.add(this.localEntityReferenceSerializer.serialize(backlinkReference));
}
return backlinkNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadBacklinks
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
loadBacklinks
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private RequestProcessor getProcessorForModule(ModuleConfig config) {
String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
return (RequestProcessor) getServletContext().getAttribute(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessorForModule
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
getProcessorForModule
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getRequestedChannelMax() {
return this.requestedChannelMax;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedChannelMax
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getRequestedChannelMax
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProcessed(boolean processed) {
this.processed = processed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProcessed
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setProcessed
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@ConversationType
public int getConversationType() {
return mConversationType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConversationType
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getConversationType
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasMaskedFields() {
return maskedFields != null && !maskedFields.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasMaskedFields
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
|
hasMaskedFields
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNotificationListenerServicePermitted(
@NonNull String packageName, @UserIdInt int userId) {
if (mService != null) {
try {
return mService.isNotificationListenerServicePermitted(packageName, userId);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotificationListenerServicePermitted
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
|
isNotificationListenerServicePermitted
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
WindowList getTokenWindowsOnDisplay(WindowToken token, DisplayContent displayContent) {
final WindowList windowList = new WindowList();
final int count = token.windows.size();
for (int i = 0; i < count; i++) {
final WindowState win = token.windows.get(i);
if (win.getDisplayContent() == displayContent) {
windowList.add(win);
}
}
return windowList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTokenWindowsOnDisplay
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
getTokenWindowsOnDisplay
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBasePath() {
return basePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBasePath
File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getBasePath
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void closeClient(TestContext context) {
PostgresClient c = PostgresClient.getInstance(vertx);
context.assertNotNull(c.getClient(), "getClient()");
c.closeClient(context.asyncAssertSuccess());
context.assertNull(c.getClient(), "getClient()");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeClient
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
|
closeClient
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native void nativeThemeApplyStyle(long ptr, long themePtr, @StyleRes int resId,
boolean force);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeThemeApplyStyle
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeThemeApplyStyle
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean containsByte(K name, byte value) {
return contains(name, fromByte(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsByte
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
containsByte
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BeanDeserializer withByNameInclusion(Set<String> ignorableProps,
Set<String> includableProps) {
return new BeanDeserializer(this, ignorableProps, includableProps);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withByNameInclusion
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withByNameInclusion
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeToStream(byte[] param) {
try {
OutputStream os = getOutput();
os.write(param);
os.flush();
} catch(IOException err) {
errorMessage = err.toString();
err.printStackTrace();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeToStream
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
|
writeToStream
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll,
int allowMode, String name, String callerPackage) {
final int callingUserId = UserHandle.getUserId(callingUid);
if (callingUserId == userId) {
return userId;
}
// Note that we may be accessing mCurrentUserId outside of a lock...
// shouldn't be a big deal, if this is being called outside
// of a locked context there is intrinsically a race with
// the value the caller will receive and someone else changing it.
// We assume that USER_CURRENT_OR_SELF will use the current user; later
// we will switch to the calling user if access to the current user fails.
int targetUserId = unsafeConvertIncomingUser(userId);
if (callingUid != 0 && callingUid != Process.SYSTEM_UID) {
final boolean allow;
if (checkComponentPermission(INTERACT_ACROSS_USERS_FULL, callingPid,
callingUid, -1, true) == PackageManager.PERMISSION_GRANTED) {
// If the caller has this permission, they always pass go. And collect $200.
allow = true;
} else if (allowMode == ALLOW_FULL_ONLY) {
// We require full access, sucks to be you.
allow = false;
} else if (checkComponentPermission(INTERACT_ACROSS_USERS, callingPid,
callingUid, -1, true) != PackageManager.PERMISSION_GRANTED) {
// If the caller does not have either permission, they are always doomed.
allow = false;
} else if (allowMode == ALLOW_NON_FULL) {
// We are blanket allowing non-full access, you lucky caller!
allow = true;
} else if (allowMode == ALLOW_NON_FULL_IN_PROFILE) {
// We may or may not allow this depending on whether the two users are
// in the same profile.
synchronized (mUserProfileGroupIdsSelfLocked) {
int callingProfile = mUserProfileGroupIdsSelfLocked.get(callingUserId,
UserInfo.NO_PROFILE_GROUP_ID);
int targetProfile = mUserProfileGroupIdsSelfLocked.get(targetUserId,
UserInfo.NO_PROFILE_GROUP_ID);
allow = callingProfile != UserInfo.NO_PROFILE_GROUP_ID
&& callingProfile == targetProfile;
}
} else {
throw new IllegalArgumentException("Unknown mode: " + allowMode);
}
if (!allow) {
if (userId == UserHandle.USER_CURRENT_OR_SELF) {
// In this case, they would like to just execute as their
// owner user instead of failing.
targetUserId = callingUserId;
} else {
StringBuilder builder = new StringBuilder(128);
builder.append("Permission Denial: ");
builder.append(name);
if (callerPackage != null) {
builder.append(" from ");
builder.append(callerPackage);
}
builder.append(" asks to run as user ");
builder.append(userId);
builder.append(" but is calling from user ");
builder.append(UserHandle.getUserId(callingUid));
builder.append("; this requires ");
builder.append(INTERACT_ACROSS_USERS_FULL);
if (allowMode != ALLOW_FULL_ONLY) {
builder.append(" or ");
builder.append(INTERACT_ACROSS_USERS);
}
String msg = builder.toString();
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
}
}
if (!allowAll && targetUserId < 0) {
throw new IllegalArgumentException(
"Call does not support special user #" + targetUserId);
}
// Check shell permission
if (callingUid == Process.SHELL_UID && targetUserId >= UserHandle.USER_OWNER) {
if (mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES,
targetUserId)) {
throw new SecurityException("Shell does not have permission to access user "
+ targetUserId + "\n " + Debug.getCallers(3));
}
}
return targetUserId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleIncomingUser
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
handleIncomingUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void ignoreUnknownElements(final Pattern pattern) {
if (elementIgnoringMapper == null) {
throw new com.thoughtworks.xstream.InitializationException("No "
+ ElementIgnoringMapper.class.getName()
+ " available");
}
elementIgnoringMapper.addElementsToIgnore(pattern);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ignoreUnknownElements
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
ignoreUnknownElements
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private @Nullable ComponentName getOwnerComponent(int userId) {
synchronized (getLockObject()) {
if (mOwners.getDeviceOwnerUserId() == userId) {
return mOwners.getDeviceOwnerComponent();
}
if (mOwners.hasProfileOwner(userId)) {
return mOwners.getProfileOwnerComponent(userId);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOwnerComponent
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
|
getOwnerComponent
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkPRStreamLength(PRStream stream) throws IOException {
int fileLength = tokens.length();
int start = stream.getOffset();
boolean calc = false;
int streamLength = 0;
PdfObject obj = getPdfObjectRelease(stream.get(PdfName.LENGTH));
if (obj != null && obj.type() == PdfObject.NUMBER) {
streamLength = ((PdfNumber)obj).intValue();
if (streamLength + start > fileLength - 20)
calc = true;
else {
tokens.seek(start + streamLength);
String line = tokens.readString(20);
if (!line.startsWith("\nendstream") &&
!line.startsWith("\r\nendstream") &&
!line.startsWith("\rendstream") &&
!line.startsWith("endstream"))
calc = true;
}
}
else
calc = true;
if (calc) {
byte tline[] = new byte[16];
tokens.seek(start);
while (true) {
int pos = tokens.getFilePointer();
if (!tokens.readLineSegment(tline))
break;
if (equalsn(tline, endstream)) {
streamLength = pos - start;
break;
}
if (equalsn(tline, endobj)) {
tokens.seek(pos - 16);
String s = tokens.readString(16);
int index = s.indexOf("endstream");
if (index >= 0)
pos = pos - 16 + index;
streamLength = pos - start;
break;
}
}
}
stream.setLength(streamLength);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPRStreamLength
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
checkPRStreamLength
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public Jenkins getItemGroup() {
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemGroup
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getItemGroup
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttributeValue(Node node, String name) {
Node attr = getAttribute(node, name);
return (attr != null)? attr.getNodeValue():null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeValue
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getAttributeValue
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int getRunningDevServerPort(File npmFolder) {
int port = 0;
File portFile = getDevServerPortFile(npmFolder);
if (portFile.canRead()) {
try {
String portString = FileUtils
.readFileToString(portFile, StandardCharsets.UTF_8)
.trim();
if (!portString.isEmpty()) {
port = Integer.parseInt(portString);
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
return port;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningDevServerPort
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
getRunningDevServerPort
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final WebappResourceHelper other = (WebappResourceHelper) obj;
if ((this.BASE_RESOURCE_PATH == null) ? (other.BASE_RESOURCE_PATH != null) : !this.BASE_RESOURCE_PATH.equals(other.BASE_RESOURCE_PATH)) {
return false;
}
if ((this.BASE_CONTRACTS_PATH == null) ? (other.BASE_CONTRACTS_PATH != null) : !this.BASE_CONTRACTS_PATH.equals(other.BASE_CONTRACTS_PATH)) {
return false;
}
if (this.cacheTimestamp != other.cacheTimestamp) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-6950
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
equals
|
impl/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java
|
cefbb9447e7be560e59da2da6bd7cb93776f7741
| 0
|
Analyze the following code function for security vulnerabilities
|
private void _readComment () throws JsonParseException
{
final IJsonParsePosition aStartPos = _getCurrentParsePos ();
// Use SB2 because _skipSpaces uses SB1
final JsonStringBuilder aStrComment = m_aSB2.reset ();
while (true)
{
final int c1 = _readChar ();
if (c1 == '*')
{
// End of comment?
final int c2 = _readChar ();
if (c2 == '/')
{
// End of comment!
m_aCallback.onComment (aStrComment.getAsString ());
return;
}
if (c2 == EOI)
throw _parseEx (aStartPos, "Unclosed JSON comment at end of input");
// Backup the "/" try
_backupChar (c2);
}
if (c1 == EOI)
throw _parseEx (aStartPos, "Unclosed JSON comment at end of input");
aStrComment.append ((char) c1);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _readComment
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
_readComment
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
public KieServerSetup connectToSingleController(KieServerInfo serverInfo, KieServerConfig config, String controllerUrl) {
String connectAndSyncUrl = controllerUrl + "/server/" + KieServerEnvironment.getServerId();
String userName = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_USER, "kieserver");
String password = loadPassword(config);
String token = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_TOKEN);
try {
KieServerSetup kieServerSetup = makeHttpPutRequestAndCreateCustomResponse(connectAndSyncUrl, serialize(serverInfo), KieServerSetup.class, userName, password, token);
if (kieServerSetup != null) {
// once there is non null list let's return it
return kieServerSetup;
}
} catch (Exception e) {
// let's check all other controllers in case of running in cluster of controllers
logger.warn("Exception encountered while syncing with controller at {} error {}", connectAndSyncUrl, e.getCause() == null ? e.getMessage() : e.getCause().getMessage());
logger.debug("Exception encountered while syncing with controller at {} error {}", connectAndSyncUrl, e.getMessage(), e);
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-260
- CVE: CVE-2016-7043
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [RHBMS-4312] Loading pasword from a keystore
Function: connectToSingleController
File: kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java
Repository: kiegroup/droolsjbpm-integration
Fixed Code:
public KieServerSetup connectToSingleController(KieServerInfo serverInfo, KieServerConfig config, String controllerUrl) {
String connectAndSyncUrl = controllerUrl + "/server/" + KieServerEnvironment.getServerId();
String userName = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_USER, "kieserver");
String password = loadControllerPassword(config);
String token = config.getConfigItemValue(KieServerConstants.CFG_KIE_CONTROLLER_TOKEN);
try {
KieServerSetup kieServerSetup = makeHttpPutRequestAndCreateCustomResponse(connectAndSyncUrl, serialize(serverInfo), KieServerSetup.class, userName, password, token);
if (kieServerSetup != null) {
// once there is non null list let's return it
return kieServerSetup;
}
} catch (Exception e) {
// let's check all other controllers in case of running in cluster of controllers
logger.warn("Exception encountered while syncing with controller at {} error {}", connectAndSyncUrl, e.getCause() == null ? e.getMessage() : e.getCause().getMessage());
logger.debug("Exception encountered while syncing with controller at {} error {}", connectAndSyncUrl, e.getMessage(), e);
}
return null;
}
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
connectToSingleController
|
kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean supportsSplitScreenWindowingModeInDisplayArea(@Nullable TaskDisplayArea tda) {
return super.supportsSplitScreenWindowingMode()
&& mAtmService.mSupportsSplitScreenMultiWindow
&& supportsMultiWindowInDisplayArea(tda);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supportsSplitScreenWindowingModeInDisplayArea
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
|
supportsSplitScreenWindowingModeInDisplayArea
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getByIdGetConnectionFails(TestContext context) {
postgresClientGetConnectionFails().get(FOO, StringPojo.class, "sql", true, false, context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByIdGetConnectionFails
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
|
getByIdGetConnectionFails
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
void verifyAndPurgeInvalidPhoneAccounts(Context context) {
TelecomManager telecomManager = TelecomManager.from(context);
SipProfileDb profileDb = new SipProfileDb(context);
List<PhoneAccountHandle> accountHandles = telecomManager.getPhoneAccountsSupportingScheme(
PhoneAccount.SCHEME_SIP);
for (PhoneAccountHandle accountHandle : accountHandles) {
String profileName = SipUtil.getSipProfileNameFromPhoneAccount(accountHandle);
SipProfile profile = profileDb.retrieveSipProfileFromName(profileName);
if (profile == null) {
log("verifyAndPurgeInvalidPhoneAccounts, deleting account: " + accountHandle);
telecomManager.unregisterPhoneAccount(accountHandle);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyAndPurgeInvalidPhoneAccounts
File: sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
verifyAndPurgeInvalidPhoneAccounts
|
sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
|
a294ae5342410431a568126183efe86261668b5d
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCompatSignatureUpdateNeeded(PackageParser.Package scannedPkg) {
final VersionInfo ver = getSettingsVersionForPackage(scannedPkg);
return ver.databaseVersion < DatabaseVersion.SIGNATURE_END_ENTITY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatSignatureUpdateNeeded
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
|
isCompatSignatureUpdateNeeded
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onRestored(int restoreBlockReason) {
// Shortcuts have been restored.
// - Unshadow all shortcuts.
// - Set disabled reason.
// - Disable if needed.
final String query = String.format("%s:-%s AND %s:%s",
AppSearchShortcutInfo.KEY_FLAGS, ShortcutInfo.FLAG_SHADOW,
AppSearchShortcutInfo.KEY_DISABLED_REASON, restoreBlockReason);
forEachShortcutMutate(si -> {
if (restoreBlockReason == ShortcutInfo.DISABLED_REASON_NOT_DISABLED
&& !si.hasFlags(ShortcutInfo.FLAG_SHADOW)
&& si.getDisabledReason() == restoreBlockReason) {
return;
}
si.clearFlags(ShortcutInfo.FLAG_SHADOW);
si.setDisabledReason(restoreBlockReason);
if (restoreBlockReason != ShortcutInfo.DISABLED_REASON_NOT_DISABLED) {
si.addFlags(ShortcutInfo.FLAG_DISABLED);
}
});
// Because some launchers may not have been restored (e.g. allowBackup=false),
// we need to re-calculate the pinned shortcuts.
refreshPinnedFlags();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRestored
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
onRestored
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isNetworkLoggingEnabled(@Nullable ComponentName admin,
@NonNull String packageName) {
if (!mHasFeature) {
return false;
}
final CallerIdentity caller = getCallerIdentity(admin, packageName);
Preconditions.checkCallAuthorization((caller.hasAdminComponent()
&& (isDefaultDeviceOwner(caller)
|| (isProfileOwner(caller) && isManagedProfile(caller.getUserId()))))
|| (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_NETWORK_LOGGING))
|| hasCallingOrSelfPermission(permission.MANAGE_USERS));
synchronized (getLockObject()) {
return isNetworkLoggingEnabledInternalLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNetworkLoggingEnabled
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
|
isNetworkLoggingEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getUnknownSourcesSettings() {
return android.provider.Settings.Secure.getIntForUser(mContext.getContentResolver(),
android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS,
-1, UserHandle.USER_SYSTEM);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUnknownSourcesSettings
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
getUnknownSourcesSettings
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
doc.setXmlStandalone(xmlStandalone);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setXmlStandalone
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
setXmlStandalone
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int checkOp(@NonNull Context context, @NonNull int op,
@NonNull PermissionManagerServiceInternal permissionManagerServiceInt,
@NonNull AttributionSource attributionSource, @Nullable String message,
boolean forDataDelivery, boolean startDataDelivery) {
if (op < 0 || attributionSource.getPackageName() == null) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
final int attributionChainId =
getAttributionChainId(startDataDelivery, attributionSource);
final boolean hasChain = attributionChainId != ATTRIBUTION_CHAIN_ID_NONE;
AttributionSource current = attributionSource;
AttributionSource next = null;
// We consider the chain trusted if the start node has UPDATE_APP_OPS_STATS, and
// every attributionSource in the chain is registered with the system.
final boolean isChainStartTrusted = !hasChain || checkPermission(context,
permissionManagerServiceInt, UPDATE_APP_OPS_STATS, current.getUid(),
current.getRenouncedPermissions());
while (true) {
final boolean skipCurrentChecks = (next != null);
next = current.getNext();
// If the call is from a datasource we need to vet only the chain before it. This
// way we can avoid the datasource creating an attribution context for every call.
if (next != null && !current.isTrusted(context)) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
// The access is for oneself if this is the single attribution source in the chain.
final boolean selfAccess = (next == null);
final boolean isLinkTrusted = isChainStartTrusted
&& (current.isTrusted(context) || current.equals(attributionSource))
&& (next == null || next.isTrusted(context));
final int proxyAttributionFlags = (!skipCurrentChecks && hasChain)
? resolveProxyAttributionFlags(attributionSource, current,
/*fromDatasource*/ false, startDataDelivery, selfAccess,
isLinkTrusted) : ATTRIBUTION_FLAGS_NONE;
final int proxiedAttributionFlags = hasChain ? resolveProxiedAttributionFlags(
attributionSource, next, /*fromDatasource*/ false, startDataDelivery,
selfAccess, isLinkTrusted) : ATTRIBUTION_FLAGS_NONE;
final int opMode = performOpTransaction(context, current.getToken(), op, current,
message, forDataDelivery, startDataDelivery, skipCurrentChecks, selfAccess,
/*fromDatasource*/ false, AppOpsManager.OP_NONE, proxyAttributionFlags,
proxiedAttributionFlags, attributionChainId);
switch (opMode) {
case AppOpsManager.MODE_ERRORED: {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
case AppOpsManager.MODE_IGNORED: {
return PermissionChecker.PERMISSION_SOFT_DENIED;
}
}
if (next == null || next.getNext() == null) {
return PermissionChecker.PERMISSION_GRANTED;
}
current = next;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkOp
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
|
checkOp
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<ShortcutInfo> getShortcuts(int launcherUserId,
@NonNull String callingPackage, long changedSince,
@Nullable String packageName, @Nullable List<String> shortcutIds,
@Nullable List<LocusId> locusIds, @Nullable ComponentName componentName,
int queryFlags, int userId, int callingPid, int callingUid) {
if (DEBUG_REBOOT) {
Slog.d(TAG, "Getting shortcuts for launcher= " + callingPackage
+ "user=" + userId + " pkg=" + packageName);
}
final ArrayList<ShortcutInfo> ret = new ArrayList<>();
int flags = ShortcutInfo.CLONE_REMOVE_FOR_LAUNCHER;
if ((queryFlags & ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY) != 0) {
flags = ShortcutInfo.CLONE_REMOVE_NON_KEY_INFO;
} else if ((queryFlags & ShortcutQuery.FLAG_GET_PERSONS_DATA) != 0) {
flags &= ~ShortcutInfo.CLONE_REMOVE_PERSON;
}
final int cloneFlag = flags;
if (packageName == null) {
shortcutIds = null; // LauncherAppsService already threw for it though.
}
synchronized (mLock) {
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
.attemptToRestoreIfNeededAndSave();
if (packageName != null) {
getShortcutsInnerLocked(launcherUserId,
callingPackage, packageName, shortcutIds, locusIds, changedSince,
componentName, queryFlags, userId, ret, cloneFlag,
callingPid, callingUid);
} else {
final List<String> shortcutIdsF = shortcutIds;
final List<LocusId> locusIdsF = locusIds;
getUserShortcutsLocked(userId).forAllPackages(p -> {
getShortcutsInnerLocked(launcherUserId,
callingPackage, p.getPackageName(), shortcutIdsF, locusIdsF,
changedSince, componentName, queryFlags, userId, ret, cloneFlag,
callingPid, callingUid);
});
}
}
return setReturnedByServer(ret);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcuts
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getShortcuts
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("/top100")
public String top100() {
return render("top100");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: top100
File: src/main/java/co/yiiu/pybbs/controller/front/IndexController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
top100
|
src/main/java/co/yiiu/pybbs/controller/front/IndexController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) {
for (int argIndex = 0; argIndex < args.length; ++argIndex) {
if (args[argIndex].equalsIgnoreCase("-info")) {
argsBox.info = args[argIndex + 1];
argIndex += 2;
} else if (args[argIndex].equalsIgnoreCase("-patterns")) {
argsBox.patternDirStr = args[argIndex + 1];
argIndex += 2;
} else if (args[argIndex].equalsIgnoreCase("-type")) {
argsBox.type = RUNTYPE.valueOf(args[argIndex + 1]);
argIndex += 2;
}
}
if (argsBox.patternDirStr == null) {
throw new IllegalArgumentException("Need to give a pattern location with -patterns");
}
argsBox.init();
System.out.println(argsBox);
try {
if (argsBox.type == RUNTYPE.interactive) {
Ssurgeon.inst().testRead(argsBox.patternDir);
}
} catch (Exception e) {
log.error(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: main
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
main
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public byte @Nullable [] getBytes(String columnName) throws SQLException {
return getBytes(findColumn(columnName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBytes
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
|
getBytes
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public int clone(ConsoleOutputStreamConsumer outputStreamConsumer, String url, Integer depth) {
CommandLine gitClone = cloneCommand().
when(!hasRefSpec(), git -> git.withArgs("--branch", branch)).
when(depth < Integer.MAX_VALUE, git -> git.withArg(format("--depth=%s", depth))).
withArg(new UrlArgument(url)).withArg(workingDir.getAbsolutePath());
if (!hasRefSpec()) {
return run(gitClone, outputStreamConsumer);
}
return runCascade(outputStreamConsumer,
gitClone,
git_C().withArgs("config", "--replace-all", "remote.origin.fetch", "+" + expandRefSpec()),
git_C().withArgs("fetch", "--prune", "--recurse-submodules=no"),
git_C().withArgs("checkout", "-B", localBranch(), remoteBranch())
);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clone
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
clone
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int findNonWhitespace(AppendableCharSequence sb, int offset, boolean validateOWS) {
for (int result = offset; result < sb.length(); ++result) {
char c = sb.charAtUnsafe(result);
if (!Character.isWhitespace(c)) {
return result;
} else if (validateOWS && !isOWS(c)) {
// Only OWS is supported for whitespace
throw new IllegalArgumentException("Invalid separator, only a single space or horizontal tab allowed," +
" but received a '" + c + "' (0x" + Integer.toHexString(c) + ")");
}
}
return sb.length();
}
|
Vulnerability Classification:
- CWE: CWE-444
- CVE: CVE-2021-43797
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Merge pull request from GHSA-wx5j-54mm-rqqq
Motivation:
We should validate that only OWS is allowed before / after a header name and otherwise throw. At the moment we just "strip" everything except OWS.
Modifications:
- Adjust code to correctly validate
- Add unit tests
Result:
More strict and correct behaviour
Function: findNonWhitespace
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
Fixed Code:
private static int findNonWhitespace(AppendableCharSequence sb, int offset) {
for (int result = offset; result < sb.length(); ++result) {
char c = sb.charAtUnsafe(result);
if (!Character.isWhitespace(c)) {
return result;
} else if (!isOWS(c)) {
// Only OWS is supported for whitespace
throw new IllegalArgumentException("Invalid separator, only a single space or horizontal tab allowed," +
" but received a '" + c + "' (0x" + Integer.toHexString(c) + ")");
}
}
return sb.length();
}
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
findNonWhitespace
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean pinchByDelta(float delta) {
if (mNativeContentViewCore == 0) return false;
long timeMs = SystemClock.uptimeMillis();
int xPix = getViewportWidthPix() / 2;
int yPix = getViewportHeightPix() / 2;
nativePinchBegin(mNativeContentViewCore, timeMs, xPix, yPix);
nativePinchBy(mNativeContentViewCore, timeMs, xPix, yPix, delta);
nativePinchEnd(mNativeContentViewCore, timeMs);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pinchByDelta
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
|
pinchByDelta
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setTicker(CharSequence tickerText) {
mN.tickerText = safeCharSequence(tickerText);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTicker
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setTicker
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteViews makeLowPriorityContentView(boolean useRegularSubtext) {
StandardTemplateParams p = mParams.reset()
.viewType(StandardTemplateParams.VIEW_TYPE_MINIMIZED)
.highlightExpander(false)
.fillTextsFrom(this);
if (!useRegularSubtext || TextUtils.isEmpty(p.summaryText)) {
p.summaryText(createSummaryText());
}
RemoteViews header = makeNotificationHeader(p);
header.setBoolean(R.id.notification_header, "setAcceptAllTouches", true);
// The low priority header has no app name and shows the text
header.setBoolean(R.id.notification_header, "styleTextAsTitle", true);
return header;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeLowPriorityContentView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
makeLowPriorityContentView
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMode(int mode) {
switch (mode) {
case NO_REFERENCES:
setMarshallingStrategy(new TreeMarshallingStrategy());
break;
case ID_REFERENCES:
setMarshallingStrategy(new ReferenceByIdMarshallingStrategy());
break;
case XPATH_RELATIVE_REFERENCES:
setMarshallingStrategy(new ReferenceByXPathMarshallingStrategy(
ReferenceByXPathMarshallingStrategy.RELATIVE));
break;
case XPATH_ABSOLUTE_REFERENCES:
setMarshallingStrategy(new ReferenceByXPathMarshallingStrategy(
ReferenceByXPathMarshallingStrategy.ABSOLUTE));
break;
case SINGLE_NODE_XPATH_RELATIVE_REFERENCES:
setMarshallingStrategy(new ReferenceByXPathMarshallingStrategy(ReferenceByXPathMarshallingStrategy.RELATIVE
| ReferenceByXPathMarshallingStrategy.SINGLE_NODE));
break;
case SINGLE_NODE_XPATH_ABSOLUTE_REFERENCES:
setMarshallingStrategy(new ReferenceByXPathMarshallingStrategy(ReferenceByXPathMarshallingStrategy.ABSOLUTE
| ReferenceByXPathMarshallingStrategy.SINGLE_NODE));
break;
default:
throw new IllegalArgumentException("Unknown mode : " + mode);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMode
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
setMode
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List getListValue(String className, String fieldName)
{
return getListValue(resolveClassReference(className), fieldName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getListValue
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
|
getListValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M2")
public String getStringValue(String className, String fieldName)
{
return getStringValue(resolveClassReference(className), fieldName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringValue
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getStringValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String findLogoutUrl() {
init();
if(logoutUrl == null && getProviderMetadata().getEndSessionEndpointURI() != null) {
return getProviderMetadata().getEndSessionEndpointURI().toString();
}
return logoutUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLogoutUrl
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
findLogoutUrl
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String issueJwt(String id, String subject, String issuer, Long period, List<String> roles) {
Map<String, Object> customClaimMap = Collections.singletonMap(SurenessConstant.ROLES, roles);
return issueJwtAll(id, subject, issuer, period, null, null,
null, null, customClaimMap);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: issueJwt
File: core/src/main/java/com/usthe/sureness/util/JsonWebTokenUtil.java
Repository: dromara/sureness
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2023-31581
|
CRITICAL
| 9.8
|
dromara/sureness
|
issueJwt
|
core/src/main/java/com/usthe/sureness/util/JsonWebTokenUtil.java
|
4f5fefaf673168d74820020a191fab2904629742
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("deprecation")
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
protected void setListItemBackgroundOnView(View view) {
int sdk = android.os.Build.VERSION.SDK_INT;
if (sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) {
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.greybackground));
} else {
view.setBackground(getResources().getDrawable(R.drawable.greybackground));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setListItemBackgroundOnView
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
setListItemBackgroundOnView
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
checkTrusted(chain, authType, null, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkClientTrusted
File: src/platform/java/org/conscrypt/TrustManagerImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
checkClientTrusted
|
src/platform/java/org/conscrypt/TrustManagerImpl.java
|
c4ab1b959280413fb11bf4fd7f6b4c2ba38bd779
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRealm(String realm) {
this.realm = realm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRealm
File: base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRealm
|
base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@OnClose
public void onClose(Session session, CloseReason reason) {
if (!session.getId().equals(this.session.getId())) {
logger.info("Session closed does not match this session... ignoring");
return;
}
logger.info("Session {} is closed due to {}", session.getId(), reason);
if (!closed.get()) {
reconnectThread = new Thread(() -> {
while (!session.isOpen()) {
try {
logger.debug("Waiting 10 seconds before attempting to reconnect to controller {}", controllerUrl);
Thread.sleep(10000);
init(controllerUrl, config);
onReconnect.accept(this);
break;
} catch (InterruptedException e) {
break;
} catch (RuntimeException e) {
logger.warn("Unable to reconnect to controller over Web Socket {} due to {}", controllerUrl, e.getMessage());
}
}
}, "Kie Server - Web Socket reconnect");
reconnectThread.start();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onClose
File: kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
Repository: kiegroup/droolsjbpm-integration
The code follows secure coding practices.
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
onClose
|
kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Mapper getMapper() {
return mapper;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMapper
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
getMapper
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean inputDispatchingTimedOut(Object proc, String activityShortComponentName,
ApplicationInfo aInfo, String parentShortComponentName, Object parentProc,
boolean aboveSystem, String reason) {
return ActivityManagerService.this.inputDispatchingTimedOut((ProcessRecord) proc,
activityShortComponentName, aInfo, parentShortComponentName,
(WindowProcessController) parentProc, aboveSystem, reason);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inputDispatchingTimedOut
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
|
inputDispatchingTimedOut
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUrlChildPrefix() {
return "job";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrlChildPrefix
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getUrlChildPrefix
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ResultSet execute(String sql, Object... objects) {
Connection conn = getConnection();
Statement s = null;
try {
s = conn.createStatement();
if (s.execute(sql)) {
return s.getResultSet();
} else {
return null;
}
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
if (s != null) {
s.close();
}
conn.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2015-10048
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Método de execute alterado para SQLINJECTION , faltando apenas o método de StoredProcedure
Function: execute
File: injectIt/src/main/java/com/dextra/injectit/database/Database.java
Repository: bmattoso/desafio_buzz_woody
Fixed Code:
public static ResultSet execute(String sql, Object... objects) {
Connection conn = getConnection();
PreparedStatement ps = null;
try {
System.out.println(sql);
ps = conn.prepareStatement(sql);
// Set the parameters
if (objects != null)
for (int parameterIndex = 0; parameterIndex < objects.length; ++parameterIndex){
ps.setObject(parameterIndex + 1, objects[parameterIndex]);
}
if (ps.execute())
return ps.getResultSet();
else
return null;
} catch (SQLException e) {
e.printStackTrace();
throw new RuntimeException(e);
} finally {
try {
if (ps != null) {
ps.close();
}
conn.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
|
[
"CWE-89"
] |
CVE-2015-10048
|
MEDIUM
| 5.2
|
bmattoso/desafio_buzz_woody
|
execute
|
injectIt/src/main/java/com/dextra/injectit/database/Database.java
|
cb8220cbae06082c969b1776fcb2fdafb3a1006b
| 1
|
Analyze the following code function for security vulnerabilities
|
public static void unzipFilesToPath(String jarPath, String destinationDir) throws IOException {
File file = new File(jarPath);
try (JarFile jar = new JarFile(file)) {
// fist get all directories,
// then make those directory on the destination Path
/*for (Enumeration<JarEntry> enums = jar.entries(); enums.hasMoreElements(); ) {
JarEntry entry = (JarEntry) enums.nextElement();
String fileName = destinationDir + File.separator + entry.getName();
File f = new File(fileName);
if (fileName.endsWith("/")) {
f.mkdirs();
}
}*/
//now create all files
for (Enumeration<JarEntry> enums = jar.entries(); enums.hasMoreElements(); ) {
JarEntry entry = enums.nextElement();
String fileName = destinationDir + File.separator + entry.getName();
File f = new File(fileName);
if (!f.getCanonicalPath().startsWith(destinationDir)) {
System.out.println("Zip Slip exploit detected. Skipping entry " + entry.getName());
continue;
}
File parent = f.getParentFile();
if (!parent.exists()) {
parent.mkdirs();
}
if (!fileName.endsWith("/")) {
try (InputStream is = jar.getInputStream(entry);
FileOutputStream fos = new FileOutputStream(f)) {
// write contents of 'is' to 'fos'
while (is.available() > 0) {
fos.write(is.read());
}
}
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-21675
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Improve Zip Slip detection
Function: unzipFilesToPath
File: src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
Repository: Konloch/bytecode-viewer
Fixed Code:
public static void unzipFilesToPath(String jarPath, String destinationDir) throws IOException {
String canonicalDestDir = new File(destinationDir).getCanonicalPath();
if (!canonicalDestDir.endsWith(File.separator)) {
canonicalDestDir += File.separator;
}
File file = new File(jarPath);
try (JarFile jar = new JarFile(file)) {
// fist get all directories,
// then make those directory on the destination Path
/*for (Enumeration<JarEntry> enums = jar.entries(); enums.hasMoreElements(); ) {
JarEntry entry = (JarEntry) enums.nextElement();
String fileName = destinationDir + File.separator + entry.getName();
File f = new File(fileName);
if (fileName.endsWith("/")) {
f.mkdirs();
}
}*/
//now create all files
for (Enumeration<JarEntry> enums = jar.entries(); enums.hasMoreElements(); ) {
JarEntry entry = enums.nextElement();
String fileName = destinationDir + File.separator + entry.getName();
File f = new File(fileName);
if (!f.getCanonicalPath().startsWith(canonicalDestDir)) {
System.out.println("Zip Slip exploit detected. Skipping entry " + entry.getName());
continue;
}
File parent = f.getParentFile();
if (!parent.exists()) {
parent.mkdirs();
}
if (!fileName.endsWith("/")) {
try (InputStream is = jar.getInputStream(entry);
FileOutputStream fos = new FileOutputStream(f)) {
// write contents of 'is' to 'fos'
while (is.available() > 0) {
fos.write(is.read());
}
}
}
}
}
}
|
[
"CWE-22"
] |
CVE-2022-21675
|
MEDIUM
| 6.8
|
Konloch/bytecode-viewer
|
unzipFilesToPath
|
src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
|
1ec02658fe6858162f5e6a24f97928de6696c5cb
| 1
|
Analyze the following code function for security vulnerabilities
|
void updateCameraCompatState(boolean showControl, boolean transformationApplied,
ICompatCameraControlCallback callback) {
if (!isCameraCompatControlEnabled()) {
// Feature is disabled by config_isCameraCompatControlForStretchedIssuesEnabled.
return;
}
if (mCameraCompatControlClickedByUser && (showControl
|| mCameraCompatControlState == TaskInfo.CAMERA_COMPAT_CONTROL_DISMISSED)) {
// The user already applied treatment on this activity or dismissed control.
// Respecting their choice.
return;
}
mCompatCameraControlCallback = callback;
int newCameraCompatControlState = !showControl
? TaskInfo.CAMERA_COMPAT_CONTROL_HIDDEN
: transformationApplied
? TaskInfo.CAMERA_COMPAT_CONTROL_TREATMENT_APPLIED
: TaskInfo.CAMERA_COMPAT_CONTROL_TREATMENT_SUGGESTED;
boolean changed = setCameraCompatControlState(newCameraCompatControlState);
if (!changed) {
return;
}
mTaskSupervisor.getActivityMetricsLogger().logCameraCompatControlAppearedEventReported(
newCameraCompatControlState, info.applicationInfo.uid);
if (newCameraCompatControlState == TaskInfo.CAMERA_COMPAT_CONTROL_HIDDEN) {
mCameraCompatControlClickedByUser = false;
mCompatCameraControlCallback = null;
}
// Trigger TaskInfoChanged to update the camera compat UI.
getTask().dispatchTaskInfoChangedIfNeeded(true /* force */);
// TaskOrganizerController#onTaskInfoChanged adds pending task events to the queue waiting
// for the surface placement to be ready. So need to trigger surface placement to dispatch
// events to avoid stale state for the camera compat control.
getDisplayContent().setLayoutNeeded();
mWmService.mWindowPlacerLocked.performSurfacePlacement();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCameraCompatState
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
|
updateCameraCompatState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendUnlockKeyStoreIntent() {
Credentials.getInstance().unlock(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendUnlockKeyStoreIntent
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
sendUnlockKeyStoreIntent
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFetchSizeDefaultMaximum(Integer theFetchSizeDefaultMaximum) {
myFetchSizeDefaultMaximum = theFetchSizeDefaultMaximum;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFetchSizeDefaultMaximum
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setFetchSizeDefaultMaximum
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void clearBody() throws JMSException {
setReadOnlyBody(false);
clearBodyInternal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearBody
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
|
clearBody
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void animateCollapsePanels() {
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: animateCollapsePanels
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
animateCollapsePanels
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean mutateGlobalSetting(String name, String value, String tag,
boolean makeDefault, int requestingUserId, int operation, boolean forceNotify,
int mode, boolean overrideableByRestore) {
// Make sure the caller can change the settings - treated as secure.
enforceWritePermission(Manifest.permission.WRITE_SECURE_SETTINGS);
// Resolve the userId on whose behalf the call is made.
final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId);
// If this is a setting that is currently restricted for this user, do not allow
// unrestricting changes.
if (isSettingRestrictedForUser(name, callingUserId, value, Binder.getCallingUid())) {
return false;
}
final String callingPackage = getCallingPackage();
// Perform the mutation.
synchronized (mLock) {
switch (operation) {
case MUTATION_OPERATION_INSERT: {
return mSettingsRegistry.insertSettingLocked(SETTINGS_TYPE_GLOBAL,
UserHandle.USER_SYSTEM, name, value, tag, makeDefault,
callingPackage, forceNotify,
CRITICAL_GLOBAL_SETTINGS, overrideableByRestore);
}
case MUTATION_OPERATION_DELETE: {
return mSettingsRegistry.deleteSettingLocked(SETTINGS_TYPE_GLOBAL,
UserHandle.USER_SYSTEM, name, forceNotify, CRITICAL_GLOBAL_SETTINGS);
}
case MUTATION_OPERATION_UPDATE: {
return mSettingsRegistry.updateSettingLocked(SETTINGS_TYPE_GLOBAL,
UserHandle.USER_SYSTEM, name, value, tag, makeDefault,
callingPackage, forceNotify, CRITICAL_GLOBAL_SETTINGS);
}
case MUTATION_OPERATION_RESET: {
mSettingsRegistry.resetSettingsLocked(SETTINGS_TYPE_GLOBAL,
UserHandle.USER_SYSTEM, callingPackage, mode, tag);
} return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mutateGlobalSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
mutateGlobalSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeDeadThreads() {
whitelistedThreads.removeIf(thread -> !thread.isAlive());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDeadThreads
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
removeDeadThreads
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public WearableExtender setHintScreenTimeout(int timeout) {
mHintScreenTimeout = timeout;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHintScreenTimeout
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setHintScreenTimeout
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteInput(ProfileInput input) {
ProfileInput curInput = getInput(input.getName());
if (curInput != null) {
inputs.remove(curInput);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteInput
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
deleteInput
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isBlank() {
// Need to check for null since isBlank() can be called from onPause()
// before findViews() is called
if (mSubject == null || mBodyView == null || mTo == null || mCc == null ||
mAttachmentsView == null) {
LogUtils.w(LOG_TAG, "null views in isBlank check");
return true;
}
return mSubject.getText().length() == 0
&& (mBodyView.getText().length() == 0 || getSignatureStartPosition(mSignature,
mBodyView.getText().toString()) == 0)
&& mTo.length() == 0
&& mCc.length() == 0 && mBcc.length() == 0
&& mAttachmentsView.getAttachments().size() == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBlank
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
|
isBlank
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract boolean defaulted(String name) throws IOException,
IllegalArgumentException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaulted
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
defaulted
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) {
if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) {
event.getText().add(getKeyguardOrLockScreenString());
mLastAnnouncementWasQuickSettings = false;
return true;
}
return super.dispatchPopulateAccessibilityEventInternal(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchPopulateAccessibilityEventInternal
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
dispatchPopulateAccessibilityEventInternal
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean doRowHighlight(int row, TableRows tableRows) {
if (tableRows == null) {
return false;
}
switch (tableRows) {
case EVEN:
return row % 2 == 0;
case ODD:
return row % 2 == 1;
case ALL:
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doRowHighlight
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
|
doRowHighlight
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized ServerSocket get(int port) throws IOException {
if (socks.containsKey(port)) {
ServerSocket sock = socks.get(port);
if (sock.isClosed()) {
sock = new ServerSocket(port);
socks.put(port, sock);
}
return sock;
} else {
ServerSocket sock = new ServerSocket(port);
socks.put(port, sock);
return sock;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
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
|
get
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean onHoverEvent(MotionEvent event) {
TraceEvent.begin("onHoverEvent");
MotionEvent offset = createOffsetMotionEvent(event);
try {
if (mBrowserAccessibilityManager != null) {
return mBrowserAccessibilityManager.onHoverEvent(offset);
}
// Work around Android bug where the x, y coordinates of a hover exit
// event are incorrect when touch exploration is on.
if (mTouchExplorationEnabled && offset.getAction() == MotionEvent.ACTION_HOVER_EXIT) {
return true;
}
// TODO(lanwei): Remove this switch once experimentation is complete -
// crbug.com/418188
if (event.getToolType(0) == MotionEvent.TOOL_TYPE_FINGER) {
if (mEnableTouchHover == null) {
mEnableTouchHover =
CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TOUCH_HOVER);
}
if (!mEnableTouchHover.booleanValue()) return false;
}
mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
if (mNativeContentViewCore != 0) {
nativeSendMouseMoveEvent(mNativeContentViewCore, offset.getEventTime(),
offset.getX(), offset.getY());
}
return true;
} finally {
offset.recycle();
TraceEvent.end("onHoverEvent");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHoverEvent
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
onHoverEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void fastForward(String packageName) {
mSessionCb.fastForward(packageName, Binder.getCallingPid(), Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fastForward
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
fastForward
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONArray put(Object value) {
this.myArrayList.add(value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
put
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void validateConfigObject(Object configObject) {
try {
clusterConfigValidatorService.validate(configObject);
} catch (ConfigValidationException e) {
throw new BadRequestException(e.getMessage(), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateConfigObject
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
validateConfigObject
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String translateModePosixToString(int mode) {
String res = "";
if ((mode & O_ACCMODE) == O_RDWR) {
res = "rw";
} else if ((mode & O_ACCMODE) == O_WRONLY) {
res = "w";
} else if ((mode & O_ACCMODE) == O_RDONLY) {
res = "r";
} else {
throw new IllegalArgumentException("Bad mode: " + mode);
}
if ((mode & O_TRUNC) == O_TRUNC) {
res += "t";
}
if ((mode & O_APPEND) == O_APPEND) {
res += "a";
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: translateModePosixToString
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
translateModePosixToString
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
private byte toByte(K name, V value) {
try {
return valueConverter.convertToByte(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert header value to byte for header '" + name + '\'');
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toByte
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
toByte
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private @UserIdInt int getNetworkLoggingAffectedUser() {
synchronized (getLockObject()) {
if (mOwners.hasDeviceOwner()) {
return mOwners.getDeviceOwnerUserId();
} else {
return mInjector.binderWithCleanCallingIdentity(
() -> getManagedUserId(UserHandle.USER_SYSTEM));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNetworkLoggingAffectedUser
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
|
getNetworkLoggingAffectedUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getRequestedOrientation(IBinder token) {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
}
return r.getRequestedOrientation();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedOrientation
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
|
getRequestedOrientation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseTechs(final List<Element> elements, final TechnologyFrontier allTechsFrontier) {
for (final Element current : elements) {
final String name = current.getAttribute("name");
final String tech = current.getAttribute("tech");
TechAdvance ta;
if (tech.length() > 0) {
ta = new GenericTechAdvance(name, TechAdvance.findDefinedAdvanceAndCreateAdvance(tech, data), data);
} else {
try {
ta = TechAdvance.findDefinedAdvanceAndCreateAdvance(name, data);
} catch (final IllegalArgumentException e) {
ta = new GenericTechAdvance(name, null, data);
}
}
allTechsFrontier.addAdvance(ta);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseTechs
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseTechs
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getTotalImages(Structure structure)
{
String typeField = Field.FieldType.IMAGE.toString();
return getTotals(structure,typeField);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotalImages
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getTotalImages
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unhandledBack() throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(UNHANDLED_BACK_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unhandledBack
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unhandledBack
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.