instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<String> getExecuteIds() {
assertNotReleased();
if (executeIds != null) {
return executeIds;
}
executeIds = populatePhaseClientIds(PARTIAL_EXECUTE_PARAM);
// include the view parameter facet ID if there are other execute IDs
// to process
if (!executeIds.isEmpty()) {
UIViewRoot root = ctx.getViewRoot();
if (root.getFacetCount() > 0) {
if (root.getFacet(UIViewRoot.METADATA_FACET_NAME) != null) {
executeIds.add(0, UIViewRoot.METADATA_FACET_NAME);
}
}
}
return executeIds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExecuteIds
File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-17091
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
getExecuteIds
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void createBaloFileDirectory(Path fullPathToStoreBalo) {
try {
Files.createDirectory(fullPathToStoreBalo);
} catch (IOException e) {
createError("error creating directory for balo file");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBaloFileDirectory
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
createBaloFileDirectory
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BigDecimal getDecimalValue() throws IOException
{
if ((_numTypesValid & NR_BIGDECIMAL) == 0) {
if (_numTypesValid == NR_UNKNOWN) {
_checkNumericValue(NR_BIGDECIMAL);
}
if ((_numTypesValid & NR_BIGDECIMAL) == 0) {
convertNumberToBigDecimal();
}
}
return _numberBigDecimal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDecimalValue
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
getDecimalValue
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void zipFolderAPKTool(String srcFolder, String destZipFile) throws Exception {
try (FileOutputStream fileWriter = new FileOutputStream(destZipFile);
ZipOutputStream zip = new ZipOutputStream(fileWriter)){
addFolderToZipAPKTool("", srcFolder, zip);
zip.flush();
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-21675
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Mitigate Zip Slip exlpoit
Function: zipFolderAPKTool
File: src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
Repository: Konloch/bytecode-viewer
Fixed Code:
public static void zipFolderAPKTool(String srcFolder, String destZipFile) throws Exception {
try (FileOutputStream fileWriter = new FileOutputStream(destZipFile);
ZipOutputStream zip = new ZipOutputStream(fileWriter)) {
addFolderToZipAPKTool("", srcFolder, zip);
zip.flush();
}
}
|
[
"CWE-22"
] |
CVE-2022-21675
|
MEDIUM
| 6.8
|
Konloch/bytecode-viewer
|
zipFolderAPKTool
|
src/main/java/the/bytecode/club/bytecodeviewer/util/ZipUtils.java
|
c968e94b2c93da434a4ecfac6d08eda162d615d0
| 1
|
Analyze the following code function for security vulnerabilities
|
void setServletOutputStream(ServletOutputStream servletOutputStream) {
this.servletOutputStream = servletOutputStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServletOutputStream
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
|
setServletOutputStream
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressLint("SdCardPath")
private void startNewUpload(
User user,
List<String> requestedUploads,
boolean onWifiOnly,
boolean whileChargingOnly,
NameCollisionPolicy nameCollisionPolicy,
int localAction,
boolean isCreateRemoteFolder,
int createdBy,
OCFile file,
boolean disableRetries
) {
if (file.getStoragePath().startsWith("/data/data/")) {
Log_OC.d(TAG, "Upload from sensitive path is not allowed");
return;
}
OCUpload ocUpload = new OCUpload(file, user);
ocUpload.setFileSize(file.getFileLength());
ocUpload.setNameCollisionPolicy(nameCollisionPolicy);
ocUpload.setCreateRemoteFolder(isCreateRemoteFolder);
ocUpload.setCreatedBy(createdBy);
ocUpload.setLocalAction(localAction);
ocUpload.setUseWifiOnly(onWifiOnly);
ocUpload.setWhileChargingOnly(whileChargingOnly);
ocUpload.setUploadStatus(UploadStatus.UPLOAD_IN_PROGRESS);
UploadFileOperation newUpload = new UploadFileOperation(
mUploadsStorageManager,
connectivityService,
powerManagementService,
user,
file,
ocUpload,
nameCollisionPolicy,
localAction,
this,
onWifiOnly,
whileChargingOnly,
disableRetries,
new FileDataStorageManager(user, getContentResolver())
);
newUpload.setCreatedBy(createdBy);
if (isCreateRemoteFolder) {
newUpload.setRemoteFolderToBeCreated();
}
newUpload.addDataTransferProgressListener(this);
newUpload.addDataTransferProgressListener((FileUploaderBinder) mBinder);
newUpload.addRenameUploadListener(this);
Pair<String, String> putResult = mPendingUploads.putIfAbsent(
user.getAccountName(),
file.getRemotePath(),
newUpload
);
if (putResult != null) {
requestedUploads.add(putResult.first);
// Save upload in database
long id = mUploadsStorageManager.storeUpload(ocUpload);
newUpload.setOCUploadId(id);
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-39210
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Don't accept uris to upload from external apps if they contain this app's package name
Prevent leaks of files in this app's storage
Co-authored-by: Tobias Kaminsky <tobias@kaminsky.me>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Function: startNewUpload
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
Fixed Code:
@SuppressLint("SdCardPath")
private void startNewUpload(
User user,
List<String> requestedUploads,
boolean onWifiOnly,
boolean whileChargingOnly,
NameCollisionPolicy nameCollisionPolicy,
int localAction,
boolean isCreateRemoteFolder,
int createdBy,
OCFile file,
boolean disableRetries
) {
OCUpload ocUpload = new OCUpload(file, user);
ocUpload.setFileSize(file.getFileLength());
ocUpload.setNameCollisionPolicy(nameCollisionPolicy);
ocUpload.setCreateRemoteFolder(isCreateRemoteFolder);
ocUpload.setCreatedBy(createdBy);
ocUpload.setLocalAction(localAction);
ocUpload.setUseWifiOnly(onWifiOnly);
ocUpload.setWhileChargingOnly(whileChargingOnly);
ocUpload.setUploadStatus(UploadStatus.UPLOAD_IN_PROGRESS);
UploadFileOperation newUpload = new UploadFileOperation(
mUploadsStorageManager,
connectivityService,
powerManagementService,
user,
file,
ocUpload,
nameCollisionPolicy,
localAction,
this,
onWifiOnly,
whileChargingOnly,
disableRetries,
new FileDataStorageManager(user, getContentResolver())
);
newUpload.setCreatedBy(createdBy);
if (isCreateRemoteFolder) {
newUpload.setRemoteFolderToBeCreated();
}
newUpload.addDataTransferProgressListener(this);
newUpload.addDataTransferProgressListener((FileUploaderBinder) mBinder);
newUpload.addRenameUploadListener(this);
Pair<String, String> putResult = mPendingUploads.putIfAbsent(
user.getAccountName(),
file.getRemotePath(),
newUpload
);
if (putResult != null) {
requestedUploads.add(putResult.first);
// Save upload in database
long id = mUploadsStorageManager.storeUpload(ocUpload);
newUpload.setOCUploadId(id);
}
}
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
startNewUpload
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 1
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateLong(@Positive int columnIndex, long x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLong
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
|
updateLong
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onInitialize() {
super.onInitialize();
IModel<String> valueModel = new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getUser().getAccessToken();
}
};
add(new TextField<String>("value", valueModel) {
@Override
protected String[] getInputTypes() {
return new String[] {"password"};
}
});
add(new CopyToClipboardLink("copy", valueModel));
add(new Link<Void>("regenerate") {
@Override
public void onClick() {
getUser().setAccessToken(RandomStringUtils.randomAlphanumeric(User.ACCESS_TOKEN_LEN));
OneDev.getInstance(UserManager.class).save(getUser());
Session.get().success("Access token regenerated");
setResponsePage(getPage());
}
}.add(new ConfirmClickModifier("This will invalidate current token and generate a new one, do you want to continue?")));
}
|
Vulnerability Classification:
- CWE: CWE-338
- CVE: CVE-2023-24828
- Severity: HIGH
- CVSS Score: 8.8
Description: Fix issue #1179 - OneDev should use crypto strong random string for access token and password reset
Function: onInitialize
File: server-core/src/main/java/io/onedev/server/web/component/user/accesstoken/AccessTokenPanel.java
Repository: theonedev/onedev
Fixed Code:
@Override
protected void onInitialize() {
super.onInitialize();
IModel<String> valueModel = new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getUser().getAccessToken();
}
};
add(new TextField<String>("value", valueModel) {
@Override
protected String[] getInputTypes() {
return new String[] {"password"};
}
});
add(new CopyToClipboardLink("copy", valueModel));
add(new Link<Void>("regenerate") {
@Override
public void onClick() {
getUser().setAccessToken(CryptoUtils.generateSecret());
OneDev.getInstance(UserManager.class).save(getUser());
Session.get().success("Access token regenerated");
setResponsePage(getPage());
}
}.add(new ConfirmClickModifier("This will invalidate current token and generate a new one, do you want to continue?")));
}
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
onInitialize
|
server-core/src/main/java/io/onedev/server/web/component/user/accesstoken/AccessTokenPanel.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 1
|
Analyze the following code function for security vulnerabilities
|
UsageStatsManagerInternal getUsageStatsManagerInternal() {
return LocalServices.getService(UsageStatsManagerInternal.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUsageStatsManagerInternal
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
|
getUsageStatsManagerInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setDefaultAttribute(Channel channel, Object o) {
channel.attr(DEFAULT_ATTRIBUTE).set(o);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultAttribute
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setDefaultAttribute
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean bindBackupAgent(String packageName, int backupMode, int userId) {
if (DEBUG_BACKUP) Slog.v(TAG, "bindBackupAgent: app=" + packageName + " mode=" + backupMode);
enforceCallingPermission("android.permission.CONFIRM_FULL_BACKUP", "bindBackupAgent");
IPackageManager pm = AppGlobals.getPackageManager();
ApplicationInfo app = null;
try {
app = pm.getApplicationInfo(packageName, STOCK_PM_FLAGS, userId);
} catch (RemoteException e) {
// can't happen; package manager is process-local
}
if (app == null) {
Slog.w(TAG, "Unable to bind backup agent for " + packageName);
return false;
}
int oldBackupUid;
int newBackupUid;
synchronized(this) {
// !!! TODO: currently no check here that we're already bound
BatteryStatsImpl.Uid.Pkg.Serv ss = null;
BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
synchronized (stats) {
ss = stats.getServiceStatsLocked(app.uid, app.packageName, app.name);
}
// Backup agent is now in use, its package can't be stopped.
try {
AppGlobals.getPackageManager().setPackageStoppedState(
app.packageName, false, UserHandle.getUserId(app.uid));
} catch (RemoteException e) {
} catch (IllegalArgumentException e) {
Slog.w(TAG, "Failed trying to unstop package "
+ app.packageName + ": " + e);
}
BackupRecord r = new BackupRecord(ss, app, backupMode);
ComponentName hostingName =
(backupMode == ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL)
? new ComponentName(app.packageName, app.backupAgentName)
: new ComponentName("android", "FullBackupAgent");
// startProcessLocked() returns existing proc's record if it's already running
ProcessRecord proc = startProcessLocked(app.processName, app,
false, 0, "backup", hostingName, false, false, false);
if (proc == null) {
Slog.e(TAG, "Unable to start backup agent process " + r);
return false;
}
// If the app is a regular app (uid >= 10000) and not the system server or phone
// process, etc, then mark it as being in full backup so that certain calls to the
// process can be blocked. This is not reset to false anywhere because we kill the
// process after the full backup is done and the ProcessRecord will vaporize anyway.
if (UserHandle.isApp(app.uid) &&
backupMode == ApplicationThreadConstants.BACKUP_MODE_FULL) {
proc.inFullBackup = true;
}
r.app = proc;
oldBackupUid = mBackupTarget != null ? mBackupTarget.appInfo.uid : -1;
newBackupUid = proc.inFullBackup ? r.appInfo.uid : -1;
mBackupTarget = r;
mBackupAppName = app.packageName;
// Try not to kill the process during backup
updateOomAdjLocked(proc, true);
// If the process is already attached, schedule the creation of the backup agent now.
// If it is not yet live, this will be done when it attaches to the framework.
if (proc.thread != null) {
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "Agent proc already running: " + proc);
try {
proc.thread.scheduleCreateBackupAgent(app,
compatibilityInfoForPackageLocked(app), backupMode);
} catch (RemoteException e) {
// Will time out on the backup manager side
}
} else {
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "Agent proc not running, waiting for attach");
}
// Invariants: at this point, the target app process exists and the application
// is either already running or in the process of coming up. mBackupTarget and
// mBackupAppName describe the app, so that when it binds back to the AM we
// know that it's scheduled for a backup-agent operation.
}
JobSchedulerInternal js = LocalServices.getService(JobSchedulerInternal.class);
if (oldBackupUid != -1) {
js.removeBackingUpUid(oldBackupUid);
}
if (newBackupUid != -1) {
js.addBackingUpUid(newBackupUid);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindBackupAgent
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
|
bindBackupAgent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public long insertWithOnConflict(String table, String nullColumnHack,
ContentValues initialValues, int conflictAlgorithm) {
acquireReference();
try {
StringBuilder sql = new StringBuilder();
sql.append("INSERT");
sql.append(CONFLICT_VALUES[conflictAlgorithm]);
sql.append(" INTO ");
sql.append(table);
sql.append('(');
Object[] bindArgs = null;
int size = (initialValues != null && !initialValues.isEmpty())
? initialValues.size() : 0;
if (size > 0) {
bindArgs = new Object[size];
int i = 0;
for (String colName : initialValues.keySet()) {
sql.append((i > 0) ? "," : "");
sql.append(colName);
bindArgs[i++] = initialValues.get(colName);
}
sql.append(')');
sql.append(" VALUES (");
for (i = 0; i < size; i++) {
sql.append((i > 0) ? ",?" : "?");
}
} else {
sql.append(nullColumnHack + ") VALUES (NULL");
}
sql.append(')');
SQLiteStatement statement = new SQLiteStatement(this, sql.toString(), bindArgs);
try {
return statement.executeInsert();
} finally {
statement.close();
}
} finally {
releaseReference();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertWithOnConflict
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
insertWithOnConflict
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setJMSDeliveryMode(int deliveryMode) throws JMSException {
this.setIntProperty(JMS_MESSAGE_DELIVERY_MODE, deliveryMode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setJMSDeliveryMode
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
setJMSDeliveryMode
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOnlineHelpUriCustom(String uri) {
m_onlineHelpUriCustom = uri;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOnlineHelpUriCustom
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
setOnlineHelpUriCustom
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull Bundle clone(@Nullable Bundle in) {
return (in != null) ? new Bundle(in) : new Bundle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clone
File: services/core/java/com/android/server/pm/UserRestrictionsUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
clone
|
services/core/java/com/android/server/pm/UserRestrictionsUtils.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean post(Runnable action) {
if (mSkipPost) {
action.run();
return true;
} else {
return super.post(action);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: post
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
post
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean startSipService(SipManager sipManager, Context context, boolean isReceivingCalls) {
if (VERBOSE) log("startSipService, profile: " + mProfile);
try {
// Stop the Sip service for the profile if it is already running. This is important
// if we are changing the state of the "receive calls" option.
sipManager.close(mProfile.getUriString());
// Start the sip service for the profile.
if (isReceivingCalls) {
sipManager.open(
mProfile,
SipUtil.createIncomingCallPendingIntent(context,
mProfile.getUriString()),
null);
} else {
sipManager.open(mProfile);
}
return true;
} catch (SipException e) {
log("startSipService, profile: " + mProfile.getProfileName() +
", exception: " + e);
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-0847
- Severity: HIGH
- CVSS Score: 7.2
Description: Fixes creation of incorrect SIP PhoneAccountHandle
When a new incoming call occurs in SIP, SipUtil mistakenly uses the
Uri handle instead of the profile name to create the
PhoneAccountHandle. Since this PhoneAccountHandle is not registered
with telecom, it will throw a security exception (as of b/26864502).
BUG: 26874216
Change-Id: I27611b45f0834fca328c4cc2b867edaf970f7171
Function: startSipService
File: sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
Repository: android
Fixed Code:
boolean startSipService(SipManager sipManager, Context context, boolean isReceivingCalls) {
if (VERBOSE) log("startSipService, profile: " + mProfile);
try {
// Stop the Sip service for the profile if it is already running. This is important
// if we are changing the state of the "receive calls" option.
sipManager.close(mProfile.getUriString());
// Start the sip service for the profile.
if (isReceivingCalls) {
sipManager.open(
mProfile,
SipUtil.createIncomingCallPendingIntent(context,
mProfile.getProfileName()),
null);
} else {
sipManager.open(mProfile);
}
return true;
} catch (SipException e) {
log("startSipService, profile: " + mProfile.getProfileName() +
", exception: " + e);
}
return false;
}
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
startSipService
|
sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
|
a294ae5342410431a568126183efe86261668b5d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean containsFloat(CharSequence name, float value) {
return contains(name, String.valueOf(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsFloat
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
containsFloat
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] shuffle(long[] input) throws IOException {
byte[] output = new byte[input.length * 8];
int numProcessed = impl.shuffle(input, 0, 8, input.length * 8, output, 0);
assert(numProcessed == input.length * 8);
return output;
}
|
Vulnerability Classification:
- CWE: CWE-190
- CVE: CVE-2023-34453
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-pqr6-cmr2-h8hf
* Fixed integer overflow by checking if multiplication result is smaller than original value
* Fixed integer overflow by checking if multiplication result is smaller than original value
* Fixed integer overflow by checking if multiplication result is smaller than original value
* imporved error messages and added happy and sad cases for unit test in SnappyTest.java
* switched SnappyError into ILLEGAL_ARGUMENT in SnappyErrorCode.java and Snappy.java
* wrote new and updated unit test methods
* updated comments in SnappyTest.java
* Fixed and updated unit tests in SnappyTest.java
Function: shuffle
File: src/main/java/org/xerial/snappy/BitShuffle.java
Repository: xerial/snappy-java
Fixed Code:
public static byte[] shuffle(long[] input) throws IOException {
if (input.length * 8 < input.length) {
throw new SnappyError(SnappyErrorCode.TOO_LARGE_INPUT, "input array size is too large: " + input.length);
}
byte[] output = new byte[input.length * 8];
int numProcessed = impl.shuffle(input, 0, 8, input.length * 8, output, 0);
assert(numProcessed == input.length * 8);
return output;
}
|
[
"CWE-190"
] |
CVE-2023-34453
|
HIGH
| 7.5
|
xerial/snappy-java
|
shuffle
|
src/main/java/org/xerial/snappy/BitShuffle.java
|
820e2e074c58748b41dbd547f4edba9e108ad905
| 1
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
static Function<List<String>, ProcessBuilder> defaultProcessBuilderFactory(
String dockerExecutable, ImmutableMap<String, String> dockerEnvironment) {
return dockerSubCommand -> {
List<String> dockerCommand = new ArrayList<>(1 + dockerSubCommand.size());
dockerCommand.add(dockerExecutable);
dockerCommand.addAll(dockerSubCommand);
ProcessBuilder processBuilder = new ProcessBuilder(dockerCommand);
Map<String, String> environment = processBuilder.environment();
environment.putAll(dockerEnvironment);
return processBuilder;
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultProcessBuilderFactory
File: jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
Repository: GoogleContainerTools/jib
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-25914
|
CRITICAL
| 9.8
|
GoogleContainerTools/jib
|
defaultProcessBuilderFactory
|
jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
|
67fa40bc2c484da0546333914ea07a89fe44eaaf
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isResponsePublisher(ReturnType<?> genericReturnType, Class<?> javaReturnType) {
return Publishers.isConvertibleToPublisher(javaReturnType) && genericReturnType.getFirstTypeVariable().map(arg -> HttpResponse.class.isAssignableFrom(arg.getType())).orElse(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResponsePublisher
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
isResponsePublisher
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean allDrawnStatesConsidered() {
for (int i = mChildren.size() - 1; i >= 0; --i) {
final WindowState child = mChildren.get(i);
if (child.mightAffectAllDrawn() && !child.getDrawnStateEvaluated()) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allDrawnStatesConsidered
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
|
allDrawnStatesConsidered
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNegative int findColumn(String columnName) throws SQLException {
checkClosed();
int col = findColumnIndex(columnName);
if (col == 0) {
throw new PSQLException(
GT.tr("The column name {0} was not found in this ResultSet.", columnName),
PSQLState.UNDEFINED_COLUMN);
}
return col;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findColumn
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
|
findColumn
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void packageDeleted(String packageName, int returnCode) throws RemoteException {
synchronized (mDone) {
mResult = returnCode;
mDone.set(true);
mDone.notifyAll();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: packageDeleted
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
|
packageDeleted
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
ResponseEntity proxyForGet(String url, Class responseEntityClazz);
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2022-23544
- Severity: MEDIUM
- CVSS Score: 6.1
Description: fix(测试跟踪): 缺陷平台请求转发添加白名单
Function: proxyForGet
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
Fixed Code:
ResponseEntity proxyForGet(String path, Class responseEntityClazz);
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
proxyForGet
|
framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int hash = 5;
hash = 83 * hash + (this.addr != null ? this.addr.hashCode() : 0);
hash = 83 * hash + (this.note != null ? this.note.hashCode() : 0);
return hash;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: core/src/main/java/hudson/model/Cause.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2067
|
LOW
| 3.5
|
jenkinsci/jenkins
|
hashCode
|
core/src/main/java/hudson/model/Cause.java
|
5d57c855f3147bfc5e7fda9252317b428a700014
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setClearCacheMode(String clearCacheMode) {
logger.trace("setClearCacheMode: {}", clearCacheMode);
this.clearCacheMode = clearCacheMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClearCacheMode
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setClearCacheMode
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEditURL(String action, String mode, String language, XWikiContext context)
{
StringBuilder editparams = new StringBuilder();
if (!mode.equals("")) {
editparams.append("xpage=");
editparams.append(mode);
}
if (!language.equals("")) {
if (!mode.equals("")) {
editparams.append("&");
}
editparams.append("language=");
editparams.append(language);
}
return getURL(action, editparams.toString(), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getEditURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public double getDouble(String columnName) throws SQLException {
return getDouble(findColumn(columnName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDouble
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
|
getDouble
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void installSystemProviders() {
mSettingsObserver = new SettingObserver();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installSystemProviders
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
installSystemProviders
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@SystemApi
@RequiresPermission(Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS)
public void startOneTimePermissionSession(@NonNull String packageName, long timeoutMillis,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToResetTimer,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToKeepSessionAlive) {
startOneTimePermissionSession(packageName, timeoutMillis, -1,
importanceToResetTimer, importanceToKeepSessionAlive);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startOneTimePermissionSession
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
startOneTimePermissionSession
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract String getMimeType(String resourceName);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMimeType
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
|
getMimeType
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected GridState getState(boolean markAsDirty) {
return (GridState) super.getState(markAsDirty);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
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
|
getState
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Set<Entry<DocumentReference, List<BaseObject>>> entrySet()
{
return (Set) xObjects.entrySet();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: entrySet
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
entrySet
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
void refreshSettingsCache() {
mCoreSettingsObserver.onChange(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refreshSettingsCache
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
|
refreshSettingsCache
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getTimeout() {
return timeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimeout
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
getTimeout
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getValue()
{
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: ext/java/nokogiri/Html4SaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
getValue
|
ext/java/nokogiri/Html4SaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
private String extractSvgStyle() {
final Pattern p = Pattern.compile("(?i)\\<svg[^>]+style=\"([^\">]+)\"");
final Matcher m = p.matcher(svg);
if (m.find()) {
return m.group(1);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractSvgStyle
File: src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-1231
|
MEDIUM
| 4.3
|
plantuml
|
extractSvgStyle
|
src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
|
c9137be051ce98b3e3e27f65f54ec7d9f8886903
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void displayEdit(StringBuffer buffer, String name, String prefix, BaseCollection object,
XWikiContext context)
{
String editorType = getEditorType(context);
EditorManager editorManager = Utils.getComponent(EditorManager.class);
Editor<SyntaxContent> editor = editorManager.getDefaultEditor(SyntaxContent.class, editorType);
XWikiDocument ownerDocument = getObjectDocument(object, context);
Map<String, Object> parameters = new HashMap<>();
String fieldName = prefix + name;
parameters.put("id", fieldName);
parameters.put("name", fieldName);
parameters.put("cols", getSize());
parameters.put("rows", getRows());
parameters.put("disabled", isDisabled());
parameters.put("restricted", isRestricted() || (ownerDocument != null && ownerDocument.isRestricted()));
parameters.put("sourceDocumentReference", object.getDocumentReference());
Syntax syntax = null;
String contentType = getContentType();
// We set the syntax by first checking the content type: if it's pure text or velocity code
// the syntax is necessarily plain syntax.
// Else we check if the wanted editor is puretext: in such case we also consider that the syntax is plain/text
// finally we fallback on actual document syntax.
// FIXME: if the content type is WIKI_TEXT we should probably force the syntax to Wiki syntax, but which one:
// 2.0, 2.1?
if (StringUtils.equalsIgnoreCase(ContentType.PURE_TEXT.toString(), contentType)
|| StringUtils.equalsIgnoreCase(ContentType.VELOCITY_CODE.toString(), contentType))
{
syntax = Syntax.PLAIN_1_0;
} else {
syntax = "puretext".equals(editorType) ? Syntax.PLAIN_1_0 : getObjectDocumentSyntax(object, context);
}
SyntaxContent syntaxContent = new SyntaxContent(object.getStringValue(name), syntax);
try {
buffer.append(editor.render(syntaxContent, parameters));
} catch (EditException e) {
LOGGER.error("Failed to display the text area property.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayEdit
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-41046
|
MEDIUM
| 6.3
|
xwiki/xwiki-platform
|
displayEdit
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
|
edc52579eeaab1b4514785c134044671a1ecd839
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserId() {
return userId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserId
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
getUserId
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onFocusTaskChanged(ActivityManager.RunningTaskInfo taskInfo) {
final boolean isSplitScreen = mSplitScreenControllerOptional.isPresent()
&& mSplitScreenControllerOptional.get().isTaskInSplitScreen(taskInfo.taskId);
mFocusedTaskAllowSplitScreen = isSplitScreen
|| (taskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
&& taskInfo.supportsSplitScreenMultiWindow
&& taskInfo.topActivityType != WindowConfiguration.ACTIVITY_TYPE_HOME);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFocusTaskChanged
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
onFocusTaskChanged
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processConnectionError(ConnectionError error) throws Exception {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processConnectionError
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
|
processConnectionError
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleDisplayAdded(int displayId) {
synchronized (mWindowMap) {
final Display display = mDisplayManager.getDisplay(displayId);
if (display != null) {
createDisplayContentLocked(display);
displayReady(displayId);
}
requestTraversalLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleDisplayAdded
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
|
handleDisplayAdded
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getAllResponseHeaders(URLConnection c) {
int idx = 0;
String value;
StringBuilder buf = new StringBuilder();
while ((value = c.getHeaderField(idx)) != null) {
String key = c.getHeaderFieldKey(idx);
buf.append(key);
buf.append(": ");
buf.append(value);
idx++;
}
return buf.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllResponseHeaders
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getAllResponseHeaders
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = FONTS_URL)
@ResponseBody
public final String listAvailableFonts() {
MDC.remove(Processor.MDC_JOB_ID_KEY);
final JSONArray availableFonts = new JSONArray();
final List<FontFamily> families =
ExtensionsEnvironment.getExtensionsRegistry().getExtensions(FontFamily.class);
for (FontFamily family: families) {
availableFonts.put(family.getName());
}
return availableFonts.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listAvailableFonts
File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
Repository: mapfish/mapfish-print
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-15231
|
MEDIUM
| 4.3
|
mapfish/mapfish-print
|
listAvailableFonts
|
core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
|
89155f2506b9cee822e15ce60ccae390a1419d5e
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
private Account[] filterAccounts(UserAccounts accounts, Account[] unfiltered, int callingUid,
@Nullable String callingPackage, boolean includeManagedNotVisible) {
String visibilityFilterPackage = callingPackage;
if (visibilityFilterPackage == null) {
visibilityFilterPackage = getPackageNameForUid(callingUid);
}
Map<Account, Integer> firstPass = new LinkedHashMap<>();
for (Account account : unfiltered) {
int visibility = resolveAccountVisibility(account, visibilityFilterPackage, accounts);
if ((visibility == AccountManager.VISIBILITY_VISIBLE
|| visibility == AccountManager.VISIBILITY_USER_MANAGED_VISIBLE)
|| (includeManagedNotVisible
&& (visibility
== AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE))) {
firstPass.put(account, visibility);
}
}
Map<Account, Integer> secondPass =
filterSharedAccounts(accounts, firstPass, callingUid, callingPackage);
Account[] filtered = new Account[secondPass.size()];
filtered = secondPass.keySet().toArray(filtered);
return filtered;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterAccounts
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
|
filterAccounts
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
OpenSSLSessionImpl setupSession(long sslSessionNativePointer, long sslNativePointer,
final OpenSSLSessionImpl sessionToReuse, String hostname, int port,
boolean handshakeCompleted) throws IOException {
OpenSSLSessionImpl sslSession = null;
byte[] sessionId = NativeCrypto.SSL_SESSION_session_id(sslSessionNativePointer);
if (sessionToReuse != null && Arrays.equals(sessionToReuse.getId(), sessionId)) {
sslSession = sessionToReuse;
sslSession.lastAccessedTime = System.currentTimeMillis();
NativeCrypto.SSL_SESSION_free(sslSessionNativePointer);
} else {
if (!getEnableSessionCreation()) {
// Should have been prevented by
// NativeCrypto.SSL_set_session_creation_enabled
throw new IllegalStateException("SSL Session may not be created");
}
X509Certificate[] localCertificates = createCertChain(NativeCrypto
.SSL_get_certificate(sslNativePointer));
X509Certificate[] peerCertificates = createCertChain(NativeCrypto
.SSL_get_peer_cert_chain(sslNativePointer));
sslSession = new OpenSSLSessionImpl(sslSessionNativePointer, localCertificates,
peerCertificates, hostname, port, getSessionContext());
// if not, putSession later in handshakeCompleted() callback
if (handshakeCompleted) {
getSessionContext().putSession(sslSession);
}
}
return sslSession;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3840
- Severity: HIGH
- CVSS Score: 10.0
Description: Use SSL_session_reused to check when a session was reused
The returned session_id could be exactly the same in the case of TLS
session tickets, so use the SSL_session_reused API to determine exactly
when a session was reused.
(cherry picked from commit 1115fa0f6dbbff3a913fbce39ca98f9a78425c72)
Bug: 28751153
Change-Id: Ie82e4d1bb326d7e7deb7981a1e57df393f6c0e1f
Function: setupSession
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
Fixed Code:
OpenSSLSessionImpl setupSession(long sslSessionNativePointer, long sslNativePointer,
final OpenSSLSessionImpl sessionToReuse, String hostname, int port,
boolean handshakeCompleted) throws IOException {
OpenSSLSessionImpl sslSession = null;
if (sessionToReuse != null && NativeCrypto.SSL_session_reused(sslNativePointer)) {
sslSession = sessionToReuse;
sslSession.lastAccessedTime = System.currentTimeMillis();
NativeCrypto.SSL_SESSION_free(sslSessionNativePointer);
} else {
if (!getEnableSessionCreation()) {
// Should have been prevented by
// NativeCrypto.SSL_set_session_creation_enabled
throw new IllegalStateException("SSL Session may not be created");
}
X509Certificate[] localCertificates = createCertChain(NativeCrypto
.SSL_get_certificate(sslNativePointer));
X509Certificate[] peerCertificates = createCertChain(NativeCrypto
.SSL_get_peer_cert_chain(sslNativePointer));
sslSession = new OpenSSLSessionImpl(sslSessionNativePointer, localCertificates,
peerCertificates, hostname, port, getSessionContext());
// if not, putSession later in handshakeCompleted() callback
if (handshakeCompleted) {
getSessionContext().putSession(sslSession);
}
}
return sslSession;
}
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
setupSession
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 1
|
Analyze the following code function for security vulnerabilities
|
public String dialogHead(String title) {
return "<div class=\"dialoghead\" unselectable=\"on\">" + (title == null ? "" : title) + "</div>";
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2013-4600
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fixed some XSS problems (github issue #173)
Function: dialogHead
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
Fixed Code:
public String dialogHead(String title) {
String escapedTitle;
if (title == null) {
escapedTitle = "";
} else {
escapedTitle = CmsEncoder.escapeHtml(title);
}
return "<div class=\"dialoghead\" unselectable=\"on\">" + escapedTitle + "</div>";
}
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogHead
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 1
|
Analyze the following code function for security vulnerabilities
|
public static final int myTid() {
return Os.gettid();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: myTid
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
myTid
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ComponentName getHomeActivityForUser(int userId) {
synchronized (mGlobalLock) {
final ActivityRecord homeActivity =
mRootWindowContainer.getDefaultDisplayHomeActivityForUser(userId);
return homeActivity == null ? null : homeActivity.mActivityComponent;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeActivityForUser
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getHomeActivityForUser
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPermissions(final Collection<Permission> perms) {
for (final Permission perm : perms) {
addPermission(perm);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermissions
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
addPermissions
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeRepository(String projectName, String repositoryName,
AsyncMethodCallback resultHandler) {
// HTTP v1 API will return '403 forbidden' in this case, but we deal it as '400 bad request' here.
if (isReservedRepoName(repositoryName)) {
resultHandler.onError(convert(RESERVED_REPOSITORY_EXCEPTION));
return;
}
handleAsVoidResult(executor.execute(Command.removeRepository(SYSTEM, projectName, repositoryName))
.thenCompose(unused -> mds.removeRepo(SYSTEM, projectName, repositoryName)),
resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeRepository
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
removeRepository
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull XmlResourceParser openXmlResourceParser(@NonNull String fileName)
throws IOException {
return openXmlResourceParser(0, fileName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openXmlResourceParser
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
openXmlResourceParser
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Bitmap getTaskDescriptionIcon(String filePath, int userId) {
if (userId != UserHandle.getCallingUserId()) {
enforceCallingPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
"getTaskDescriptionIcon");
}
final File passedIconFile = new File(filePath);
final File legitIconFile = new File(TaskPersister.getUserImagesDir(userId),
passedIconFile.getName());
if (!legitIconFile.getPath().equals(filePath)
|| !filePath.contains(ActivityRecord.ACTIVITY_ICON_SUFFIX)) {
throw new IllegalArgumentException("Bad file path: " + filePath
+ " passed for userId " + userId);
}
return mRecentTasks.getTaskDescriptionIcon(filePath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskDescriptionIcon
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
getTaskDescriptionIcon
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<Contentlet> findContentletsByHost(String hostId, int limit, int offset) throws DotDataException {
try {
SearchResponse response = createRequest(client.getClient(), "+conhost:"+hostId).
setSize(limit).setFrom(offset).addFields("inode","identifier").execute()
.actionGet();
SearchHits hits = response.getHits();
List<Contentlet> cons = new ArrayList<Contentlet>();
for (int i = 0; i < hits.getHits().length; i++) {
try {
cons.add(find(hits.getAt(i).field("inode").getValue().toString()));
} catch (Exception e) {
throw new ElasticsearchException(e.getMessage(),e);
}
}
return cons;
} catch (Exception e) {
throw new ElasticsearchException(e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findContentletsByHost
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
findContentletsByHost
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAckExtensionEnabled(boolean value) {
_ackExtensionEnabled = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAckExtensionEnabled
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
setAckExtensionEnabled
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static Traverser<File> fileTraverser() {
return Traverser.forTree(FILE_TREE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fileTraverser
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
fileTraverser
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
public Enumeration getNames() {
return servletContext.getInitParameterNames();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNames
File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
getNames
|
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isStatusBarDisabled() {
throwIfParentInstance("isStatusBarDisabled");
try {
return mService.isStatusBarDisabled(mContext.getPackageName());
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isStatusBarDisabled
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
|
isStatusBarDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void inspectCompNodes(Element root,
List<String> attrValuesList) {
assert (root != null);
assert (attrValuesList != null);
assert (attrValuesList.isEmpty());
for (Element circElt : XmlIterator.forChildElements(root, "circuit")) {
// In circuits, we have to look for components, then take
// just those components that do have a lib attribute and look at
// their
// a child nodes
for (Element compElt : XmlIterator
.forChildElements(circElt, "comp")) {
if (compElt.hasAttribute("lib")) {
for (Element attrElt : XmlIterator.forChildElements(
compElt, "a")) {
if (attrElt.hasAttribute("name")) {
String aName = attrElt.getAttribute("name");
if (aName.equals("label")) {
String label = attrElt.getAttribute("val");
if (label.length() > 0) {
attrValuesList.add(label);
}
}
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inspectCompNodes
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
inspectCompNodes
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void sendError(PrintWriter out, String msg) throws ServletException, IOException {
out.println("<div class=\"error\">" + msg + "</div>");
out.flush();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendError
File: src/main/java/com/openkm/servlet/admin/BaseServlet.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-3628
|
LOW
| 3.5
|
openkm/document-management-system
|
sendError
|
src/main/java/com/openkm/servlet/admin/BaseServlet.java
|
c96f2e33adab3bbf550977b1b62acaa54f86fa03
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@InlineMe(
replacement = "Files.asCharSource(from, charset).copyTo(to)",
imports = "com.google.common.io.Files")
public
static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
copy
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
final void enqueueUidChangeLocked(UidRecord uidRec, int uid, int change) {
final UidRecord.ChangeItem pendingChange;
if (uidRec == null || uidRec.pendingChange == null) {
if (mPendingUidChanges.size() == 0) {
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"*** Enqueueing dispatch uid changed!");
mUiHandler.obtainMessage(DISPATCH_UIDS_CHANGED_UI_MSG).sendToTarget();
}
final int NA = mAvailUidChanges.size();
if (NA > 0) {
pendingChange = mAvailUidChanges.remove(NA-1);
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"Retrieving available item: " + pendingChange);
} else {
pendingChange = new UidRecord.ChangeItem();
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"Allocating new item: " + pendingChange);
}
if (uidRec != null) {
uidRec.pendingChange = pendingChange;
if ((change & UidRecord.CHANGE_GONE) != 0 && !uidRec.idle) {
// If this uid is going away, and we haven't yet reported it is gone,
// then do so now.
change |= UidRecord.CHANGE_IDLE;
}
} else if (uid < 0) {
throw new IllegalArgumentException("No UidRecord or uid");
}
pendingChange.uidRecord = uidRec;
pendingChange.uid = uidRec != null ? uidRec.uid : uid;
mPendingUidChanges.add(pendingChange);
} else {
pendingChange = uidRec.pendingChange;
// If there is no change in idle or active state, then keep whatever was pending.
if ((change & (UidRecord.CHANGE_IDLE | UidRecord.CHANGE_ACTIVE)) == 0) {
change |= (pendingChange.change & (UidRecord.CHANGE_IDLE
| UidRecord.CHANGE_ACTIVE));
}
// If there is no change in cached or uncached state, then keep whatever was pending.
if ((change & (UidRecord.CHANGE_CACHED | UidRecord.CHANGE_UNCACHED)) == 0) {
change |= (pendingChange.change & (UidRecord.CHANGE_CACHED
| UidRecord.CHANGE_UNCACHED));
}
// If this is a report of the UID being gone, then we shouldn't keep any previous
// report of it being active or cached. (That is, a gone uid is never active,
// and never cached.)
if ((change & UidRecord.CHANGE_GONE) != 0) {
change &= ~(UidRecord.CHANGE_ACTIVE | UidRecord.CHANGE_CACHED);
if (!uidRec.idle) {
// If this uid is going away, and we haven't yet reported it is gone,
// then do so now.
change |= UidRecord.CHANGE_IDLE;
}
}
}
pendingChange.change = change;
pendingChange.processState = uidRec != null
? uidRec.setProcState : ActivityManager.PROCESS_STATE_NONEXISTENT;
pendingChange.ephemeral = uidRec != null ? uidRec.ephemeral : isEphemeralLocked(uid);
pendingChange.procStateSeq = uidRec != null ? uidRec.curProcStateSeq : 0;
if (uidRec != null) {
uidRec.lastReportedChange = change;
uidRec.updateLastDispatchedProcStateSeq(change);
}
// Directly update the power manager, since we sit on top of it and it is critical
// it be kept in sync (so wake locks will be held as soon as appropriate).
if (mLocalPowerManager != null) {
// TO DO: dispatch cached/uncached changes here, so we don't need to report
// all proc state changes.
if ((change & UidRecord.CHANGE_ACTIVE) != 0) {
mLocalPowerManager.uidActive(pendingChange.uid);
}
if ((change & UidRecord.CHANGE_IDLE) != 0) {
mLocalPowerManager.uidIdle(pendingChange.uid);
}
if ((change & UidRecord.CHANGE_GONE) != 0) {
mLocalPowerManager.uidGone(pendingChange.uid);
} else {
mLocalPowerManager.updateUidProcState(pendingChange.uid,
pendingChange.processState);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enqueueUidChangeLocked
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
|
enqueueUidChangeLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void tlsAuthenticationGenerator(XmlGenerator gen, TlsAuthenticationConfig c) {
if (c == null) {
return;
}
XmlGenerator tlsGen = gen.open("tls", "roleAttribute", c.getRoleAttribute());
addClusterLoginElements(tlsGen, c)
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tlsAuthenticationGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
tlsAuthenticationGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public short getNodeType() {
return doc.getNodeType();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeType
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getNodeType
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setUsername(String username) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setUsername(username);
return this;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsername
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
|
setUsername
|
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
|
@Override
public void onChange(boolean selfChange, Collection<Uri> uris, int flags,
@UserIdInt int userId) {
for (Uri uri : uris) {
if (mFontScaleUri.equals(uri)) {
updateFontScaleIfNeeded(userId);
} else if (mHideErrorDialogsUri.equals(uri)) {
synchronized (mGlobalLock) {
updateShouldShowDialogsLocked(getGlobalConfiguration());
}
} else if (mFontWeightAdjustmentUri.equals(uri)) {
updateFontWeightAdjustmentIfNeeded(userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChange
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onChange
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean update(Revision revision, ConsoleOutputStreamConsumer outputStreamConsumer) {
CommandLine hg = hg("update", "--clean", "-r", revision.getRevision());
return execute(hg, outputStreamConsumer) == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
update
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String substitute(Pattern pattern, String text, I_CmsRegexSubstitution sub) {
StringBuffer buffer = new StringBuffer();
Matcher matcher = pattern.matcher(text);
while (matcher.find()) {
matcher.appendReplacement(buffer, sub.substituteMatch(text, matcher));
}
matcher.appendTail(buffer);
return buffer.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: substitute
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
|
substitute
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isIntentSenderTargetedToPackage(IIntentSender pendingResult) {
if (!(pendingResult instanceof PendingIntentRecord)) {
return false;
}
try {
PendingIntentRecord res = (PendingIntentRecord)pendingResult;
if (res.key.allIntents == null) {
return false;
}
for (int i=0; i<res.key.allIntents.length; i++) {
Intent intent = res.key.allIntents[i];
if (intent.getPackage() != null && intent.getComponent() != null) {
return false;
}
}
return true;
} catch (ClassCastException e) {
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIntentSenderTargetedToPackage
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
|
isIntentSenderTargetedToPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean shouldCreateCompatDisplayInsets() {
switch (info.supportsSizeChanges()) {
case SIZE_CHANGES_SUPPORTED_METADATA:
case SIZE_CHANGES_SUPPORTED_OVERRIDE:
return false;
case SIZE_CHANGES_UNSUPPORTED_OVERRIDE:
return true;
default:
// Fall through
}
if (inMultiWindowMode() || getWindowConfiguration().hasWindowDecorCaption()) {
final ActivityRecord root = task != null ? task.getRootActivity() : null;
if (root != null && root != this && !root.shouldCreateCompatDisplayInsets()) {
// If the root activity doesn't use size compatibility mode, the activities above
// are forced to be the same for consistent visual appearance.
return false;
}
}
// Activity should be resizable if the task is.
final boolean isResizeable = task != null
? task.isResizeable() || isResizeable()
: isResizeable();
return !isResizeable && (info.isFixedOrientation() || hasFixedAspectRatio())
// The configuration of non-standard type should be enforced by system.
// {@link WindowConfiguration#ACTIVITY_TYPE_STANDARD} is set when this activity is
// added to a task, but this function is called when resolving the launch params, at
// which point, the activity type is still undefined if it will be standard.
// For other non-standard types, the type is set in the constructor, so this should
// not be a problem.
&& isActivityTypeStandardOrUndefined();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldCreateCompatDisplayInsets
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
|
shouldCreateCompatDisplayInsets
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isUnlockingWithFingerprintAllowed() {
int userId = getCurrentUser();
return isFingerprintAllowedForUser(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUnlockingWithFingerprintAllowed
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isUnlockingWithFingerprintAllowed
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo)
throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(GET_MY_MEMORY_STATE_TRANSACTION, data, reply, 0);
reply.readException();
outInfo.readFromParcel(reply);
reply.recycle();
data.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMyMemoryState
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getMyMemoryState
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public String buildUnionQuery(String[] subQueries, String sortOrder, String limit) {
StringBuilder query = new StringBuilder(128);
int subQueryCount = subQueries.length;
String unionOperator = mDistinct ? " UNION " : " UNION ALL ";
for (int i = 0; i < subQueryCount; i++) {
if (i > 0) {
query.append(unionOperator);
}
query.append(subQueries[i]);
}
appendClause(query, " ORDER BY ", sortOrder);
appendClause(query, " LIMIT ", limit);
return query.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildUnionQuery
File: core/java/android/database/sqlite/SQLiteQueryBuilder.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
buildUnionQuery
|
core/java/android/database/sqlite/SQLiteQueryBuilder.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void endPeerConnection(String sessionId, boolean justScreen) {
List<PeerConnectionWrapper> peerConnectionWrappers;
PeerConnectionWrapper peerConnectionWrapper;
if (!(peerConnectionWrappers = getPeerConnectionWrapperListForSessionId(sessionId)).isEmpty()) {
for (int i = 0; i < peerConnectionWrappers.size(); i++) {
peerConnectionWrapper = peerConnectionWrappers.get(i);
if (peerConnectionWrapper.getSessionId().equals(sessionId)) {
if (VIDEO_STREAM_TYPE_SCREEN.equals(peerConnectionWrapper.getVideoStreamType()) || !justScreen) {
runOnUiThread(() -> removeMediaStream(sessionId));
deletePeerConnection(peerConnectionWrapper);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endPeerConnection
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
endPeerConnection
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public LBPool updatePool(LBPool pool) {
pools.put(pool.id, pool);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePool
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
updatePool
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
final int startActivityInPackage(int uid, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, int startFlags, Bundle options, int userId,
IActivityContainer container, TaskRecord inTask) {
userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
false, ALLOW_FULL_ONLY, "startActivityInPackage", null);
// TODO: Switch to user app stacks here.
int ret = mStackSupervisor.startActivityMayWait(null, uid, callingPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
null, null, null, options, userId, container, inTask);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityInPackage
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startActivityInPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initMouseMappings(Element elt) {
MouseMappings map = file.getOptions().getMouseMappings();
for (Element sub_elt : XmlIterator.forChildElements(elt, "tool")) {
Tool tool;
try {
tool = toTool(sub_elt);
} catch (XmlReaderException e) {
addErrors(e, "mapping");
continue;
}
String mods_str = sub_elt.getAttribute("map");
if (mods_str == null || mods_str.equals("")) {
loader.showError(Strings.get("mappingMissingError"));
continue;
}
int mods;
try {
mods = InputEventUtil.fromString(mods_str);
} catch (NumberFormatException e) {
loader.showError(StringUtil.format(
Strings.get("mappingBadError"), mods_str));
continue;
}
tool = tool.cloneTool();
try {
initAttributeSet(sub_elt, tool.getAttributeSet(), tool);
} catch (XmlReaderException e) {
addErrors(e, "mapping." + tool.getName());
}
map.setToolFor(mods, tool);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initMouseMappings
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
initMouseMappings
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String wrapJsonForClient(JsonObject json) {
return "for(;;);[" + JsonUtil.stringify(json) + "]";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wrapJsonForClient
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
wrapJsonForClient
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onAuthenticated(int fingerId, int groupId) {
boolean result = false;
boolean authenticated = fingerId != 0;
IFingerprintServiceReceiver receiver = getReceiver();
if (receiver != null) {
try {
MetricsLogger.action(getContext(), MetricsEvent.ACTION_FINGERPRINT_AUTH,
authenticated);
if (!authenticated) {
receiver.onAuthenticationFailed(getHalDeviceId());
} else {
if (DEBUG) {
Slog.v(TAG, "onAuthenticated(owner=" + getOwnerString()
+ ", id=" + fingerId + ", gp=" + groupId + ")");
}
Fingerprint fp = !getIsRestricted()
? new Fingerprint("" /* TODO */, groupId, fingerId, getHalDeviceId())
: null;
receiver.onAuthenticationSucceeded(getHalDeviceId(), fp);
}
} catch (RemoteException e) {
Slog.w(TAG, "Failed to notify Authenticated:", e);
result = true; // client failed
}
} else {
result = true; // client not listening
}
if (!authenticated) {
if (receiver != null) {
FingerprintUtils.vibrateFingerprintError(getContext());
}
// allow system-defined limit of number of attempts before giving up
boolean inLockoutMode = handleFailedAttempt();
// send lockout event in case driver doesn't enforce it.
if (inLockoutMode) {
try {
Slog.w(TAG, "Forcing lockout (fp driver code should do this!)");
receiver.onError(getHalDeviceId(),
FingerprintManager.FINGERPRINT_ERROR_LOCKOUT);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to notify lockout:", e);
}
}
result |= inLockoutMode;
} else {
if (receiver != null) {
FingerprintUtils.vibrateFingerprintSuccess(getContext());
}
result |= true; // we have a valid fingerprint, done
resetFailedAttempts();
}
return result;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3917
- Severity: HIGH
- CVSS Score: 7.2
Description: Bind fingerprint when we start authentication
This fixes a bug where it was possible to authenticate the wrong user.
We now bind the userId when we start authentication and confirm it when
authentication completes.
Fixes bug 30744668
(Cherry pick from Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2)
Change-Id: I3584790c39eb2e8c435ad1b2d887bf9b8ebd36fe
(cherry picked from commit 837d052ed4b5b75dfd4af44f5ad268e683bf2e13)
Function: onAuthenticated
File: services/core/java/com/android/server/fingerprint/AuthenticationClient.java
Repository: android
Fixed Code:
@Override
public boolean onAuthenticated(int fingerId, int groupId) {
boolean result = false;
boolean authenticated = fingerId != 0;
IFingerprintServiceReceiver receiver = getReceiver();
if (receiver != null) {
try {
MetricsLogger.action(getContext(), MetricsEvent.ACTION_FINGERPRINT_AUTH,
authenticated);
if (!authenticated) {
receiver.onAuthenticationFailed(getHalDeviceId());
} else {
if (DEBUG) {
Slog.v(TAG, "onAuthenticated(owner=" + getOwnerString()
+ ", id=" + fingerId + ", gp=" + groupId + ")");
}
Fingerprint fp = !getIsRestricted()
? new Fingerprint("" /* TODO */, groupId, fingerId, getHalDeviceId())
: null;
receiver.onAuthenticationSucceeded(getHalDeviceId(), fp, getTargetUserId());
}
} catch (RemoteException e) {
Slog.w(TAG, "Failed to notify Authenticated:", e);
result = true; // client failed
}
} else {
result = true; // client not listening
}
if (!authenticated) {
if (receiver != null) {
FingerprintUtils.vibrateFingerprintError(getContext());
}
// allow system-defined limit of number of attempts before giving up
boolean inLockoutMode = handleFailedAttempt();
// send lockout event in case driver doesn't enforce it.
if (inLockoutMode) {
try {
Slog.w(TAG, "Forcing lockout (fp driver code should do this!)");
receiver.onError(getHalDeviceId(),
FingerprintManager.FINGERPRINT_ERROR_LOCKOUT);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to notify lockout:", e);
}
}
result |= inLockoutMode;
} else {
if (receiver != null) {
FingerprintUtils.vibrateFingerprintSuccess(getContext());
}
result |= true; // we have a valid fingerprint, done
resetFailedAttempts();
}
return result;
}
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onAuthenticated
|
services/core/java/com/android/server/fingerprint/AuthenticationClient.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean isIncludePageEndTag(String str) {
return str.trim().endsWith("</html>") || str.trim().endsWith(endFlag);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIncludePageEndTag
File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
isIncludePageEndTag
|
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getOCMetadataForGlobals(int crfId, MetaDataVersionBean metadata, String odmVersion) {
String cvIds = crfId+"";
if (odmVersion.startsWith("oc")) {
// add CRFVersions that itemDef belong to
HashMap<String, String> itDefCVs = new HashMap<String, String>();
this.setItemCVOIDsTypesExpected();
ArrayList al = this.select(this.getItemCVOIDsSql(cvIds));
Iterator iter = al.iterator();
while (iter.hasNext()) {
HashMap row = (HashMap) iter.next();
Integer cId = (Integer) row.get("crf_id");
Integer cvId = (Integer) row.get("crf_version_id");
Integer itId = (Integer) row.get("item_id");
String cvOID = (String) row.get("cv_oid");
String itOID = (String) row.get("item_oid");
if (itDefCVs.containsKey(itOID)) {
String cvs = itDefCVs.get(itOID);
if (!cvs.contains(cvOID + ",")) {
cvs += cvOID + ",";
}
itDefCVs.put(itOID, cvs);
} else {
itDefCVs.put(itOID, cvOID + ",");
}
}
for (ItemDefBean itdef : metadata.getItemDefs()) {
String key = itdef.getOid();
if (itDefCVs.containsKey(key)) {
String cvs = itDefCVs.get(key);
itdef.setFormOIDs(cvs.substring(0, cvs.length() - 1));
}
}
// add StudyGroupClassList
/* this.setStudyGroupClassTypesExpected();
logger.debug("Begin to execute GetStudyGroupClassSql");
logger.debug("getStudyGroupClassSql=" + getStudyGroupClassSql(parentStudyId));
ArrayList rows = select(this.getStudyGroupClassSql(parentStudyId));
Iterator it = rows.iterator();
ArrayList<StudyGroupClassListBean> sgcLists = (ArrayList<StudyGroupClassListBean>) metadata.getStudyGroupClassLists();
String sgcprev = "";
while (it.hasNext()) {
HashMap row = (HashMap) it.next();
Integer sgcid = (Integer) row.get("study_group_class_id");
String sgcname = (String) row.get("sgc_name");
String sgctype = (String) row.get("sgc_type");
Integer statusid = (Integer) row.get("status_id");
String subassign = (String) row.get("subject_assignment");
String sgname = (String) row.get("sg_name");
String des = (String) row.get("description");
if (sgcprev.equals(sgcid + "")) {
StudyGroupItemBean sg = new StudyGroupItemBean();
sg.setName(sgname);
sg.setDescription(des);
StudyGroupClassListBean sgc = sgcLists.get(sgcLists.size() - 1);
sgc.getStudyGroupItems().add(sg);
} else {
sgcprev = sgcid + "";
StudyGroupClassListBean sgc = new StudyGroupClassListBean();
sgc.setID("SGC_" + sgcid);
sgc.setName(sgcname);
sgc.setType(sgctype);
sgc.setStatus(Status.get(statusid).getName());
sgc.setSubjectAssignment(subassign);
StudyGroupItemBean sg = new StudyGroupItemBean();
sg.setName(sgname);
sg.setDescription(des);
sgc.getStudyGroupItems().add(sg);
sgcLists.add(sgc);
}
}*/
}
// return nullClSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOCMetadataForGlobals
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getOCMetadataForGlobals
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public XMLObject getDomainXML() throws EBaseException, ParserConfigurationException {
return convertDomainInfoToXMLObject(getDomainInfo());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDomainXML
File: base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getDomainXML
|
base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnableRenegotiation() {
return enableRenegotiation;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnableRenegotiation
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
isEnableRenegotiation
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final MatchedRevision createMatchedRevision(Modification modification, String searchString) {
return new MatchedRevision(searchString, getShortRevision(modification.getRevision()), modification.getRevision(), modification.getUserName(), modification.getModifiedTime(), modification.getComment());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMatchedRevision
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
createMatchedRevision
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean last() throws SQLException {
checkScrollable();
List<Tuple> rows = castNonNull(this.rows, "rows");
final int rows_size = rows.size();
if (rows_size <= 0) {
return false;
}
currentRow = rows_size - 1;
initRowBuffer();
onInsertRow = false;
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: last
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
|
last
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSpaceIdFromCookie(Profile authUser, HttpServletRequest req) {
if (isAdmin(authUser) && req.getParameter("space") != null) {
Sysprop s = pc.read(getSpaceId(req.getParameter("space"))); // API override
if (s != null) {
return s.getId() + Para.getConfig().separator() + s.getName();
}
}
String spaceAttr = (String) req.getAttribute(CONF.spaceCookie());
String spaceValue = StringUtils.isBlank(spaceAttr) ? Utils.base64dec(getCookieValue(req, CONF.spaceCookie())) : spaceAttr;
String space = getValidSpaceId(authUser, spaceValue);
return (isAllSpaces(space) && isMod(authUser)) ? DEFAULT_SPACE : verifyExistingSpace(authUser, space);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpaceIdFromCookie
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
|
getSpaceIdFromCookie
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getServerIndex() {
return serverIndex;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerIndex
File: samples/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
|
getServerIndex
|
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
|
private boolean isAnyProfilePublicMode() {
for (int i = mCurrentProfiles.size() - 1; i >= 0; i--) {
if (isLockscreenPublicMode(mCurrentProfiles.valueAt(i).id)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAnyProfilePublicMode
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
isAnyProfilePublicMode
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(allOf = {
USE_FINGERPRINT,
INTERACT_ACROSS_USERS})
public boolean hasEnrolledFingerprints(int userId) {
if (mService != null) try {
return mService.hasEnrolledFingerprints(userId, mContext.getOpPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasEnrolledFingerprints
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
hasEnrolledFingerprints
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int findWhitespace(AppendableCharSequence sb, int offset) {
for (int result = offset; result < sb.length(); ++result) {
if (Character.isWhitespace(sb.charAtUnsafe(result))) {
return result;
}
}
return sb.length();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findWhitespace
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
findWhitespace
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element infoElement = document.createElement("CertDataInfo");
if (id != null) {
infoElement.setAttribute("id", id.toHexString());
}
if (subjectDN != null) {
Element subjectDNElement = document.createElement("SubjectDN");
subjectDNElement.appendChild(document.createTextNode(subjectDN));
infoElement.appendChild(subjectDNElement);
}
if (issuerDN != null) {
Element issuerDNElement = document.createElement("IssuerDN");
issuerDNElement.appendChild(document.createTextNode(issuerDN));
infoElement.appendChild(issuerDNElement);
}
if (status != null) {
Element statusElement = document.createElement("Status");
statusElement.appendChild(document.createTextNode(status));
infoElement.appendChild(statusElement);
}
if (type != null) {
Element typeElement = document.createElement("Type");
typeElement.appendChild(document.createTextNode(type));
infoElement.appendChild(typeElement);
}
if (version != null) {
Element versionElement = document.createElement("Version");
versionElement.appendChild(document.createTextNode(Integer.toString(version)));
infoElement.appendChild(versionElement);
}
if (keyAlgorithmOID != null) {
Element keyAlgorithmOIDElement = document.createElement("KeyAlgorithmOID");
keyAlgorithmOIDElement.appendChild(document.createTextNode(keyAlgorithmOID));
infoElement.appendChild(keyAlgorithmOIDElement);
}
if (keyLength != null) {
Element keyLengthElement = document.createElement("KeyLength");
keyLengthElement.appendChild(document.createTextNode(Integer.toString(keyLength)));
infoElement.appendChild(keyLengthElement);
}
if (notValidBefore != null) {
Element notValidBeforeElement = document.createElement("NotValidBefore");
notValidBeforeElement.appendChild(document.createTextNode(Long.toString(notValidBefore.getTime())));
infoElement.appendChild(notValidBeforeElement);
}
if (notValidAfter != null) {
Element notValidAfterElement = document.createElement("NotValidAfter");
notValidAfterElement.appendChild(document.createTextNode(Long.toString(notValidAfter.getTime())));
infoElement.appendChild(notValidAfterElement);
}
if (issuedOn != null) {
Element issuedOnElement = document.createElement("IssuedOn");
issuedOnElement.appendChild(document.createTextNode(Long.toString(issuedOn.getTime())));
infoElement.appendChild(issuedOnElement);
}
if (issuedBy != null) {
Element issuedByElement = document.createElement("IssuedBy");
issuedByElement.appendChild(document.createTextNode(issuedBy));
infoElement.appendChild(issuedByElement);
}
if (revokedOn != null) {
Element revokedOnElement = document.createElement("RevokedOn");
revokedOnElement.appendChild(document.createTextNode(Long.toString(revokedOn.getTime())));
infoElement.appendChild(revokedOnElement);
}
if (revokedBy != null) {
Element revokedByElement = document.createElement("RevokedBy");
revokedByElement.appendChild(document.createTextNode(revokedBy));
infoElement.appendChild(revokedByElement);
}
return infoElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object readNewObject(boolean unshared)
throws OptionalDataException, ClassNotFoundException, IOException {
ObjectStreamClass classDesc = readClassDesc();
if (classDesc == null) {
throw missingClassDescriptor();
}
int newHandle = nextHandle();
Class<?> objectClass = classDesc.forClass();
Object result = null;
Object registeredResult = null;
if (objectClass != null) {
// Now we know which class to instantiate and which constructor to
// run. We are allowed to run the constructor.
result = classDesc.newInstance(objectClass);
registerObjectRead(result, newHandle, unshared);
registeredResult = result;
} else {
result = null;
}
try {
// This is how we know what to do in defaultReadObject. And it is
// also used by defaultReadObject to check if it was called from an
// invalid place. It also allows readExternal to call
// defaultReadObject and have it work.
currentObject = result;
currentClass = classDesc;
// If Externalizable, just let the object read itself
// Note that this value comes from the Stream, and in fact it could be
// that the classes have been changed so that the info below now
// conflicts with the newer class
boolean wasExternalizable = (classDesc.getFlags() & SC_EXTERNALIZABLE) != 0;
if (wasExternalizable) {
boolean blockData = (classDesc.getFlags() & SC_BLOCK_DATA) != 0;
if (!blockData) {
primitiveData = input;
}
if (mustResolve) {
Externalizable extern = (Externalizable) result;
extern.readExternal(this);
}
if (blockData) {
// Similar to readHierarchy. Anything not read by
// readExternal has to be consumed here
discardData();
} else {
primitiveData = emptyStream;
}
} else {
// If we got here, it is Serializable but not Externalizable.
// Walk the hierarchy reading each class' slots
readHierarchy(result, classDesc);
}
} finally {
// Cleanup, needs to run always so that we can later detect invalid
// calls to defaultReadObject
currentObject = null;
currentClass = null;
}
if (objectClass != null) {
if (classDesc.hasMethodReadResolve()){
Method methodReadResolve = classDesc.getMethodReadResolve();
try {
result = methodReadResolve.invoke(result, (Object[]) null);
} catch (IllegalAccessException ignored) {
} catch (InvocationTargetException ite) {
Throwable target = ite.getTargetException();
if (target instanceof ObjectStreamException) {
throw (ObjectStreamException) target;
} else if (target instanceof Error) {
throw (Error) target;
} else {
throw (RuntimeException) target;
}
}
}
}
// We get here either if class-based replacement was not needed or if it
// was needed but produced the same object or if it could not be
// computed.
// The object to return is the one we instantiated or a replacement for
// it
if (result != null && enableResolve) {
result = resolveObject(result);
}
if (registeredResult != result) {
registerObjectRead(result, newHandle, unshared);
}
return result;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2014-7911
- Severity: HIGH
- CVSS Score: 7.2
Description: Add additional checks in ObjectInputStream
Thanks to Jann Horn for reporting a bug in ObjectInputStream
and sending the initial patch.
Add some checks that the class of an object
being deserialized still conforms to the requirements
for serialization.
Add some checks that the class being deserialized matches
the type information (enum, serializable, externalizable)
held in the stream.
Delayed static initialization of classes until the
type of the class has been validated against the stream
content in some cases.
Added more tests.
Bug: 15874291
Change-Id: I0f0fe68e0d21e041c5160482113ae847c357b8f5
Function: readNewObject
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
Fixed Code:
private Object readNewObject(boolean unshared)
throws OptionalDataException, ClassNotFoundException, IOException {
ObjectStreamClass classDesc = readClassDesc();
if (classDesc == null) {
throw missingClassDescriptor();
}
Class<?> objectClass = classDesc.checkAndGetTcObjectClass();
int newHandle = nextHandle();
Object result;
Object registeredResult = null;
if (objectClass != null) {
// Now we know which class to instantiate and which constructor to
// run. We are allowed to run the constructor.
result = classDesc.newInstance(objectClass);
registerObjectRead(result, newHandle, unshared);
registeredResult = result;
} else {
result = null;
}
try {
// This is how we know what to do in defaultReadObject. And it is
// also used by defaultReadObject to check if it was called from an
// invalid place. It also allows readExternal to call
// defaultReadObject and have it work.
currentObject = result;
currentClass = classDesc;
// If Externalizable, just let the object read itself
// Note that this value comes from the Stream, and in fact it could be
// that the classes have been changed so that the info below now
// conflicts with the newer class
boolean wasExternalizable = (classDesc.getFlags() & SC_EXTERNALIZABLE) != 0;
if (wasExternalizable) {
boolean blockData = (classDesc.getFlags() & SC_BLOCK_DATA) != 0;
if (!blockData) {
primitiveData = input;
}
if (mustResolve) {
Externalizable extern = (Externalizable) result;
extern.readExternal(this);
}
if (blockData) {
// Similar to readHierarchy. Anything not read by
// readExternal has to be consumed here
discardData();
} else {
primitiveData = emptyStream;
}
} else {
// If we got here, it is Serializable but not Externalizable.
// Walk the hierarchy reading each class' slots
readHierarchy(result, classDesc);
}
} finally {
// Cleanup, needs to run always so that we can later detect invalid
// calls to defaultReadObject
currentObject = null;
currentClass = null;
}
if (objectClass != null) {
if (classDesc.hasMethodReadResolve()){
Method methodReadResolve = classDesc.getMethodReadResolve();
try {
result = methodReadResolve.invoke(result, (Object[]) null);
} catch (IllegalAccessException ignored) {
} catch (InvocationTargetException ite) {
Throwable target = ite.getTargetException();
if (target instanceof ObjectStreamException) {
throw (ObjectStreamException) target;
} else if (target instanceof Error) {
throw (Error) target;
} else {
throw (RuntimeException) target;
}
}
}
}
// We get here either if class-based replacement was not needed or if it
// was needed but produced the same object or if it could not be
// computed.
// The object to return is the one we instantiated or a replacement for
// it
if (result != null && enableResolve) {
result = resolveObject(result);
}
if (registeredResult != result) {
registerObjectRead(result, newHandle, unshared);
}
return result;
}
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readNewObject
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isManagingSshKeys() {
return getUserSshKeyAttribute() != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManagingSshKeys
File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-90"
] |
CVE-2021-32651
|
MEDIUM
| 4.3
|
theonedev/onedev
|
isManagingSshKeys
|
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
|
4440f0c57e440488d7e653417b2547eaae8ad19c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onQueryTextSubmit(String query) {
clearSearchViewFocus();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onQueryTextSubmit
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onQueryTextSubmit
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiLock getLock(XWikiContext context) throws XWikiException
{
XWikiLock theLock = getStore(context).loadLock(getId(), context, true);
if (theLock != null) {
int timeout = context.getWiki().getXWikiPreferenceAsInt("lock_Timeout", 30 * 60, context);
if (theLock.getDate().getTime() + timeout * 1000 < new Date().getTime()) {
getStore(context).deleteLock(theLock, context, true);
theLock = null;
}
}
return theLock;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLock
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getLock
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRestUrl() {
String restCacheName = cacheName.isEmpty() ? BasicCacheContainer.DEFAULT_CACHE_NAME : cacheName;
return String.format("http://localhost:%s/rest/%s", restPort, restCacheName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRestUrl
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
getRestUrl
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static synchronized String install(ArtemisSecurityConfiguration configuration) {
if (INSTANCE.lastUninstallFailed) {
LOG.info("Try recovery from lastUninstallFailed"); //$NON-NLS-1$
INSTANCE.checkThreadGroup();
INSTANCE.isPartlyDisabled = true;
System.setSecurityManager(ORIGINAL);
INSTANCE.isPartlyDisabled = false;
INSTANCE.lastUninstallFailed = false;
}
if (LOG.isInfoEnabled())
LOG.info("Request install with {}", configuration.shortDesc()); //$NON-NLS-1$
String token = INSTANCE.generateAccessToken();
INSTANCE.blockThreadCreation = false;
INSTANCE.configuration = Objects.requireNonNull(configuration);
INSTANCE.removeDeadThreads();
if (!isInstalled())
System.setSecurityManager(INSTANCE);
INSTANCE.isActive = true;
return token;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: install
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
install
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient configureApiKeys(Map<String, String> secrets) {
for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) {
Authentication auth = authEntry.getValue();
if (auth instanceof ApiKeyAuth) {
String name = authEntry.getKey();
// respect x-auth-id-alias property
name = authenticationLookup.containsKey(name) ? authenticationLookup.get(name) : name;
if (secrets.containsKey(name)) {
((ApiKeyAuth) auth).setApiKey(secrets.get(name));
}
}
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureApiKeys
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
configureApiKeys
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String renderTemplate(String template, String skin, XWikiContext context)
{
try {
return getOldRendering().renderTemplate(template, skin, context);
} catch (Exception ex) {
LOGGER.error("Failed to render template [" + template + "] for skin [" + skin + "]", ex);
return parseTemplate(template, skin, context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renderTemplate
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
|
renderTemplate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.