instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public XWikiAuthService getAuthService()
{
synchronized (this.AUTH_SERVICE_LOCK) {
if (this.authService == null) {
LOGGER.info("Initializing AuthService...");
String authClass = getConfiguration().getProperty("xwiki.authentication.authclass");
if (StringUtils.isNotEmpty(authClass)) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Using custom AuthClass " + authClass + ".");
}
} else {
if (isLDAP()) {
authClass = "com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl";
} else {
authClass = "com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl";
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Using default AuthClass " + authClass + ".");
}
}
try {
// Get the current ClassLoader
@SuppressWarnings("deprecation")
ClassLoaderManager clManager = Utils.getComponent(ClassLoaderManager.class);
ClassLoader classloader = null;
if (clManager != null) {
classloader = clManager.getURLClassLoader("wiki:xwiki", false);
}
// Get the class
if (classloader != null) {
this.authService = (XWikiAuthService) Class.forName(authClass, true, classloader).newInstance();
} else {
this.authService = (XWikiAuthService) Class.forName(authClass).newInstance();
}
LOGGER.debug("Initialized AuthService using Relfection.");
} catch (Exception e) {
LOGGER.warn("Failed to initialize AuthService " + authClass
+ " using Reflection, trying default implementations using 'new'.", e);
this.authService = new XWikiAuthServiceImpl();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
"Initialized AuthService " + this.authService.getClass().getName() + " using 'new'.");
}
}
}
return this.authService;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthService
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
|
getAuthService
|
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 void saveIfNeeded() {
if (mAccount == null) {
// We have not chosen an account yet so there's no way that we can save. This is ok,
// though, since we are saving our state before AccountsActivity is activated. Thus, the
// user has not interacted with us yet and there is no real state to save.
return;
}
if (isDraftDirty()) {
doSave(!mAddingAttachment /* show toast */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveIfNeeded
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
|
saveIfNeeded
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object readObject() throws JMSException {
return this.readPrimitiveType(Object.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObject
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
readObject
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pause(String packageName, int pid, int uid) {
try {
final String reason = TAG + ":pause";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onPause(packageName, pid, uid);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in pause.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pause
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
|
pause
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasMatch(List<String> regexes, String value) {
for (String r : regexes) {
if (value.matches(r)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasMatch
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
|
hasMatch
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resurrection() {
// remove stucked notification
mNotificationManager.cancel(FOREGROUND_SERVICE_ID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resurrection
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
resurrection
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public PublishQueue getPublishQueue() {
return publishQueue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPublishQueue
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
getPublishQueue
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void broadcastAlphaMessage(String alphaString) {
CatLog.d(this, "Broadcasting CAT Alpha message from card: " + alphaString);
Intent intent = new Intent(AppInterface.CAT_ALPHA_NOTIFY_ACTION);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
intent.putExtra(AppInterface.ALPHA_STRING, alphaString);
intent.putExtra("SLOT_ID", mSlotId);
mContext.sendBroadcast(intent);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2015-3843
- Severity: HIGH
- CVSS Score: 9.3
Description: DO NOT MERGE Change to add STK_PERMISSION for stk related commands.
And make stk commands protected.
Bug: 21697171
Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b
Function: broadcastAlphaMessage
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
Fixed Code:
private void broadcastAlphaMessage(String alphaString) {
CatLog.d(this, "Broadcasting CAT Alpha message from card: " + alphaString);
Intent intent = new Intent(AppInterface.CAT_ALPHA_NOTIFY_ACTION);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
intent.putExtra(AppInterface.ALPHA_STRING, alphaString);
intent.putExtra("SLOT_ID", mSlotId);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
broadcastAlphaMessage
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 1
|
Analyze the following code function for security vulnerabilities
|
private int runInstallWrite() throws IOException, RemoteException {
long sizeBytes = -1;
String opt;
while ((opt = nextOption()) != null) {
if (opt.equals("-S")) {
sizeBytes = Long.parseLong(nextOptionData());
} else {
throw new IllegalArgumentException("Unknown option: " + opt);
}
}
final int sessionId = Integer.parseInt(nextArg());
final String splitName = nextArg();
String path = nextArg();
if ("-".equals(path)) {
path = null;
} else if (path != null) {
final File file = new File(path);
if (file.isFile()) {
sizeBytes = file.length();
}
}
final SessionInfo info = mInstaller.getSessionInfo(sessionId);
PackageInstaller.Session session = null;
InputStream in = null;
OutputStream out = null;
try {
session = new PackageInstaller.Session(mInstaller.openSession(sessionId));
if (path != null) {
in = new FileInputStream(path);
} else {
in = new SizedInputStream(System.in, sizeBytes);
}
out = session.openWrite(splitName, 0, sizeBytes);
int total = 0;
byte[] buffer = new byte[65536];
int c;
while ((c = in.read(buffer)) != -1) {
total += c;
out.write(buffer, 0, c);
if (info.sizeBytes > 0) {
final float fraction = ((float) c / (float) info.sizeBytes);
session.addProgress(fraction);
}
}
session.fsync(out);
System.out.println("Success: streamed " + total + " bytes");
return 0;
} finally {
IoUtils.closeQuietly(out);
IoUtils.closeQuietly(in);
IoUtils.closeQuietly(session);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runInstallWrite
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runInstallWrite
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Intent getIntentForIntentSender(IIntentSender sender) {
return ActivityManagerService.this.getIntentForIntentSender(sender);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentForIntentSender
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
|
getIntentForIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void ensureUnknownSourcesRestrictionForProfileOwnerLocked(int userId,
ActiveAdmin profileOwner, boolean newOwner) {
if (newOwner || mInjector.settingsSecureGetIntForUser(
Settings.Secure.UNKNOWN_SOURCES_DEFAULT_REVERSED, 0, userId) != 0) {
if (isPolicyEngineForFinanceFlagEnabled()) {
mDevicePolicyEngine.setLocalPolicy(
PolicyDefinition.getPolicyDefinitionForUserRestriction(
UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES),
EnforcingAdmin.createEnterpriseEnforcingAdmin(
profileOwner.info.getComponent(),
profileOwner.getUserHandle().getIdentifier()),
new BooleanPolicyValue(true),
userId);
} else {
profileOwner.ensureUserRestrictions().putBoolean(
UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, true);
saveUserRestrictionsLocked(userId);
}
mInjector.settingsSecurePutIntForUser(
Settings.Secure.UNKNOWN_SOURCES_DEFAULT_REVERSED, 0, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureUnknownSourcesRestrictionForProfileOwnerLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
ensureUnknownSourcesRestrictionForProfileOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean dumpUids(PrintWriter pw, String dumpPackage, int dumpAppId, SparseArray<UidRecord> uids,
String header, boolean needSep) {
boolean printed = false;
for (int i=0; i<uids.size(); i++) {
UidRecord uidRec = uids.valueAt(i);
if (dumpPackage != null && UserHandle.getAppId(uidRec.uid) != dumpAppId) {
continue;
}
if (!printed) {
printed = true;
if (needSep) {
pw.println();
}
pw.print(" ");
pw.println(header);
needSep = true;
}
pw.print(" UID "); UserHandle.formatUid(pw, uidRec.uid);
pw.print(": "); pw.println(uidRec);
}
return printed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpUids
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
|
dumpUids
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStatusChangedTitle() {
return statusChangedTitle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatusChangedTitle
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getStatusChangedTitle
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] getCharsetAndCollation(String wikiName, Session session, XWikiContext context)
{
String[] result = new String[2];
String charset = "utf8mb4";
String collation = "utf8mb4_bin";
// Get main wiki encoding
if (!context.isMainWiki(wikiName)) {
NativeQuery<Object[]> selectQuery = session.createNativeQuery(
"select DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME from INFORMATION_SCHEMA.SCHEMATA"
+ " where SCHEMA_NAME='" + getSchemaFromWikiName(context.getMainXWiki(), context) + "'");
Object[] queryResult = selectQuery.uniqueResult();
if (queryResult != null) {
charset = (String) queryResult[0];
collation = (String) queryResult[1];
}
}
result[0] = charset;
result[1] = collation;
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCharsetAndCollation
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
|
getCharsetAndCollation
|
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 int primitiveSize(Class<?> type) {
if (type == byte.class || type == boolean.class) {
return 1;
}
if (type == short.class || type == char.class) {
return 2;
}
if (type == int.class || type == float.class) {
return 4;
}
if (type == long.class || type == double.class) {
return 8;
}
throw new AssertionError();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: primitiveSize
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
primitiveSize
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean canReceiveKeys() {
// TODO(156521483): Propagate the state down the hierarchy instead of checking the parent
return getWindowConfiguration().canReceiveKeys()
&& (task == null || task.getWindowConfiguration().canReceiveKeys());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canReceiveKeys
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
|
canReceiveKeys
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Experiment delete(K8sClient api) {
try {
if (LOG.isDebugEnabled()) {
LOG.debug("Delete XGBoostJob resource in namespace: {} and name: {}",
this.getMetadata().getNamespace(), this.getMetadata().getName());
}
V1Status status = api.getXGBoostJobClient()
.delete(getMetadata().getNamespace(), getMetadata().getName(),
MLJobConverter.toDeleteOptionsFromMLJob(this))
.throwsApiException().getStatus();
return parseExperimentResponseStatus(status);
} catch (ApiException e) {
throw new SubmarineRuntimeException(e.getCode(), e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
delete
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final void mkdirs(File file) throws IOException
{
if (file != null)
{
if (!file.mkdirs())
{
throw new IOException("Failed to create directories");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mkdirs
File: src/main/java/net/sf/mpxj/common/FileHelper.java
Repository: joniles/mpxj
The code follows secure coding practices.
|
[
"CWE-377",
"CWE-200"
] |
CVE-2022-41954
|
LOW
| 3.3
|
joniles/mpxj
|
mkdirs
|
src/main/java/net/sf/mpxj/common/FileHelper.java
|
ae0af24345d79ad45705265d9927fe55e94a5721
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void unregisterTaskStackListener(ITaskStackListener listener) throws RemoteException {
enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS,
"unregisterTaskStackListener()");
mTaskChangeNotificationController.unregisterTaskStackListener(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterTaskStackListener
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
|
unregisterTaskStackListener
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) {
int exitCode = 1;
try {
exitCode = new Pm().run(args);
} catch (Exception e) {
Log.e(TAG, "Error", e);
System.err.println("Error: " + e);
if (e instanceof RemoteException) {
System.err.println(PM_NOT_RUNNING_ERR);
}
}
System.exit(exitCode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: main
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
main
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAttached() {
if (getParent() == null) {
return false;
} else {
StateNode root = getParent();
while (root.getParent() != null) {
root = root.getParent();
}
return root.isAttached();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAttached
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isAttached
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setName(String name) {
this.name = name;
prefix = "[" + this.name + "] " + prefix;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
setName
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
private String gitCleanArgs() {
if ("Y".equalsIgnoreCase(System.getProperty(GIT_CLEAN_KEEP_IGNORED_FILES_FLAG))) {
LOG.info("{} = Y. Using old behaviour for clean using `-dff`", GIT_CLEAN_KEEP_IGNORED_FILES_FLAG);
return "-dff";
} else {
return "-dffx";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gitCleanArgs
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
|
gitCleanArgs
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteUser(final String name) throws Exception {
m_writeLock.lock();
try {
// Check if the user exists
if (m_users.containsKey(name)) {
// Delete the user in the user map.
m_users.remove(name);
// Refresh the groups config first
m_groupManager.update();
// Delete the user in the group.
m_groupManager.deleteUser(name);
// Delete the user in the view.
// viewFactory.deleteUser(name);
} else {
throw new Exception("UserFactory:delete The old user name " + name + " is not found");
}
_saveCurrent();
} finally {
m_writeLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteUser
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
deleteUser
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public String selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
return "application/json";
}
for (String contentType : contentTypes) {
if (isJsonMime(contentType)) {
return contentType;
}
}
return contentTypes[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectHeaderContentType
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
selectHeaderContentType
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRequestURI() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestURI
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getRequestURI
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public void logout() {
Cookie[] cookies = getRequest().getCookies();
for (Cookie cookie : cookies) {
if ("zId".equals(cookie.getName())) {
cookie.setValue("");
cookie.setMaxAge(Constants.getSessionTimeout().intValue());
getResponse().addCookie(cookie);
}
if (Constants.ADMIN_TOKEN.equals(cookie.getName())) {
cookie.setValue("");
cookie.setMaxAge(Constants.getSessionTimeout().intValue());
cookie.setPath("/");
adminTokenService.setCookieDomain(getRequest(), cookie);
getResponse().addCookie(cookie);
}
}
redirect(LOGOUT_URI);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logout
File: web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
logout
|
web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void releaseLastXrefPartial() {
if (partial && lastXrefPartial != -1) {
xrefObj.set(lastXrefPartial, null);
lastXrefPartial = -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseLastXrefPartial
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
|
releaseLastXrefPartial
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public void destroy() {
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2017-11466
- Severity: HIGH
- CVSS Score: 9.0
Description: #12131 fixes arbitrary upload
Function: destroy
File: dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
Repository: dotCMS/core
Fixed Code:
@Override
public void destroy() {
}
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
destroy
|
dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
|
208798c6aa9ca70f90740c8a8924e481283109ce
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setName(String name) {
this.name = name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
setName
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri data = getIntent().getData();
boolean directLogin = data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme));
if (savedInstanceState == null && !directLogin) {
onboarding.launchFirstRunIfNeeded(this);
}
onlyAdd = getIntent().getBooleanExtra(KEY_ONLY_ADD, false) || checkIfViaSSO(getIntent());
// delete cookies for webView
deleteCookies();
// Workaround, for fixing a problem with Android Library Support v7 19
//getWindow().requestFeature(Window.FEATURE_NO_TITLE);
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setDisplayShowTitleEnabled(false);
}
mIsFirstAuthAttempt = true;
/// init activity state
mAccountMgr = AccountManager.get(this);
/// get input values
mAction = getIntent().getByteExtra(EXTRA_ACTION, ACTION_CREATE);
Bundle extras = getIntent().getExtras();
if (extras != null) {
mAccount = extras.getParcelable(EXTRA_ACCOUNT);
}
if (savedInstanceState != null) {
mWaitingForOpId = savedInstanceState.getLong(KEY_WAITING_FOR_OP_ID);
mIsFirstAuthAttempt = savedInstanceState.getBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG);
}
String webloginUrl = null;
boolean webViewLoginMethod;
if (getIntent().getBooleanExtra(EXTRA_USE_PROVIDER_AS_WEBLOGIN, false)) {
webViewLoginMethod = true;
webloginUrl = getString(R.string.provider_registration_server);
} else {
webViewLoginMethod = !TextUtils.isEmpty(getResources().getString(R.string.webview_login_url));
showWebViewLoginUrl = getResources().getBoolean(R.bool.show_server_url_input);
}
/// load user interface
if (webViewLoginMethod) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
setContentView(R.layout.account_setup_webview);
mLoginWebView = findViewById(R.id.login_webview);
initWebViewLogin(webloginUrl, false);
} else {
setContentView(R.layout.account_setup);
/// initialize general UI elements
initOverallUi();
/// initialize block to be moved to single Fragment to check server and get info about it
/// initialize block to be moved to single Fragment to retrieve and validate credentials
initAuthorizationPreFragment(savedInstanceState);
}
initServerPreFragment(savedInstanceState);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
onCreate
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Registration addServiceDestroyListener(
ServiceDestroyListener listener) {
serviceDestroyListeners.add(listener);
return () -> serviceDestroyListeners.remove(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addServiceDestroyListener
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
addServiceDestroyListener
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Point getRotationZeroDimensions(final Rect bounds, int rotation) {
final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
final int width = bounds.width();
final int height = bounds.height();
return rotated ? new Point(height, width) : new Point(width, height);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRotationZeroDimensions
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
|
getRotationZeroDimensions
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadUrlSync(final AwContents awContents,
CallbackHelper onPageFinishedHelper,
final String url,
final Map<String, String> extraHeaders) throws Exception {
int currentCallCount = onPageFinishedHelper.getCallCount();
loadUrlAsync(awContents, url, extraHeaders);
onPageFinishedHelper.waitForCallback(currentCallCount, 1, WAIT_TIMEOUT_MS,
TimeUnit.MILLISECONDS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadUrlSync
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
loadUrlSync
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setBluetoothContactSharingDisabled(ComponentName who, boolean disabled) {
if (!mHasFeature) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
synchronized (getLockObject()) {
ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
if (admin.disableBluetoothContactSharing != disabled) {
admin.disableBluetoothContactSharing = disabled;
saveSettingsLocked(caller.getUserId());
}
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_BLUETOOTH_CONTACT_SHARING_DISABLED)
.setAdmin(who)
.setBoolean(disabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBluetoothContactSharingDisabled
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
|
setBluetoothContactSharingDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Element elementBeforeImpl(String name, String namespaceURI) {
Node parentNode = this.xmlNode.getParentNode();
assertElementContainsNoOrWhitespaceOnlyTextNodes(parentNode);
Element newElement = (namespaceURI == null
? getDocument().createElement(name)
: getDocument().createElementNS(namespaceURI, name));
// Insert new element before the current element
parentNode.insertBefore(newElement, this.xmlNode);
// Return a new builder node pointing at the new element
return newElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: elementBeforeImpl
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
elementBeforeImpl
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendDeletedIntentLocked(Widget widget) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_DELETED);
intent.setComponent(widget.provider.info.provider);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widget.appWidgetId);
sendBroadcastAsUser(intent, widget.provider.info.getProfile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDeletedIntentLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
sendDeletedIntentLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setCaption(String caption) {
Objects.requireNonNull(caption, "Header caption can't be null");
caption = Jsoup.clean(caption, Whitelist.none());
if (caption.equals(getState(false).caption)) {
return this;
}
getState().caption = caption;
HeaderRow row = getGrid().getDefaultHeaderRow();
if (row != null) {
row.getCell(this).setText(caption);
}
return this;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-25028
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Sanitize input used in Grid header
Function: setCaption
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
Fixed Code:
public Column<T, V> setCaption(String caption) {
Objects.requireNonNull(caption, "Header caption can't be null");
caption = Jsoup.parse(caption).text();
if (caption.equals(getState(false).caption)) {
return this;
}
getState().caption = caption;
HeaderRow row = getGrid().getDefaultHeaderRow();
if (row != null) {
row.getCell(this).setText(caption);
}
return this;
}
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setCaption
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 1
|
Analyze the following code function for security vulnerabilities
|
private void constructQueryForBox(SQLiteQueryBuilder qb, int msgBox, String pduTable) {
qb.setTables(pduTable);
if (msgBox != Mms.MESSAGE_BOX_ALL) {
qb.appendWhere(Mms.MESSAGE_BOX + "=" + msgBox);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: constructQueryForBox
File: src/com/android/providers/telephony/MmsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-22"
] |
CVE-2023-21268
|
MEDIUM
| 5.5
|
android
|
constructQueryForBox
|
src/com/android/providers/telephony/MmsProvider.java
|
ca4c9a19635119d95900793e7a41b820cd1d94d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void marshalStaxResult(Marshaller jaxbMarshaller, Object graph, Result staxResult) throws JAXBException {
XMLStreamWriter streamWriter = StaxUtils.getXMLStreamWriter(staxResult);
if (streamWriter != null) {
jaxbMarshaller.marshal(graph, streamWriter);
}
else {
XMLEventWriter eventWriter = StaxUtils.getXMLEventWriter(staxResult);
if (eventWriter != null) {
jaxbMarshaller.marshal(graph, eventWriter);
}
else {
throw new IllegalArgumentException("StAX Result contains neither XMLStreamWriter nor XMLEventConsumer");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshalStaxResult
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
marshalStaxResult
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setVary(MutableHttpResponse<?> response) {
response.header(VARY, ORIGIN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVary
File: http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
setVary
|
http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setSingleQuotedExecutableEscaped( boolean singleQuotedExecutableEscaped )
{
this.singleQuotedExecutableEscaped = singleQuotedExecutableEscaped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSingleQuotedExecutableEscaped
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
setSingleQuotedExecutableEscaped
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String determineMethodsAllowed(
Resource so
) {
try {
if (so != null) {
if (so.isCollection()) {
return this.getDefaultMethodsAllowed() + ", " + this.getResourceMethodsAllowed() + ", " + this.getFolderMethodsAllowed();
} else {
return this.getDefaultMethodsAllowed() + ", " + getResourceMethodsAllowed();
}
}
} catch (Exception e) {
// we do nothing, just return default allowed methods
}
return getDefaultMethodsAllowed();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: determineMethodsAllowed
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
determineMethodsAllowed
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void playDtmfTone(String callId, char digit,
Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: playDtmfTone
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
playDtmfTone
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
List<Pair> params = new ArrayList<Pair>();
// preconditions
if (name == null || name.isEmpty() || value == null) return params;
Collection valueCollection;
if (value instanceof Collection) {
valueCollection = (Collection) value;
} else {
params.add(new Pair(name, parameterToString(value)));
return params;
}
if (valueCollection.isEmpty()){
return params;
}
// get the collection format (default: csv)
String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format
if ("multi".equals(format)) {
for (Object item : valueCollection) {
params.add(new Pair(name, parameterToString(item)));
}
return params;
}
String delimiter = ",";
if ("csv".equals(format)) {
delimiter = ",";
} else if ("ssv".equals(format)) {
delimiter = " ";
} else if ("tsv".equals(format)) {
delimiter = "\t";
} else if ("pipes".equals(format)) {
delimiter = "|";
}
StringBuilder sb = new StringBuilder() ;
for (Object item : valueCollection) {
sb.append(delimiter);
sb.append(parameterToString(item));
}
params.add(new Pair(name, sb.substring(1)));
return params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parameterToPairs
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
parameterToPairs
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateNCharacterStream(String columnName,
@Nullable Reader x, int length) throws SQLException {
updateNCharacterStream(findColumn(columnName), x, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateNCharacterStream
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
|
updateNCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUnencryptedPassword(final String userID, final String aPassword) throws Exception {
update();
m_writeLock.lock();
try {
final User user = m_users.get(userID);
if (user != null) {
final Password pass = new Password();
pass.setEncryptedPassword(encryptedPassword(aPassword, true));
pass.setSalt(true);
user.setPassword(pass);
}
_saveCurrent();
} finally {
m_writeLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUnencryptedPassword
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
setUnencryptedPassword
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ActivityManagerService startService(
SystemServiceManager ssm, ActivityTaskManagerService atm) {
sAtm = atm;
return ssm.startService(ActivityManagerService.Lifecycle.class).getService();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startService
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
|
startService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public AMQConnection getConnection() {
return _connection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnection
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getConnection
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processPluginDockerImageFile(File localFilePath, PackageType xmlPackage) {
File pluginDockerImageFile = new File(localFilePath + "/" + pluginProperties.getImageFile());
log.info("pluginDockerImageFile: {}", pluginDockerImageFile.getAbsolutePath());
if (pluginDockerImageFile.exists()) {
String keyName = xmlPackage.getName() + "/" + xmlPackage.getVersion() + "/"
+ pluginDockerImageFile.getName();
log.info("keyName : {}", keyName);
String dockerImageUrl = s3Client.uploadFile(pluginProperties.getPluginPackageBucketName(), keyName,
pluginDockerImageFile);
log.info("Plugin Package has uploaded to MinIO {}", dockerImageUrl.split("\\?")[0]);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processPluginDockerImageFile
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processPluginDockerImageFile
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeMoveCaret(long nativeContentViewCoreImpl, float x, float y);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeMoveCaret
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
|
nativeMoveCaret
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected long determineRekeyBlockLimit(int inCipherBlockSize, int outCipherBlockSize) {
// see https://tools.ietf.org/html/rfc4344#section-3.2
// select the lowest cipher size
long rekeyBlocksLimit = CoreModuleProperties.REKEY_BLOCKS_LIMIT.getRequired(this);
if (rekeyBlocksLimit <= 0) {
// Default per RFC 4344
int minCipherBlockBytes = Math.min(inCipherSize, outCipherSize);
if (minCipherBlockBytes >= 16) {
rekeyBlocksLimit = 1L << Math.min(minCipherBlockBytes * 2, 63);
} else {
// With a block size of 8 we'd end up with 2^16. That would re-key very often.
// RFC 4344: "If L is less than 128 [...], then, although it may be too
// expensive to rekey every 2**(L/4) blocks, it is still advisable for SSH
// implementations to follow the original recommendation in [RFC4253]: rekey at
// least once for every gigabyte of transmitted data."
//
// Note that chacha20-poly1305 has a block size of 8. The OpenSSH recommendation
// is: "ChaCha20 must never reuse a {key, nonce} for encryption nor may it be
// used to encrypt more than 2^70 bytes under the same {key, nonce}. The
// SSH Transport protocol (RFC4253) recommends a far more conservative
// rekeying every 1GB of data sent or received. If this recommendation
// is followed, then chacha20-poly1305@openssh.com requires no special
// handling in this area."
rekeyBlocksLimit = (1L << 30) / minCipherBlockBytes; // 1GB
}
}
return rekeyBlocksLimit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: determineRekeyBlockLimit
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
determineRekeyBlockLimit
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void printNode(OutputStream out, Node node, boolean prettyPrint, boolean includeXmlDeclaration) {
try {
Transformer serializer = tFactory.newTransformer();
if (prettyPrint) {
//Setup indenting to "pretty print"
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
}
if ( ! includeXmlDeclaration) {
serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
}
DOMSource xmlSource = new DOMSource(node);
StreamResult outputTarget = new StreamResult(out);
serializer.transform(xmlSource, outputTarget);
} catch (TransformerException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printNode
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
printNode
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeMapBegin(TMap map) throws TException {
if (map.size == 0) {
writeByteDirect(0);
} else {
writeVarint32(map.size);
writeByteDirect(getCompactType(map.keyType) << 4 | getCompactType(map.valueType));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeMapBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeMapBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@WorkerThread public @PrivateDnsModeErrorCodes int setGlobalPrivateDnsModeSpecifiedHost(
@NonNull ComponentName admin, @NonNull String privateDnsHost) {
throwIfParentInstance("setGlobalPrivateDnsModeSpecifiedHost");
Objects.requireNonNull(privateDnsHost, "dns resolver is null");
if (mService == null) {
return PRIVATE_DNS_SET_ERROR_FAILURE_SETTING;
}
if (NetworkUtilsInternal.isWeaklyValidatedHostname(privateDnsHost)) {
if (!PrivateDnsConnectivityChecker.canConnectToPrivateDnsServer(privateDnsHost)) {
return PRIVATE_DNS_SET_ERROR_HOST_NOT_SERVING;
}
}
try {
return mService.setGlobalPrivateDns(
admin, PRIVATE_DNS_MODE_PROVIDER_HOSTNAME, privateDnsHost);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setGlobalPrivateDnsModeSpecifiedHost
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
|
setGlobalPrivateDnsModeSpecifiedHost
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Node replaceChild(final Node newChild, final Node oldChild) {
if (oldChild.getParentNode() != this) {
throw new DOMException(DOMException.NOT_FOUND_ERR, "Node is not a child of this node.");
}
((DomNode) oldChild).replace((DomNode) newChild);
return oldChild;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceChild
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
replaceChild
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dismissKeyguard() {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DISABLE_KEYGUARD)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires DISABLE_KEYGUARD permission");
}
synchronized(mWindowMap) {
mPolicy.dismissKeyguardLw();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissKeyguard
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
|
dismissKeyguard
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void buildDataSerializableFactories(Map<Integer, DataSerializableFactory> dataSerializableFactories,
SerializationConfig config, ClassLoader cl) {
for (Map.Entry<Integer, String> entry : config.getDataSerializableFactoryClasses().entrySet()) {
int factoryId = entry.getKey();
String factoryClassName = entry.getValue();
if (factoryId <= 0) {
throw new IllegalArgumentException("DataSerializableFactory factoryId must be positive! -> " + factoryClassName);
}
if (dataSerializableFactories.containsKey(factoryId)) {
throw new IllegalArgumentException(
"DataSerializableFactory with factoryId '" + factoryId + "' is already registered!");
}
DataSerializableFactory factory;
try {
factory = ClassLoaderUtil.newInstance(cl, factoryClassName);
} catch (Exception e) {
throw new HazelcastSerializationException(e);
}
dataSerializableFactories.put(factoryId, factory);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildDataSerializableFactories
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
buildDataSerializableFactories
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public javax.xml.rpc.Service createService(URL wsdlDocumentLocation,
QName serviceName) throws ServiceException {
return new Service(wsdlDocumentLocation, serviceName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createService
File: axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
Repository: apache/axis-axis1-java
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-51441
|
HIGH
| 7.2
|
apache/axis-axis1-java
|
createService
|
axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
|
685c309febc64aa393b2d64a05f90e7eb9f73e06
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int checkRuntimePermission(@NonNull Context context,
@NonNull PermissionManagerServiceInternal permissionManagerServiceInt,
@NonNull String permission, @NonNull AttributionSource attributionSource,
@Nullable String message, boolean forDataDelivery, boolean startDataDelivery,
boolean fromDatasource, int attributedOp) {
// Now let's check the identity chain...
final int op = AppOpsManager.permissionToOpCode(permission);
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 = (fromDatasource || 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 (!(fromDatasource && current.equals(attributionSource))
&& next != null && !current.isTrusted(context)) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
// If we already checked the permission for this one, skip the work
if (!skipCurrentChecks && !checkPermission(context, permissionManagerServiceInt,
permission, current.getUid(), current.getRenouncedPermissions())) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
if (next != null && !checkPermission(context, permissionManagerServiceInt,
permission, next.getUid(), next.getRenouncedPermissions())) {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
if (op < 0) {
// Bg location is one-off runtime modifier permission and has no app op
if (sPlatformPermissions.containsKey(permission)
&& !Manifest.permission.ACCESS_BACKGROUND_LOCATION.equals(permission)
&& !Manifest.permission.BODY_SENSORS_BACKGROUND.equals(permission)) {
Slog.wtf(LOG_TAG, "Platform runtime permission " + permission
+ " with no app op defined!");
}
if (next == null) {
return PermissionChecker.PERMISSION_GRANTED;
}
current = next;
continue;
}
// The access is for oneself if this is the single receiver of data
// after the data source or if this is the single attribution source
// in the chain if not from a datasource.
final boolean singleReceiverFromDatasource = (fromDatasource
&& current.equals(attributionSource)
&& next != null && next.getNext() == null);
final boolean selfAccess = singleReceiverFromDatasource || 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,
startDataDelivery, selfAccess, isLinkTrusted)
: ATTRIBUTION_FLAGS_NONE;
final int proxiedAttributionFlags = hasChain ? resolveProxiedAttributionFlags(
attributionSource, next, fromDatasource, startDataDelivery, selfAccess,
isLinkTrusted) : ATTRIBUTION_FLAGS_NONE;
final int opMode = performOpTransaction(context, attributionSource.getToken(), op,
current, message, forDataDelivery, startDataDelivery, skipCurrentChecks,
selfAccess, singleReceiverFromDatasource, attributedOp,
proxyAttributionFlags, proxiedAttributionFlags, attributionChainId);
switch (opMode) {
case AppOpsManager.MODE_ERRORED: {
return PermissionChecker.PERMISSION_HARD_DENIED;
}
case AppOpsManager.MODE_IGNORED: {
return PermissionChecker.PERMISSION_SOFT_DENIED;
}
}
if (startDataDelivery) {
RegisteredAttribution registered = new RegisteredAttribution(context, op,
current, fromDatasource);
sRunningAttributionSources.put(current.getToken(), registered);
}
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: checkRuntimePermission
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
|
checkRuntimePermission
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getTotalPages() {
return ((totalCount - 1) / count) + 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotalPages
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
getTotalPages
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder sib = super.makeSearchIndex();
if(isBuildable() && hasPermission(Jenkins.ADMINISTER))
sib.add("build","build");
return sib;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeSearchIndex
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
makeSearchIndex
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyManifestMainSectionDigest(
ManifestParser.Section sfMainSection,
ManifestParser.Section manifestMainSection,
byte[] manifestBytes,
int minSdkVersion,
int maxSdkVersion) throws NoSuchAlgorithmException {
Collection<NamedDigest> expectedDigests =
getDigestsToVerify(
sfMainSection,
"-Digest-Manifest-Main-Attributes",
minSdkVersion,
maxSdkVersion);
if (expectedDigests.isEmpty()) {
return;
}
for (NamedDigest expectedDigest : expectedDigests) {
String jcaDigestAlgorithm = expectedDigest.jcaDigestAlgorithm;
byte[] actual =
digest(
jcaDigestAlgorithm,
manifestBytes,
manifestMainSection.getStartOffset(),
manifestMainSection.getSizeBytes());
byte[] expected = expectedDigest.digest;
if (!Arrays.equals(expected, actual)) {
mResult.addError(
Issue.JAR_SIG_MANIFEST_MAIN_SECTION_DIGEST_DID_NOT_VERIFY,
jcaDigestAlgorithm,
mSignatureFileEntry.getName(),
Base64.getEncoder().encodeToString(actual),
Base64.getEncoder().encodeToString(expected));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyManifestMainSectionDigest
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verifyManifestMainSectionDigest
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.TARGET_UID,
targetUid);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.DURATION_MS,
duration);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.TAG, tag);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.TYPE, type);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.REASON_CODE,
reasonCode);
proto.write(ActivityManagerServiceDumpProcessesProto.PendingTempWhitelist.CALLING_UID,
callingUid);
proto.end(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDebug
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
|
dumpDebug
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mHeaderText = (TextView) view.findViewById(R.id.headerText);
mDefaultHeaderColorList = mHeaderText.getTextColors();
mLockPatternView = (LockPatternView) view.findViewById(R.id.lockPattern);
mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);
mLockPatternView.setFadePattern(false);
mFooterText = (TextView) view.findViewById(R.id.footerText);
// make it so unhandled touch events within the unlock screen go to the
// lock pattern view.
final LinearLayoutWithDefaultTouchRecepient topLayout
= (LinearLayoutWithDefaultTouchRecepient) view.findViewById(
R.id.topLayout);
topLayout.setDefaultTouchRecepient(mLockPatternView);
final boolean confirmCredentials = getActivity().getIntent()
.getBooleanExtra(ChooseLockGeneric.CONFIRM_CREDENTIALS, true);
Intent intent = getActivity().getIntent();
mCurrentCredential =
intent.getParcelableExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
mRequestGatekeeperPassword = intent.getBooleanExtra(
ChooseLockSettingsHelper.EXTRA_KEY_REQUEST_GK_PW_HANDLE, false);
if (savedInstanceState == null) {
if (confirmCredentials) {
// first launch. As a security measure, we're in NeedToConfirm mode until we
// know there isn't an existing password or the user confirms their password.
updateStage(Stage.NeedToConfirm);
final ChooseLockSettingsHelper.Builder builder =
new ChooseLockSettingsHelper.Builder(getActivity());
final boolean launched = builder.setRequestCode(CONFIRM_EXISTING_REQUEST)
.setTitle(getString(R.string.unlock_set_unlock_launch_picker_title))
.setReturnCredentials(true)
.setRequestGatekeeperPasswordHandle(mRequestGatekeeperPassword)
.setUserId(mUserId)
.show();
if (!launched) {
updateStage(Stage.Introduction);
}
} else {
updateStage(Stage.Introduction);
}
} else {
// restore from previous state
mChosenPattern = savedInstanceState.getParcelable(KEY_PATTERN_CHOICE);
mCurrentCredential = savedInstanceState.getParcelable(KEY_CURRENT_PATTERN);
updateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]);
// Re-attach to the exiting worker if there is one.
mSaveAndFinishWorker = (SaveAndFinishWorker) getFragmentManager().findFragmentByTag(
FRAGMENT_TAG_SAVE_AND_FINISH);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onViewCreated
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
onViewCreated
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void extendsExistingOrderByClausesCorrectly() {
String query = "select p from Person p order by p.lastname asc";
assertThat(applySorting(query, new Sort("firstname"), "p"), endsWith("order by p.lastname asc, p.firstname asc"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extendsExistingOrderByClausesCorrectly
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
extendsExistingOrderByClausesCorrectly
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private boolean isFullscreenRequiredForOrientationLock() {
return mFullscreenRequiredForOrientationLock;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFullscreenRequiredForOrientationLock
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
|
isFullscreenRequiredForOrientationLock
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("topic:delete")
@GetMapping("/delete")
@ResponseBody
public Result delete(Integer id) {
Topic topic = topicService.selectById(id);
topicService.delete(topic);
return success();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
delete
|
src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Service searchService(String serviceCode) throws IOException {
StringBuilder sql = new StringBuilder();
List<Object> condition = new ArrayList<>(5);
sql.append("select * from ").append(ServiceTraffic.INDEX_NAME).append(" where ");
sql.append(ServiceTraffic.NODE_TYPE).append("=?");
condition.add(NodeType.Normal.value());
sql.append(" and ").append(ServiceTraffic.NAME).append(" = ?");
condition.add(serviceCode);
try (Connection connection = h2Client.getConnection()) {
try (ResultSet resultSet = h2Client.executeQuery(
connection, sql.toString(), condition.toArray(new Object[0]))) {
while (resultSet.next()) {
Service service = new Service();
service.setId(resultSet.getString(H2TableInstaller.ID_COLUMN));
service.setName(resultSet.getString(ServiceTraffic.NAME));
return service;
}
}
} catch (SQLException e) {
throw new IOException(e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchService
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-13921
|
HIGH
| 7.5
|
apache/skywalking
|
searchService
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
|
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
| 0
|
Analyze the following code function for security vulnerabilities
|
private XWikiSpace loadXWikiSpace(SpaceReference spaceReference, Session session)
{
XWikiSpace space = session.get(XWikiSpace.class, XWikiSpace.getId(spaceReference));
if (space != null) {
space.setStore(this);
}
return space;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadXWikiSpace
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
|
loadXWikiSpace
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConnectTimeout
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setConnectTimeout
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateTime(
String columnName, java.sql.@Nullable Time x) throws SQLException {
updateTime(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTime
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
|
updateTime
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String translateLegacySystemId(String systemId) {
String result = systemId;
for (String[] translation : LEGACY_TRANSLATIONS) {
if (systemId.startsWith(translation[0])) {
// replace prefix with second component if it matches the first component
result = translation[1] + systemId.substring(translation[0].length());
break;
}
}
if (OpenCms.getRepositoryManager() != null) {
result = OpenCms.getResourceManager().getXsdTranslator().translateResource(result);
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: translateLegacySystemId
File: src/org/opencms/xml/CmsXmlEntityResolver.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
translateLegacySystemId
|
src/org/opencms/xml/CmsXmlEntityResolver.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
public int compare(String a, String b) {
int slashCountA = countChar(a, '/');
int slashCountB = countChar(b, '/');
if (slashCountA < slashCountB) {
return 1;
} else if (slashCountA == slashCountB) {
return a.compareTo(b);
} else {
return -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compare
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
compare
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Post> fullQuestionsSearch(String query, Pager... pager) {
String typeFilter = Config._TYPE + ":(" + String.join(" OR ",
Utils.type(Question.class), Utils.type(Reply.class), Utils.type(Comment.class)) + ")";
String qs = StringUtils.isBlank(query) || query.startsWith("*") ? typeFilter : query + " AND " + typeFilter;
List<ParaObject> mixedResults = pc.findQuery("", qs, pager);
Predicate<ParaObject> isQuestion = obj -> obj.getType().equals(Utils.type(Question.class));
Map<String, ParaObject> idsToQuestions = new HashMap<>(mixedResults.stream().filter(isQuestion).
collect(Collectors.toMap(q -> q.getId(), q -> q)));
Set<String> toRead = new LinkedHashSet<>();
mixedResults.stream().filter(isQuestion.negate()).forEach(obj -> {
if (!idsToQuestions.containsKey(obj.getParentid())) {
toRead.add(obj.getParentid());
}
});
// find all parent posts but this excludes parents of parents - i.e. won't work for comments in answers
List<Post> parentPostsLevel1 = pc.readAll(new ArrayList<>(toRead));
parentPostsLevel1.stream().filter(isQuestion).forEach(q -> idsToQuestions.put(q.getId(), q));
toRead.clear();
// read parents of parents if any
parentPostsLevel1.stream().filter(isQuestion.negate()).forEach(obj -> {
if (!idsToQuestions.containsKey(obj.getParentid())) {
toRead.add(obj.getParentid());
}
});
List<Post> parentPostsLevel2 = pc.readAll(new ArrayList<>(toRead));
parentPostsLevel2.stream().forEach(q -> idsToQuestions.put(q.getId(), q));
ArrayList<Post> results = new ArrayList<Post>(idsToQuestions.size());
for (ParaObject result : idsToQuestions.values()) {
if (result instanceof Post) {
results.add((Post) result);
}
}
return results;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fullQuestionsSearch
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
fullQuestionsSearch
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasGenericTypes() { return containedTypeCount() > 0; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasGenericTypes
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hasGenericTypes
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
// Create a pool of HTTP connections to use to get the favicons
client = HttpClientBuilder.create()
.setConnectionManager(new PoolingHttpClientConnectionManager())
.setRedirectStrategy(new LaxRedirectStrategy())
.build();
// Load the default favicon to use when no favicon was found of a remote host
try {
URL resource = config.getServletContext().getResource("/images/server_16x16.gif");
defaultBytes = getImage(resource.toString());
}
catch (MalformedURLException e) {
LOGGER.warn("Unable to retrieve default favicon", e);
}
// Initialize caches.
missesCache = CacheFactory.createCache("Favicon Misses");
hitsCache = CacheFactory.createCache("Favicon Hits");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
init
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
c2ccb38250910587498597955d0bbee8b58e46df
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable PackagePolicy getManagedProfileCallerIdAccessPolicy() {
throwIfParentInstance("getManagedProfileCallerIdAccessPolicy");
if (mService != null) {
try {
return mService.getManagedProfileCallerIdAccessPolicy();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getManagedProfileCallerIdAccessPolicy
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
|
getManagedProfileCallerIdAccessPolicy
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ShowCondition getShowCondition() {
return showCondition;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShowCondition
File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21248
|
MEDIUM
| 6.5
|
theonedev/onedev
|
getShowCondition
|
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
|
39d95ab8122c5d9ed18e69dc024870cae08d2d60
| 0
|
Analyze the following code function for security vulnerabilities
|
public WearableExtender setHintDisplayActionInline(
boolean hintDisplayInline) {
setFlag(FLAG_HINT_DISPLAY_INLINE, hintDisplayInline);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHintDisplayActionInline
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setHintDisplayActionInline
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder requestIdGenerator(
Function<? super RoutingContext, ? extends RequestId> requestIdGenerator) {
virtualHostTemplate.requestIdGenerator(requestIdGenerator);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestIdGenerator
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
requestIdGenerator
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@PostMapping("/upload")
public Object upload(@RequestParam("file") MultipartFile file) throws IOException {
String originalFilename = file.getOriginalFilename();
String url = storageService.store(file.getInputStream(), file.getSize(), file.getContentType(), originalFilename);
Map<String, Object> data = new HashMap<>();
data.put("url", url);
return ResponseUtil.ok(data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: upload
File: litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxStorageController.java
Repository: linlinjava/litemall
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-18434
|
MEDIUM
| 5
|
linlinjava/litemall
|
upload
|
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxStorageController.java
|
49ab94d0052672d4fb642505d44b94a18abea332
| 0
|
Analyze the following code function for security vulnerabilities
|
private void correctMessage(Message message) {
while (message.mergeable(message.next())) {
message = message.next();
}
this.conversation.setCorrectingMessage(message);
final Editable editable = binding.textinput.getText();
this.conversation.setDraftMessage(editable.toString());
this.binding.textinput.setText("");
this.binding.textinput.append(message.getBody());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: correctMessage
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
correctMessage
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void populateWithEnumData(AbstractSelect select,
Class<? extends Enum> enumClass) {
// Use enums directly and the EnumToStringConverter to be consistent
// with what is shown in the Grid
@SuppressWarnings("unchecked")
EnumSet<?> enumSet = EnumSet.allOf(enumClass);
for (Object r : enumSet) {
select.addItem(r);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateWithEnumData
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
populateWithEnumData
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean permissionIsGranted(
Account account, String authTokenType, int callerUid, int userId) {
if (UserHandle.getAppId(callerUid) == Process.SYSTEM_UID) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Access to " + account + " granted calling uid is system");
}
return true;
}
if (isPrivileged(callerUid)) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Access to " + account + " granted calling uid "
+ callerUid + " privileged");
}
return true;
}
if (account != null && isAccountManagedByCaller(account.type, callerUid, userId)) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Access to " + account + " granted calling uid "
+ callerUid + " manages the account");
}
return true;
}
if (account != null && hasExplicitlyGrantedPermission(account, authTokenType, callerUid)) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Access to " + account + " granted calling uid "
+ callerUid + " user granted access");
}
return true;
}
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "Access to " + account + " not granted for uid " + callerUid);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: permissionIsGranted
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
permissionIsGranted
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dispatchAsync(Command message) {
if (!stopping.get()) {
if (taskRunner == null) {
dispatchSync(message);
} else {
synchronized (dispatchQueue) {
dispatchQueue.add(message);
}
try {
taskRunner.wakeup();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
} else {
if (message.isMessageDispatch()) {
MessageDispatch md = (MessageDispatch) message;
TransmitCallback sub = md.getTransmitCallback();
broker.postProcessDispatch(md);
if (sub != null) {
sub.onFailure();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchAsync
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
dispatchAsync
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts) throws SSLException {
try {
return unwrap(singleSrcBuffer(src), dsts);
} finally {
resetSingleSrcBuffer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unwrap
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
unwrap
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public InstrumentationInfo getInstrumentationInfo(ComponentName name,
int flags) {
// reader
synchronized (mPackages) {
final PackageParser.Instrumentation i = mInstrumentation.get(name);
return PackageParser.generateInstrumentationInfo(i, flags);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstrumentationInfo
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
|
getInstrumentationInfo
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ApplicationConfigurationFactory addingService(
ServiceReference<ApplicationConfigurationFactory> reference) {
ApplicationConfigurationFactory factory = super.addingService(
reference);
AppConfigFactoryTracker tracker = servletContext
.getAttribute(AppConfigFactoryTracker.class);
if (tracker != null) {
stop();
servletContext.removeAttribute(AppConfigFactoryTracker.class);
}
initializeLookup();
return factory;
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2021-31407
- Severity: MEDIUM
- CVSS Score: 5.0
Description: fix: implement static file handler factory for OSGi
fixes #50
Function: addingService
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
Repository: vaadin/osgi
Fixed Code:
@Override
public ServletInitializationRequirements addingService(
ServiceReference<ServletInitializationRequirements> reference) {
ServletInitializationRequirements requirements = super.addingService(
reference);
AppConfigFactoryTracker tracker = servletContext
.getAttribute(AppConfigFactoryTracker.class);
if (tracker != null) {
stop();
servletContext.removeAttribute(AppConfigFactoryTracker.class);
}
initializeLookup();
return requirements;
}
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
addingService
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
|
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean loginValidate(String userName, String password) {
String sql = "select * from admin_table where admin_name=? and password=?";
try {
ps=DbUtil.getConnection().prepareStatement(sql);
ps.setString(1, userName);
ps.setString(2,password);
ResultSet rs =ps.executeQuery();
if (rs.next()) {
return true;
}
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-916
- CVE: CVE-2021-21253
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Add a salt to SHA-256 hash
Function: loginValidate
File: src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
Repository: bijaythapaa/OnlineVotingSystem
Fixed Code:
@Override
public boolean loginValidate(String userName, String password) {
String sql = "select * from admin_table where admin_name=?";
try {
ps=DbUtil.getConnection().prepareStatement(sql);
ps.setString(1, userName);
ResultSet rs =ps.executeQuery();
if (rs.next()) {
String cipherText = rs.getString("password");
return SHA256.validatePassword(password, cipherText);
}
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
return false;
}
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
loginValidate
|
src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 1
|
Analyze the following code function for security vulnerabilities
|
static public String doubleToString(double d) {
if (Double.isInfinite(d) || Double.isNaN(d)) {
return "null";
}
// Shave off trailing zeros and decimal point, if possible.
String s = Double.toString(d);
if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0) {
while (s.endsWith("0")) {
s = s.substring(0, s.length() - 1);
}
if (s.endsWith(".")) {
s = s.substring(0, s.length() - 1);
}
}
return s;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doubleToString
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
doubleToString
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean useNativeIo() {
return Boolean.parseBoolean(prop.getProperty(USE_NATIVE_IO, "true"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: useNativeIo
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
useNativeIo
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public String display(String fieldname, String type, Object obj, String wrappingSyntaxId)
{
if (obj == null) {
return "";
}
return this.doc.display(fieldname, type, obj.getBaseObject(), wrappingSyntaxId, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
display
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err,
String[] args, ShellCallback callback, ResultReceiver resultReceiver) {
enforceShell();
final long token = injectClearCallingIdentity();
try {
final int status = (new MyShellCommand()).exec(this, in, out, err, args, callback,
resultReceiver);
resultReceiver.send(status, null);
} finally {
injectRestoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onShellCommand
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
|
onShellCommand
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void saveLastInputMethodWindowForTransition() {
synchronized (mWindowMap) {
// TODO(multidisplay): Pass in the displayID.
DisplayContent displayContent = getDefaultDisplayContentLocked();
if (mInputMethodWindow != null) {
mPolicy.setLastInputMethodWindowLw(mInputMethodWindow, mInputMethodTarget);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveLastInputMethodWindowForTransition
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
|
saveLastInputMethodWindowForTransition
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resumePolling() {
NfcPermissions.enforceAdminPermissions(mContext);
synchronized (NfcService.this) {
if (!mPollingPaused) {
return;
}
mHandler.removeMessages(MSG_RESUME_POLLING);
mPollingPaused = false;
new ApplyRoutingTask().execute();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumePolling
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
resumePolling
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reloadIgnoringCache(boolean checkForRepost) {
mAccessibilityInjector.addOrRemoveAccessibilityApisIfNecessary();
if (mNativeContentViewCore != 0) {
nativeReloadIgnoringCache(mNativeContentViewCore, checkForRepost);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reloadIgnoringCache
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
|
reloadIgnoringCache
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void batteryNeedsCpuUpdate() {
updateCpuStatsNow();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: batteryNeedsCpuUpdate
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
|
batteryNeedsCpuUpdate
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void startMonitoring(String iface) {
if (mVerboseLoggingEnabled) Log.d(TAG, "startMonitoring(" + iface + ")");
setMonitoring(iface, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startMonitoring
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
startMonitoring
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleTimeout() {
Slog.e(TAG, "Timeout restoring application " + mCurrentPackage.packageName);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
mCurrentPackage.packageName, "restore timeout");
// Handle like an agent that threw on invocation: wipe it and go on to the next
keyValueAgentErrorCleanup();
executeNextState(UnifiedRestoreState.RUNNING_QUEUE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleTimeout
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
handleTimeout
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.