instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public ZentaoConfig setUserConfig(UserDTO.PlatformInfo userPlatInfo) {
ZentaoConfig zentaoConfig = getConfig();
if (userPlatInfo != null && StringUtils.isNotBlank(userPlatInfo.getZentaoUserName())
&& StringUtils.isNotBlank(userPlatInfo.getZentaoPassword())) {
zentaoConfig.setAccount(userPlatInfo.getZentaoUserName());
zentaoConfig.setPassword(userPlatInfo.getZentaoPassword());
}
zentaoClient.setConfig(zentaoConfig);
return zentaoConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserConfig
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
setUserConfig
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean handleApplicationWtf(final IBinder app, final String tag, boolean system,
final ApplicationErrorReport.CrashInfo crashInfo) {
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
if (system) {
// If this is coming from the system, we could very well have low-level
// system locks held, so we want to do this all asynchronously. And we
// never want this to become fatal, so there is that too.
mHandler.post(new Runnable() {
@Override public void run() {
handleApplicationWtfInner(callingUid, callingPid, app, tag, crashInfo);
}
});
return false;
}
final ProcessRecord r = handleApplicationWtfInner(callingUid, callingPid, app, tag,
crashInfo);
if (r != null && r.pid != Process.myPid() &&
Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.WTF_IS_FATAL, 0) != 0) {
mAppErrors.crashApplication(r, crashInfo);
return true;
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationWtf
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
|
handleApplicationWtf
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
if (hasWindowFocus) {
if (mShowKeyboardOnWindowFocus && isFocused()) {
// Without the call to post(..), the keyboard was not getting shown when the
// window regained focus despite this being the final call in the view system
// flow.
post(new Runnable() {
@Override
public void run() {
UiUtils.showKeyboard(UrlBar.this);
}
});
}
mShowKeyboardOnWindowFocus = false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWindowFocusChanged
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
onWindowFocusChanged
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean checkEnterPictureInPictureAppOpsState() {
return mAtmService.getAppOpsManager().checkOpNoThrow(
OP_PICTURE_IN_PICTURE, info.applicationInfo.uid, packageName) == MODE_ALLOWED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkEnterPictureInPictureAppOpsState
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
|
checkEnterPictureInPictureAppOpsState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogHorizontalSpacer(int width) {
return "<td><span style=\"display:block; height: 1px; width: " + width + "px;\"></span></td>";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogHorizontalSpacer
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
|
dialogHorizontalSpacer
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean mayProceed(String studyOid, StudySubjectBean ssBean) throws Exception {
boolean accessPermission = false;
ParticipantPortalRegistrar participantPortalRegistrar= new ParticipantPortalRegistrar();
Study study = getParentStudy(studyOid);
StudyParameterValue pStatus = studyParameterValueDao.findByStudyIdParameter(study.getStudyId(), "participantPortal");
// ACTIVE, PENDING, or INACTIVE
String pManageStatus = participantPortalRegistrar.getRegistrationStatus(studyOid).toString();
// enabled or disabled
String participateStatus = pStatus.getValue().toString();
// available, pending, frozen, or locked
String studyStatus = study.getStatus().getName().toString();
if (ssBean == null) {
logger.info("pManageStatus: " + pManageStatus + " participantStatus: " + participateStatus + " studyStatus: " + studyStatus);
if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE"))
accessPermission = true;
} else {
logger.info("pManageStatus: " + pManageStatus + " participantStatus: " + participateStatus + " studyStatus: " + studyStatus
+ " studySubjectStatus: " + ssBean.getStatus().getName());
if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE")
&& ssBean.getStatus() == Status.AVAILABLE)
accessPermission = true;
}
return accessPermission;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mayProceed
File: web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
mayProceed
|
web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dynamicConfigurationXmlGenerator(XmlGenerator gen, Config config) {
DynamicConfigurationConfig dynamicConfigurationConfig = config.getDynamicConfigurationConfig();
gen.open("dynamic-configuration")
.node("persistence-enabled", dynamicConfigurationConfig.isPersistenceEnabled());
if (dynamicConfigurationConfig.getBackupDir() != null) {
gen.node("backup-dir", dynamicConfigurationConfig.getBackupDir().getAbsolutePath());
}
gen.node("backup-count", dynamicConfigurationConfig.getBackupCount());
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dynamicConfigurationXmlGenerator
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
|
dynamicConfigurationXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
final boolean success = mUtils.setLockCredential(
mChosenPassword, mCurrentCredential, mUserId);
if (success) {
unifyProfileCredentialIfRequested();
}
Intent result = null;
if (success && mRequestGatekeeperPassword) {
// If a Gatekeeper Password was requested, invoke the LockSettingsService code
// path to return a Gatekeeper Password based on the credential that the user
// chose. This should only be run if the credential was successfully set.
final VerifyCredentialResponse response = mUtils.verifyCredential(mChosenPassword,
mUserId, LockPatternUtils.VERIFY_FLAG_REQUEST_GK_PW_HANDLE);
if (!response.isMatched() || !response.containsGatekeeperPasswordHandle()) {
Log.e(TAG, "critical: bad response or missing GK PW handle for known good"
+ " password: " + response.toString());
}
result = new Intent();
result.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_GK_PW_HANDLE,
response.getGatekeeperPasswordHandle());
}
return Pair.create(success, result);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-40117
- Severity: HIGH
- CVSS Score: 7.8
Description: RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()
When LockPatternUtils#setLockCredential() fails, it can either return
false or throw an exception. Catch the exception and treat it the same
way as a false return value, to prevent crashing com.android.settings.
Bug: 253043065
Test: Tried setting lockscreen credential while in secure FRP mode using
smartlock setup activity launched by intent via adb. Verified
that com.android.settings no longer crashes due to the exception
from LockPatternUtils#setLockCredential().
(cherry picked from commit 05f1eff1c9c3f82797f1a0f92ff7665b9f463488)
(moved change into ChooseLockPassword.java and ChooseLockPattern.java,
which are merged into SaveAndFinishWorker.java on udc-qpr-dev and main)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e0b5a793a19198370d479401101cea97c2f1d835)
Merged-In: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
Change-Id: I48b9119c19fb6378b1f88d36433ee4f4c8501d76
Function: saveAndVerifyInBackground
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
Fixed Code:
@Override
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
boolean success;
try {
success = mUtils.setLockCredential(mChosenPassword, mCurrentCredential, mUserId);
} catch (RuntimeException e) {
Log.e(TAG, "Failed to set lockscreen credential", e);
success = false;
}
if (success) {
unifyProfileCredentialIfRequested();
}
Intent result = null;
if (success && mRequestGatekeeperPassword) {
// If a Gatekeeper Password was requested, invoke the LockSettingsService code
// path to return a Gatekeeper Password based on the credential that the user
// chose. This should only be run if the credential was successfully set.
final VerifyCredentialResponse response = mUtils.verifyCredential(mChosenPassword,
mUserId, LockPatternUtils.VERIFY_FLAG_REQUEST_GK_PW_HANDLE);
if (!response.isMatched() || !response.containsGatekeeperPasswordHandle()) {
Log.e(TAG, "critical: bad response or missing GK PW handle for known good"
+ " password: " + response.toString());
}
result = new Intent();
result.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_GK_PW_HANDLE,
response.getGatekeeperPasswordHandle());
}
return Pair.create(success, result);
}
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
saveAndVerifyInBackground
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 1
|
Analyze the following code function for security vulnerabilities
|
private void getCarrierCustomizedConfig() {
mReadOnlyApn = false;
mReadOnlyApnTypes = null;
mReadOnlyApnFields = null;
final CarrierConfigManager configManager = (CarrierConfigManager)
getSystemService(Context.CARRIER_CONFIG_SERVICE);
if (configManager != null) {
final PersistableBundle b = configManager.getConfigForSubId(mSubId);
if (b != null) {
mReadOnlyApnTypes = b.getStringArray(
CarrierConfigManager.KEY_READ_ONLY_APN_TYPES_STRING_ARRAY);
if (!ArrayUtils.isEmpty(mReadOnlyApnTypes)) {
Log.d(TAG,
"onCreate: read only APN type: " + Arrays.toString(mReadOnlyApnTypes));
}
mReadOnlyApnFields = b.getStringArray(
CarrierConfigManager.KEY_READ_ONLY_APN_FIELDS_STRING_ARRAY);
mDefaultApnTypes = b.getStringArray(
CarrierConfigManager.KEY_APN_SETTINGS_DEFAULT_APN_TYPES_STRING_ARRAY);
if (!ArrayUtils.isEmpty(mDefaultApnTypes)) {
Log.d(TAG, "onCreate: default apn types: " + Arrays.toString(mDefaultApnTypes));
}
mDefaultApnProtocol = b.getString(
CarrierConfigManager.Apn.KEY_SETTINGS_DEFAULT_PROTOCOL_STRING);
if (!TextUtils.isEmpty(mDefaultApnProtocol)) {
Log.d(TAG, "onCreate: default apn protocol: " + mDefaultApnProtocol);
}
mDefaultApnRoamingProtocol = b.getString(
CarrierConfigManager.Apn.KEY_SETTINGS_DEFAULT_ROAMING_PROTOCOL_STRING);
if (!TextUtils.isEmpty(mDefaultApnRoamingProtocol)) {
Log.d(TAG, "onCreate: default apn roaming protocol: "
+ mDefaultApnRoamingProtocol);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCarrierCustomizedConfig
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
getCarrierCustomizedConfig
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyArgs(String... args) throws SQLException {
for (int i = 0; args != null && i < args.length; i++) {
String arg = args[i];
if (arg == null) {
} else if ("-?".equals(arg) || "-help".equals(arg)) {
// ok
} else if (arg.startsWith("-web")) {
if ("-web".equals(arg)) {
// ok
} else if ("-webAllowOthers".equals(arg)) {
// no parameters
} else if ("-webExternalNames".equals(arg)) {
i++;
} else if ("-webDaemon".equals(arg)) {
// no parameters
} else if ("-webSSL".equals(arg)) {
// no parameters
} else if ("-webPort".equals(arg)) {
i++;
} else if ("-webAdminPassword".equals(arg)) {
i++;
} else {
throwUnsupportedOption(arg);
}
} else if ("-browser".equals(arg)) {
// ok
} else if (arg.startsWith("-tcp")) {
if ("-tcp".equals(arg)) {
// ok
} else if ("-tcpAllowOthers".equals(arg)) {
// no parameters
} else if ("-tcpDaemon".equals(arg)) {
// no parameters
} else if ("-tcpSSL".equals(arg)) {
// no parameters
} else if ("-tcpPort".equals(arg)) {
i++;
} else if ("-tcpPassword".equals(arg)) {
i++;
} else if ("-tcpShutdown".equals(arg)) {
i++;
} else if ("-tcpShutdownForce".equals(arg)) {
// ok
} else {
throwUnsupportedOption(arg);
}
} else if (arg.startsWith("-pg")) {
if ("-pg".equals(arg)) {
// ok
} else if ("-pgAllowOthers".equals(arg)) {
// no parameters
} else if ("-pgDaemon".equals(arg)) {
// no parameters
} else if ("-pgPort".equals(arg)) {
i++;
} else {
throwUnsupportedOption(arg);
}
} else if (arg.startsWith("-ftp")) {
if ("-ftpPort".equals(arg)) {
i++;
} else if ("-ftpDir".equals(arg)) {
i++;
} else if ("-ftpRead".equals(arg)) {
i++;
} else if ("-ftpWrite".equals(arg)) {
i++;
} else if ("-ftpWritePassword".equals(arg)) {
i++;
} else if ("-ftpTask".equals(arg)) {
// no parameters
} else {
throwUnsupportedOption(arg);
}
} else if ("-properties".equals(arg)) {
i++;
} else if ("-trace".equals(arg)) {
// no parameters
} else if ("-ifExists".equals(arg)) {
// no parameters
} else if ("-ifNotExists".equals(arg)) {
// no parameters
} else if ("-baseDir".equals(arg)) {
i++;
} else if ("-key".equals(arg)) {
i += 2;
} else if ("-tool".equals(arg)) {
// no parameters
} else {
throwUnsupportedOption(arg);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-312
- CVE: CVE-2022-45868
- Severity: HIGH
- CVSS Score: 7.8
Description: Disallow plain webAdminPassword values to force usage of hashes
Function: verifyArgs
File: h2/src/main/org/h2/tools/Server.java
Repository: h2database
Fixed Code:
private void verifyArgs(String... args) throws SQLException {
for (int i = 0; args != null && i < args.length; i++) {
String arg = args[i];
if (arg == null) {
} else if ("-?".equals(arg) || "-help".equals(arg)) {
// ok
} else if (arg.startsWith("-web")) {
if ("-web".equals(arg)) {
// ok
} else if ("-webAllowOthers".equals(arg)) {
// no parameters
} else if ("-webExternalNames".equals(arg)) {
i++;
} else if ("-webDaemon".equals(arg)) {
// no parameters
} else if ("-webSSL".equals(arg)) {
// no parameters
} else if ("-webPort".equals(arg)) {
i++;
} else if ("-webAdminPassword".equals(arg)) {
if (fromCommandLine) {
throwUnsupportedOption(arg);
}
i++;
} else {
throwUnsupportedOption(arg);
}
} else if ("-browser".equals(arg)) {
// ok
} else if (arg.startsWith("-tcp")) {
if ("-tcp".equals(arg)) {
// ok
} else if ("-tcpAllowOthers".equals(arg)) {
// no parameters
} else if ("-tcpDaemon".equals(arg)) {
// no parameters
} else if ("-tcpSSL".equals(arg)) {
// no parameters
} else if ("-tcpPort".equals(arg)) {
i++;
} else if ("-tcpPassword".equals(arg)) {
i++;
} else if ("-tcpShutdown".equals(arg)) {
i++;
} else if ("-tcpShutdownForce".equals(arg)) {
// ok
} else {
throwUnsupportedOption(arg);
}
} else if (arg.startsWith("-pg")) {
if ("-pg".equals(arg)) {
// ok
} else if ("-pgAllowOthers".equals(arg)) {
// no parameters
} else if ("-pgDaemon".equals(arg)) {
// no parameters
} else if ("-pgPort".equals(arg)) {
i++;
} else {
throwUnsupportedOption(arg);
}
} else if (arg.startsWith("-ftp")) {
if ("-ftpPort".equals(arg)) {
i++;
} else if ("-ftpDir".equals(arg)) {
i++;
} else if ("-ftpRead".equals(arg)) {
i++;
} else if ("-ftpWrite".equals(arg)) {
i++;
} else if ("-ftpWritePassword".equals(arg)) {
i++;
} else if ("-ftpTask".equals(arg)) {
// no parameters
} else {
throwUnsupportedOption(arg);
}
} else if ("-properties".equals(arg)) {
i++;
} else if ("-trace".equals(arg)) {
// no parameters
} else if ("-ifExists".equals(arg)) {
// no parameters
} else if ("-ifNotExists".equals(arg)) {
// no parameters
} else if ("-baseDir".equals(arg)) {
i++;
} else if ("-key".equals(arg)) {
i += 2;
} else if ("-tool".equals(arg)) {
// no parameters
} else {
throwUnsupportedOption(arg);
}
}
}
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
verifyArgs
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 1
|
Analyze the following code function for security vulnerabilities
|
@Test
public void pojo2jsonMap(TestContext context) throws Exception {
Map<String,String> m = new HashMap<>();
m.put("a", "b");
context.assertEquals("{\"a\":\"b\"}", PostgresClient.pojo2json(m));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pojo2jsonMap
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
pojo2jsonMap
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public String hostUrl() {
final StringBuilder url = new StringBuilder();
if (protocol != null) {
url.append(protocol);
url.append("://");
}
if (host != null) {
url.append(host);
}
if (port != Defaults.DEFAULT_PORT) {
url.append(':');
url.append(port);
}
return url.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hostUrl
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
hostUrl
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void focusLost() {
Log.d("Codename One", "native focus loss");
// EDT
super.focusLost();
if (layoutWrapper != null && getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
public void run() {
if(isInitialized()) {
// request focus of the wrapper. that will trigger the
// android focus listener and move focus back to the
// base view.
layoutWrapper.requestFocus();
}
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: focusLost
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
focusLost
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void saveDirtyInfo() {
if (DEBUG || DEBUG_REBOOT) {
Slog.d(TAG, "saveDirtyInfo");
}
if (mShutdown.get()) {
return;
}
try {
Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "shortcutSaveDirtyInfo");
synchronized (mLock) {
for (int i = mDirtyUserIds.size() - 1; i >= 0; i--) {
final int userId = mDirtyUserIds.get(i);
if (userId == UserHandle.USER_NULL) { // USER_NULL for base state.
saveBaseStateLocked();
} else {
saveUserLocked(userId);
}
}
mDirtyUserIds.clear();
}
} catch (Exception e) {
wtf("Exception in saveDirtyInfo", e);
} finally {
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveDirtyInfo
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
saveDirtyInfo
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("/{id}")
public Result detail(@PathVariable Integer id, HttpServletRequest request) {
Map<String, Object> map = new HashMap<>();
// 查询话题详情
Topic topic = topicService.selectById(id);
// 查询话题关联的标签
List<Tag> tags = tagService.selectByTopicId(id);
// 查询话题的评论
List<CommentsByTopic> comments = commentService.selectByTopicId(id);
// 查询话题的作者信息
User topicUser = userService.selectById(topic.getUserId());
// 查询话题有多少收藏
List<Collect> collects = collectService.selectByTopicId(id);
// 如果自己登录了,查询自己是否收藏过这个话题
User user = getApiUser(false);
if (user != null) {
Collect collect = collectService.selectByTopicIdAndUserId(id, user.getId());
map.put("collect", collect);
}
// 话题浏览量+1
String ip = IpUtil.getIpAddr(request);
ip = ip.replace(":", "_").replace(".", "_");
topic = topicService.updateViewCount(topic, ip);
topic.setContent(SensitiveWordUtil.replaceSensitiveWord(topic.getContent(), "*", SensitiveWordUtil.MinMatchType));
map.put("topic", topic);
map.put("tags", tags);
map.put("comments", comments);
map.put("topicUser", topicUser);
map.put("collects", collects);
return success(map);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detail
File: src/main/java/co/yiiu/pybbs/controller/api/TopicApiController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
detail
|
src/main/java/co/yiiu/pybbs/controller/api/TopicApiController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Transactional(readOnly = false)
public ProcessInstance getProcIns(String procInsId) {
return runtimeService.createProcessInstanceQuery().processInstanceId(procInsId).singleResult();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcIns
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
getProcIns
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void createConnectionComplete(String id, Session.Info info) throws RemoteException {
Log.i(ConnectionServiceFixture.this, "createConnectionComplete: %s", id);
mConnectionServiceDelegateAdapter.createConnectionComplete(id, null /*Session.Info*/);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createConnectionComplete
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
createConnectionComplete
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void mutate(String sql, Handler<AsyncResult<String>> replyHandler) {
execute(sql, res -> {
if (res.failed()) {
replyHandler.handle(Future.failedFuture(res.cause()));
return;
}
replyHandler.handle(Future.succeededFuture(res.result().toString()));
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mutate
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
mutate
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSuppressNotification(boolean suppressed) {
if (suppressed) {
mFlags |= Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION;
} else {
mFlags &= ~Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSuppressNotification
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSuppressNotification
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void write(String text) throws IOException {
HtmlUtils.writeUnescapedTextForXML(getWrapped(), text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
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
|
write
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTrustAgentConfiguration(ComponentName admin, ComponentName agent,
PersistableBundle args, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return;
}
Objects.requireNonNull(admin, "admin is null");
Objects.requireNonNull(agent, "agent is null");
final int userHandle = UserHandle.getCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(admin,
DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES, parent);
checkCanExecuteOrThrowUnsafe(
DevicePolicyManager.OPERATION_SET_TRUST_AGENT_CONFIGURATION);
ap.trustAgentInfos.put(agent.flattenToString(), new TrustAgentInfo(args));
saveSettingsLocked(userHandle);
}
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2023-21284
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Ensure policy has no absurdly long strings
The following APIs now enforce limits and throw IllegalArgumentException
when limits are violated:
* DPM.setTrustAgentConfiguration() limits agent packgage name,
component name, and strings within configuration bundle.
* DPM.setPermittedAccessibilityServices() limits package names.
* DPM.setPermittedInputMethods() limits package names.
* DPM.setAccountManagementDisabled() limits account name.
* DPM.setLockTaskPackages() limits package names.
* DPM.setAffiliationIds() limits id.
* DPM.transferOwnership() limits strings inside the bundle.
Package names are limited at 223, because they become directory names
and it is a filesystem restriction, see FrameworkParsingPackageUtils.
All other strings are limited at 65535, because longer ones break binary
XML serializer.
The following APIs silently truncate strings that are long beyond reason:
* DPM.setShortSupportMessage() truncates message at 200.
* DPM.setLongSupportMessage() truncates message at 20000.
* DPM.setOrganizationName() truncates org name at 200.
Bug: 260729089
Test: atest com.android.server.devicepolicy
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5dd3e81347e3c841510094fb5effd51fc0fa995b)
Merged-In: Idcf54e408722f164d16bf2f24a00cd1f5b626d23
Change-Id: Idcf54e408722f164d16bf2f24a00cd1f5b626d23
Function: setTrustAgentConfiguration
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
Fixed Code:
@Override
public void setTrustAgentConfiguration(ComponentName admin, ComponentName agent,
PersistableBundle args, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return;
}
Objects.requireNonNull(admin, "admin is null");
Objects.requireNonNull(agent, "agent is null");
enforceMaxPackageNameLength(agent.getPackageName());
final String agentAsString = agent.flattenToString();
enforceMaxStringLength(agentAsString, "agent name");
if (args != null) {
enforceMaxStringLength(args, "args");
}
final int userHandle = UserHandle.getCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(admin,
DeviceAdminInfo.USES_POLICY_DISABLE_KEYGUARD_FEATURES, parent);
checkCanExecuteOrThrowUnsafe(
DevicePolicyManager.OPERATION_SET_TRUST_AGENT_CONFIGURATION);
ap.trustAgentInfos.put(agent.flattenToString(), new TrustAgentInfo(args));
saveSettingsLocked(userHandle);
}
}
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
setTrustAgentConfiguration
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasKey() {
return haskey;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasKey
File: src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java
Repository: rweather/noise-java
The code follows secure coding practices.
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
hasKey
|
src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 0
|
Analyze the following code function for security vulnerabilities
|
@Sessional
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String clientIp = request.getHeader("X-Forwarded-For");
if (clientIp == null) clientIp = request.getRemoteAddr();
if (!InetAddress.getByName(clientIp).isLoopbackAddress()) {
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Git hook callbacks can only be accessed from localhost.");
return;
}
List<String> fields = StringUtils.splitAndTrim(request.getPathInfo(), "/");
Preconditions.checkState(fields.size() == 2);
Project project = projectManager.load(Long.valueOf(fields.get(0)));
Long userId = Long.valueOf(fields.get(1));
ThreadContext.bind(SecurityUtils.asSubject(userId));
String refUpdateInfo = null;
Enumeration<String> paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextElement();
if (paramName.contains(" ")) {
refUpdateInfo = paramName;
}
}
Preconditions.checkState(refUpdateInfo != null, "Git ref update information is not available");
Output output = new Output(response.getOutputStream());
/*
* If multiple refs are updated, the hook stdin will put each ref update info into
* a separate line, however the line breaks is omitted when forward the hook stdin
* to curl via "@-", below logic is used to parse these info correctly even
* without line breaks.
*/
refUpdateInfo = StringUtils.reverse(StringUtils.remove(refUpdateInfo, '\n'));
fields.clear();
fields.addAll(StringUtils.splitAndTrim(refUpdateInfo, " "));
List<ImmutableTriple<String, ObjectId, ObjectId>> eventData = new ArrayList<>();
int pos = 0;
while (true) {
String refName = StringUtils.reverse(fields.get(pos));
pos++;
ObjectId newObjectId = ObjectId.fromString(StringUtils.reverse(fields.get(pos)));
pos++;
String field = fields.get(pos);
ObjectId oldObjectId = ObjectId.fromString(StringUtils.reverse(field.substring(0, 40)));
String branch = GitUtils.ref2branch(refName);
if (branch != null && project.getDefaultBranch() == null) {
RefUpdate refUpdate = GitUtils.getRefUpdate(project.getRepository(), "HEAD");
GitUtils.linkRef(refUpdate, refName);
}
if (branch != null && project.getDefaultBranch() != null && !branch.equals(project.getDefaultBranch()))
showPullRequestLink(output, project, branch);
eventData.add(new ImmutableTriple<>(refName, oldObjectId, newObjectId));
field = field.substring(40);
if (field.length() == 0)
break;
else
fields.set(pos, field);
}
Long projectId = project.getId();
sessionManager.runAsync(new Runnable() {
@Override
public void run() {
try {
// We can not use a hibernate entity safely in a different thread. Let's reload it
Project project = projectManager.load(projectId);
for (ImmutableTriple<String, ObjectId, ObjectId> each: eventData) {
String refName = each.getLeft();
ObjectId oldObjectId = each.getMiddle();
ObjectId newObjectId = each.getRight();
if (!newObjectId.equals(ObjectId.zeroId()))
project.cacheObjectId(refName, newObjectId);
else
project.cacheObjectId(refName, null);
listenerRegistry.post(new RefUpdated(project, refName, oldObjectId, newObjectId));
}
} catch (Exception e) {
logger.error("Error posting ref updated event", e);
}
}
});
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2022-39205
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Fix security vulnerability related to Git pre/post receive callback
Function: doPost
File: server-core/src/main/java/io/onedev/server/git/hookcallback/GitPostReceiveCallback.java
Repository: theonedev/onedev
Fixed Code:
@Sessional
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
List<String> fields = StringUtils.splitAndTrim(request.getPathInfo(), "/");
Preconditions.checkState(fields.size() == 3);
if (!fields.get(2).equals(GitUtils.HOOK_TOKEN)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN,
"Git hook callbacks can only be accessed by OneDev itself");
return;
}
Project project = projectManager.load(Long.valueOf(fields.get(0)));
Long userId = Long.valueOf(fields.get(1));
ThreadContext.bind(SecurityUtils.asSubject(userId));
String refUpdateInfo = null;
Enumeration<String> paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextElement();
if (paramName.contains(" ")) {
refUpdateInfo = paramName;
}
}
Preconditions.checkState(refUpdateInfo != null, "Git ref update information is not available");
Output output = new Output(response.getOutputStream());
/*
* If multiple refs are updated, the hook stdin will put each ref update info into
* a separate line, however the line breaks is omitted when forward the hook stdin
* to curl via "@-", below logic is used to parse these info correctly even
* without line breaks.
*/
refUpdateInfo = StringUtils.reverse(StringUtils.remove(refUpdateInfo, '\n'));
fields.clear();
fields.addAll(StringUtils.splitAndTrim(refUpdateInfo, " "));
List<ImmutableTriple<String, ObjectId, ObjectId>> eventData = new ArrayList<>();
int pos = 0;
while (true) {
String refName = StringUtils.reverse(fields.get(pos));
pos++;
ObjectId newObjectId = ObjectId.fromString(StringUtils.reverse(fields.get(pos)));
pos++;
String field = fields.get(pos);
ObjectId oldObjectId = ObjectId.fromString(StringUtils.reverse(field.substring(0, 40)));
String branch = GitUtils.ref2branch(refName);
if (branch != null && project.getDefaultBranch() == null) {
RefUpdate refUpdate = GitUtils.getRefUpdate(project.getRepository(), "HEAD");
GitUtils.linkRef(refUpdate, refName);
}
if (branch != null && project.getDefaultBranch() != null && !branch.equals(project.getDefaultBranch()))
showPullRequestLink(output, project, branch);
eventData.add(new ImmutableTriple<>(refName, oldObjectId, newObjectId));
field = field.substring(40);
if (field.length() == 0)
break;
else
fields.set(pos, field);
}
Long projectId = project.getId();
sessionManager.runAsync(new Runnable() {
@Override
public void run() {
try {
// We can not use a hibernate entity safely in a different thread. Let's reload it
Project project = projectManager.load(projectId);
for (ImmutableTriple<String, ObjectId, ObjectId> each: eventData) {
String refName = each.getLeft();
ObjectId oldObjectId = each.getMiddle();
ObjectId newObjectId = each.getRight();
if (!newObjectId.equals(ObjectId.zeroId()))
project.cacheObjectId(refName, newObjectId);
else
project.cacheObjectId(refName, null);
listenerRegistry.post(new RefUpdated(project, refName, oldObjectId, newObjectId));
}
} catch (Exception e) {
logger.error("Error posting ref updated event", e);
}
}
});
}
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
doPost
|
server-core/src/main/java/io/onedev/server/git/hookcallback/GitPostReceiveCallback.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean onyxWebFamily(QTI21Infos fileInfos) {
if(fileInfos == null || fileInfos.getEditor() == null) return false;
return "ONYX Editor".equals(fileInfos.getEditor());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onyxWebFamily
File: src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
onyxWebFamily
|
src/main/java/org/olat/ims/qti21/repository/handlers/CopyAndConvertVisitor.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
void setLocusId(LocusId locusId) {
if (Objects.equals(locusId, mLocusId)) return;
mLocusId = locusId;
final Task task = getTask();
if (task != null) getTask().dispatchTaskInfoChangedIfNeeded(false /* force */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLocusId
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
|
setLocusId
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAdaptiveFetch(boolean adaptiveFetch) throws SQLException {
checkClosed();
updateQueryInsideAdaptiveFetchCache(adaptiveFetch);
this.adaptiveFetch = adaptiveFetch;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAdaptiveFetch
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
|
setAdaptiveFetch
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dealExtend(List<SysExtendField> extendList, List<String> dictionaryValueList, Map<String, String> map,
StringBuilder sb) {
if (CommonUtils.notEmpty(extendList)) {
for (SysExtendField extendField : extendList) {
if (extendField.isSearchable()) {
if (ArrayUtils.contains(DICTIONARY_INPUT_TYPES, extendField.getInputType())) {
if (Config.INPUTTYPE_DICTIONARY.equals(extendField.getInputType())) {
String[] values = StringUtils.split(map.get(extendField.getId().getCode()), CommonConstants.COMMA);
if (CommonUtils.notEmpty(values)) {
for (String value : values) {
dictionaryValueList.add(extendField.getId().getCode() + "_" + value);
}
}
} else {
String value = map.get(extendField.getId().getCode());
if (null != value) {
dictionaryValueList.add(extendField.getId().getCode() + "_" + value);
}
}
} else {
String value = map.get(extendField.getId().getCode());
if (null != value) {
if (ArrayUtils.contains(FULLTEXT_SEARCHABLE_EDITOR, extendField.getInputType())) {
value = HtmlUtils.removeHtmlTag(value);
}
sb.append(value).append(CommonConstants.BLANK_SPACE);
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dealExtend
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
dealExtend
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPause() {
super.onPause();
mServiceListing.setListening(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPause
File: src/com/android/settings/notification/NotificationAccessSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
onPause
|
src/com/android/settings/notification/NotificationAccessSettings.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] getClientKexData() {
synchronized (kexState) {
return (clientKexData == null) ? null : clientKexData.clone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientKexData
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
getClientKexData
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@Override
public MediaType contentType() {
final String contentTypeString = get(HttpHeaderNames.CONTENT_TYPE);
if (contentTypeString == null) {
return null;
}
try {
return MediaType.parse(contentTypeString);
} catch (IllegalArgumentException unused) {
// Invalid media type
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contentType
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
|
contentType
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public JobLog toRestJobLog(LogTail logQueue, URI self, String level, String fromLevel) throws IOException
{
// Filter log
Iterable<LogEvent> logs;
if (level != null) {
LogLevel logLevel = LogLevel.valueOf(level.toUpperCase());
logs = logQueue.getLogEvents(logLevel).stream().filter(log -> log.getLevel() == logLevel)
.collect(Collectors.toList());
} else if (fromLevel != null) {
logs = logQueue.getLogEvents(LogLevel.valueOf(fromLevel.toUpperCase()));
} else {
logs = logQueue;
}
return toRestJobLog(logs, self);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toRestJobLog
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toRestJobLog
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isFatal() {
return fatal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFatal
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
isFatal
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
public WaitResult startActivityAndWait(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho,
int requestCode, int flags, ProfilerInfo profilerInfo, Bundle options,
int userId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAndWait
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startActivityAndWait
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public int startActivityAsUser(IApplicationThread caller, String callingPackage, Intent intent,
String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
ProfilerInfo profilerInfo, Bundle options, int userId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsUser
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startActivityAsUser
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getPrimaryColor() {
Color p = Color.valueOf(getDefaultColor("primary"));
String primary = p.color;
if ("custom".equals(getPropertyString("primaryColor"))) {
primary = getPropertyString("customPrimary");
} else if (!getPropertyString("primaryColor").isEmpty()) {
p = Color.valueOf(getPropertyString("primaryColor"));
if (p != null) {
primary = p.color;
}
}
return primary;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPrimaryColor
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getPrimaryColor
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
private boolean patternMatches(EasyField easyField, Object val) {
if (!(easyField instanceof EasyText)) return true;
Pattern patt = ((EasyText) easyField).getPattern();
return patt == null || patt.matcher((CharSequence) val).matches();
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-1613
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Fix long request (#599)
* fix: `trigger/exec-manual` async
* fix: lang
* fix: #596
Function: patternMatches
File: src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
Repository: getrebuild/rebuild
Fixed Code:
private boolean patternMatches(EasyField easyField, Object val) {
if (!(easyField instanceof EasyText)) return true;
Pattern patt = ((EasyText) easyField).getPattern();
return patt == null || patt.matcher((CharSequence) val).matches();
}
|
[
"CWE-79"
] |
CVE-2023-1613
|
MEDIUM
| 4
|
getrebuild/rebuild
|
patternMatches
|
src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
|
d0de4cc35303168f44ca57712c824b5cb9525e54
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserSwitchComplete(int userId) {
if (DEBUG) Log.d(TAG, String.format("onUserSwitchComplete %d", userId));
if (userId != UserHandle.USER_SYSTEM) {
UserInfo info = UserManager.get(mContext).getUserInfo(userId);
// Don't try to dismiss if the user has Pin/Pattern/Password set
if (info == null || mLockPatternUtils.isSecure(userId)) {
return;
} else if (info.isGuest() || info.isDemo()) {
// If we just switched to a guest, try to dismiss keyguard.
dismiss(null /* callback */, null /* message */);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserSwitchComplete
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onUserSwitchComplete
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void userCodeDeploymentConfig(XmlGenerator gen, Config config) {
UserCodeDeploymentConfig ucdConfig = config.getUserCodeDeploymentConfig();
gen.open("user-code-deployment", "enabled", ucdConfig.isEnabled())
.node("class-cache-mode", ucdConfig.getClassCacheMode())
.node("provider-mode", ucdConfig.getProviderMode())
.node("blacklist-prefixes", ucdConfig.getBlacklistedPrefixes())
.node("whitelist-prefixes", ucdConfig.getWhitelistedPrefixes())
.node("provider-filter", ucdConfig.getProviderFilter())
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userCodeDeploymentConfig
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
|
userCodeDeploymentConfig
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long reallocateMemory(long address, long newSize) {
return PlatformDependent0.reallocateMemory(address, newSize);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reallocateMemory
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
reallocateMemory
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Class<?> findMapFallback(JavaType type) {
return _mapFallbacks.get(type.getRawClass().getName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findMapFallback
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
findMapFallback
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBundleId(String val) {
this.bundleId = val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBundleId
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
setBundleId
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ObjectNode parse(
final TomlFactory tomlFactory,
final IOContext ioContext,
final Reader reader
) throws IOException {
final TomlFactory factory = tomlFactory == null ? new TomlFactory() : tomlFactory;
Parser parser = new Parser(factory, ioContext,
new TomlStreamReadException.ErrorContext(ioContext.contentReference(), null),
factory.getFormatParserFeatures(), reader);
try {
final ObjectNode node = parser.parse();
if (factory.isEnabled(TomlReadFeature.VALIDATE_NESTING_DEPTH) && parser.getNestingDepth() > 0) {
throw new IOException("Nesting Depth is non-zero after parsing TOML");
}
return node;
} finally {
parser.lexer.releaseBuffers();
}
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2023-3894
- Severity: HIGH
- CVSS Score: 7.5
Description: remove toml feature
Function: parse
File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
Repository: FasterXML/jackson-dataformats-text
Fixed Code:
public static ObjectNode parse(
final TomlFactory tomlFactory,
final IOContext ioContext,
final Reader reader
) throws IOException {
final TomlFactory factory = tomlFactory == null ? new TomlFactory() : tomlFactory;
Parser parser = new Parser(factory, ioContext,
new TomlStreamReadException.ErrorContext(ioContext.contentReference(), null),
factory.getFormatParserFeatures(), reader);
try {
final ObjectNode node = parser.parse();
assert parser.getNestingDepth() == 0;
return node;
} finally {
parser.lexer.releaseBuffers();
}
}
|
[
"CWE-787"
] |
CVE-2023-3894
|
HIGH
| 7.5
|
FasterXML/jackson-dataformats-text
|
parse
|
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
|
a05e4f3485d878153747b82937536e0b4b0f0579
| 1
|
Analyze the following code function for security vulnerabilities
|
public Set<String> getCoreScooldTypes() {
return Collections.unmodifiableSet(CORE_TYPES);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCoreScooldTypes
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
|
getCoreScooldTypes
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
void moveInputMethodDialogsLocked(int pos) {
ArrayList<WindowState> dialogs = mInputMethodDialogs;
// TODO(multidisplay): IMEs are only supported on the default display.
WindowList windows = getDefaultWindowListLocked();
final int N = dialogs.size();
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Removing " + N + " dialogs w/pos=" + pos);
for (int i=0; i<N; i++) {
pos = tmpRemoveWindowLocked(pos, dialogs.get(i));
}
if (DEBUG_INPUT_METHOD) {
Slog.v(TAG, "Window list w/pos=" + pos);
logWindowList(windows, " ");
}
if (pos >= 0) {
final AppWindowToken targetAppToken = mInputMethodTarget.mAppToken;
// Skip windows owned by the input method.
if (mInputMethodWindow != null) {
while (pos < windows.size()) {
WindowState wp = windows.get(pos);
if (wp == mInputMethodWindow || wp.mAttachedWindow == mInputMethodWindow) {
pos++;
continue;
}
break;
}
}
if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Adding " + N + " dialogs at pos=" + pos);
for (int i=0; i<N; i++) {
WindowState win = dialogs.get(i);
win.mTargetAppToken = targetAppToken;
pos = reAddWindowLocked(pos, win);
}
if (DEBUG_INPUT_METHOD) {
Slog.v(TAG, "Final window list:");
logWindowList(windows, " ");
}
return;
}
for (int i=0; i<N; i++) {
WindowState win = dialogs.get(i);
win.mTargetAppToken = null;
reAddWindowToListInOrderLocked(win);
if (DEBUG_INPUT_METHOD) {
Slog.v(TAG, "No IM target, final list:");
logWindowList(windows, " ");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveInputMethodDialogsLocked
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
|
moveInputMethodDialogsLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDismissKeyguardIfInsecure() {
mDismissKeyguardIfInsecure = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDismissKeyguardIfInsecure
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setDismissKeyguardIfInsecure
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getSliceHighlightMenuRes() {
return R.string.menu_key_location;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSliceHighlightMenuRes
File: src/com/android/settings/location/BluetoothScanningMainSwitchPreferenceController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21247
|
HIGH
| 7.8
|
android
|
getSliceHighlightMenuRes
|
src/com/android/settings/location/BluetoothScanningMainSwitchPreferenceController.java
|
edd4023805bc7fa54ae31de222cde02b9012bbc4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void processStanza(final Stanza stanza) throws InterruptedException {
assert(stanza != null);
lastStanzaReceived = System.currentTimeMillis();
// Deliver the incoming packet to listeners.
executorService.executeBlocking(new Runnable() {
@Override
public void run() {
invokePacketCollectorsAndNotifyRecvListeners(stanza);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processStanza
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
processStanza
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getActiveTenantDomains(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws APIManagementException {
try {
Set<String> tenantDomains = APIUtil.getActiveTenantDomains();
NativeArray domains = null;
int i = 0;
if (tenantDomains == null || tenantDomains.size() == 0) {
return domains;
} else {
domains = new NativeArray(tenantDomains.size());
for (String tenantDomain : tenantDomains) {
domains.put(i, domains, tenantDomain);
i++;
}
}
return domains;
} catch (org.wso2.carbon.user.api.UserStoreException e) {
throw new APIManagementException("Error while checking the APIStore is running in tenant mode or not.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getActiveTenantDomains
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getActiveTenantDomains
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int defaultMaxConnectionLifeTimeInMs() {
return Integer.getInteger(ASYNC_CLIENT + "maxConnectionLifeTimeInMs", -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultMaxConnectionLifeTimeInMs
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultMaxConnectionLifeTimeInMs
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateCharacterStream(@Positive int columnIndex,
@Nullable Reader reader) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(),
"updateCharaceterStream(int, Reader)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCharacterStream
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
|
updateCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public AccessibilityNodeInfo findFocus(int focus) {
return AccessibilityInteractionClient.getInstance().findFocus(mConnectionId,
AccessibilityNodeInfo.ANY_WINDOW_ID, AccessibilityNodeInfo.ROOT_NODE_ID, focus);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findFocus
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
findFocus
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean packageHasVisibilityOverride(String key) {
return mNotificationData.getVisibilityOverride(key) == Notification.VISIBILITY_PRIVATE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: packageHasVisibilityOverride
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
|
packageHasVisibilityOverride
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testSerializationAsTimestamp03Nanoseconds() throws Exception
{
Instant date = Instant.now();
String value = MAPPER.writer()
.with(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.with(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS)
.writeValueAsString(date);
assertEquals("The value is not correct.", DecimalUtils.toDecimal(date.getEpochSecond(), date.getNano()), value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSerializationAsTimestamp03Nanoseconds
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testSerializationAsTimestamp03Nanoseconds
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void injectUpdatedCustomMappings(XWikiContext context) throws XWikiException
{
Configuration config = getConfiguration();
injectInSessionFactory(config);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectUpdatedCustomMappings
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
injectUpdatedCustomMappings
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isModel(Object o) {
return o instanceof ModelObject;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isModel
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
isModel
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopAppFreezingScreen(IBinder token, boolean force) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppFreezingScreen()")) {
throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null || wtoken.appToken == null) {
return;
}
final long origId = Binder.clearCallingIdentity();
if (DEBUG_ORIENTATION) Slog.v(TAG, "Clear freezing of " + token
+ ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen);
unsetAppFreezingScreenLocked(wtoken, true, force);
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopAppFreezingScreen
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
|
stopAppFreezingScreen
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
Integer getInteger(int index, Integer defaultValue) {
final Integer val = getInteger(index);
return val == null ? defaultValue : val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInteger
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
getInteger
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
native boolean removeBondNative(byte[] address);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeBondNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
removeBondNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
static void dumpResources(IndentingPrintWriter pw, Context context, String resName, int resId) {
dumpApps(pw, resName, context.getResources().getStringArray(resId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpResources
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
|
dumpResources
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Workflow parseWorkflowNative(Path workflowFile, String packedWorkflowId) throws IOException {
// Check file size limit before parsing
long fileSizeBytes = Files.size(workflowFile);
if (fileSizeBytes <= singleFileSizeLimit) {
try (InputStream in = Files.newInputStream(workflowFile)) {
return parseWorkflowNative(in, packedWorkflowId,
workflowFile.getName(workflowFile.getNameCount()-1).toString());
}
} else {
throw new IOException("File '" + workflowFile.getFileName() + "' is over singleFileSizeLimit - " +
FileUtils.byteCountToDisplaySize(fileSizeBytes) + "/" +
FileUtils.byteCountToDisplaySize(singleFileSizeLimit));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseWorkflowNative
File: src/main/java/org/commonwl/view/cwl/CWLService.java
Repository: common-workflow-language/cwlviewer
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-41110
|
HIGH
| 7.5
|
common-workflow-language/cwlviewer
|
parseWorkflowNative
|
src/main/java/org/commonwl/view/cwl/CWLService.java
|
f6066f09edb70033a2ce80200e9fa9e70a5c29de
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getSubscribedAPIs(Context cx,
Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException, APIManagementException {
NativeArray apiArray = new NativeArray(0);
if (args != null && isStringArray(args)) {
String limitArg = args[0].toString();
int limit = Integer.parseInt(limitArg);
APIConsumer apiConsumer = getAPIConsumer(thisObj);
try {
Set<API> apiSet = apiConsumer.getTopRatedAPIs(limit);
if (apiSet != null) {
Iterator it = apiSet.iterator();
int i = 0;
while (it.hasNext()) {
NativeObject currentApi = new NativeObject();
Object apiObject = it.next();
API api = (API) apiObject;
APIIdentifier apiIdentifier = api.getId();
currentApi.put("name", currentApi, apiIdentifier.getApiName());
currentApi.put("provider", currentApi,
apiIdentifier.getProviderName());
currentApi.put("version", currentApi,
apiIdentifier.getVersion());
currentApi.put("description", currentApi, api.getDescription());
currentApi.put("rates", currentApi, api.getRating());
apiArray.put(i, apiArray, currentApi);
i++;
}
}
} catch (APIManagementException e) {
log.error("Error while getting API list", e);
return apiArray;
}
}// end of the if
return apiArray;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getSubscribedAPIs
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getSubscribedAPIs
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleTypeAndAttributes(Node node, Map<String, Object> elementMap) {
// Set type
if (node.getLocalName() != null) {
elementMap.put("_type", node.getLocalName());
}
// Set the attributes
if (node.getAttributes() != null) {
NamedNodeMap attributeMap = node.getAttributes();
for (int i = 0; i < attributeMap.getLength(); i++) {
Node attribute = attributeMap.item(i);
elementMap.put(attribute.getNodeName(), attribute.getNodeValue());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleTypeAndAttributes
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
handleTypeAndAttributes
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getIsSyncableAsUser(Account account, String providerName, int userId) {
enforceCrossUserPermission(userId,
"no permission to read the sync settings for user " + userId);
mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_SETTINGS,
"no permission to read the sync settings");
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
if (syncManager != null) {
return syncManager.getIsSyncable(
account, userId, providerName);
}
} finally {
restoreCallingIdentity(identityToken);
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIsSyncableAsUser
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
getIsSyncableAsUser
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalGrantPermissionsOnTopic(String role, Set<AuthAction> actions) {
// This operation should be reading from zookeeper and it should be allowed without having admin privileges
validateAdminAccessForTenant(namespaceName.getTenant());
validatePoliciesReadOnlyAccess();
PartitionedTopicMetadata meta = getPartitionedTopicMetadata(topicName, true, false);
int numPartitions = meta.partitions;
if (numPartitions > 0) {
for (int i = 0; i < numPartitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
grantPermissions(topicNamePartition.toString(), role, actions);
}
}
grantPermissions(topicName.toString(), role, actions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGrantPermissionsOnTopic
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGrantPermissionsOnTopic
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSON getJSON() {
return json;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJSON
File: samples/client/petstore/java/retrofit2-play26/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
|
getJSON
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerHttpResponse addResponseHeader(CharSequence name, CharSequence value) {
response.headers().add(name, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addResponseHeader
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
addResponseHeader
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Comment createComment(String data) {
return doc.createComment(data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createComment
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
|
createComment
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getOptions() {
return this.options;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOptions
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
getOptions
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void exportFile(FF4j ff4j, HttpServletResponse res) throws IOException {
Map<String, Feature> features = ff4j.getFeatureStore().readAll();
InputStream in = new XmlParser().exportFeatures(features);
ServletOutputStream sos = null;
try {
sos = res.getOutputStream();
res.setContentType("text/xml");
res.setHeader("Content-Disposition", "attachment; filename=\"ff4j.xml\"");
// res.setContentLength()
org.apache.commons.io.IOUtils.copy(in, sos);
LOGGER.info(features.size() + " features have been exported.");
} finally {
if (in != null) {
in.close();
}
if (sos != null) {
sos.flush();
sos.close();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exportFile
File: ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
exportFile
|
ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
private String processHandleFile(Context c, Item i, String path, String filename)
{
File file = new File(path + File.separatorChar + filename);
String result = null;
System.out.println("Processing handle file: " + filename);
if (file.exists())
{
BufferedReader is = null;
try
{
is = new BufferedReader(new FileReader(file));
// result gets contents of file, or null
result = is.readLine();
System.out.println("read handle: '" + result + "'");
}
catch (FileNotFoundException e)
{
// probably no handle file, just return null
System.out.println("It appears there is no handle file -- generating one");
}
catch (IOException e)
{
// probably no handle file, just return null
System.out.println("It appears there is no handle file -- generating one");
}
finally
{
if (is != null)
{
try
{
is.close();
}
catch (IOException e1)
{
System.err.println("Non-critical problem releasing resources.");
}
}
}
}
else
{
// probably no handle file, just return null
System.out.println("It appears there is no handle file -- generating one");
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processHandleFile
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
processHandleFile
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
WindowFrames getWindowFrames() {
return mWindowFrames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWindowFrames
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
getWindowFrames
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setWidthUndefined() {
checkColumnIsAttached();
if (!isWidthUndefined()) {
getState().width = -1;
getGrid().markAsDirty();
getGrid().fireColumnResizeEvent(this, false);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWidthUndefined
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
|
setWidthUndefined
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canCallPhone(String callingPackage, String message) {
// The system/default dialer can always read phone state - so that emergency calls will
// still work.
if (isPrivilegedDialerCalling(callingPackage)) {
return true;
}
// Accessing phone state is gated by a special permission.
mContext.enforceCallingOrSelfPermission(CALL_PHONE, message);
// Some apps that have the permission can be restricted via app ops.
return mAppOpsManager.noteOp(AppOpsManager.OP_CALL_PHONE,
Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canCallPhone
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
canCallPhone
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetUnreadMessagesCount() {
lastMessageUuid = null;
hideUnreadMessagesCount();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetUnreadMessagesCount
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
resetUnreadMessagesCount
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean mutateConfigSetting(String name, String value, String prefix,
boolean makeDefault, int operation, int mode) {
enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG);
final String callingPackage = resolveCallingPackage();
// Perform the mutation.
synchronized (mLock) {
switch (operation) {
case MUTATION_OPERATION_INSERT: {
return mSettingsRegistry.insertSettingLocked(SETTINGS_TYPE_CONFIG,
UserHandle.USER_SYSTEM, name, value, null, makeDefault, true,
callingPackage, false, null,
/* overrideableByRestore */ false);
}
case MUTATION_OPERATION_DELETE: {
return mSettingsRegistry.deleteSettingLocked(SETTINGS_TYPE_CONFIG,
UserHandle.USER_SYSTEM, name, false, null);
}
case MUTATION_OPERATION_RESET: {
mSettingsRegistry.resetSettingsLocked(SETTINGS_TYPE_CONFIG,
UserHandle.USER_SYSTEM, callingPackage, mode, null, prefix);
} return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mutateConfigSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
mutateConfigSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindIcon(boolean important) {
Drawable person = mIconFactory.getBaseIconDrawable(mShortcutInfo);
if (person == null) {
person = mContext.getDrawable(R.drawable.ic_person).mutate();
TypedArray ta = mContext.obtainStyledAttributes(new int[]{android.R.attr.colorAccent});
int colorAccent = ta.getColor(0, 0);
ta.recycle();
person.setTint(colorAccent);
}
ImageView image = findViewById(R.id.conversation_icon);
image.setImageDrawable(person);
ImageView app = findViewById(R.id.conversation_icon_badge_icon);
app.setImageDrawable(mIconFactory.getAppBadge(
mPackageName, UserHandle.getUserId(mSbn.getUid())));
findViewById(R.id.conversation_icon_badge_ring).setVisibility(important ? VISIBLE : GONE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindIcon
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
|
bindIcon
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection getConnection(DatabaseConfiguration databaseConfiguration, boolean forceNewConnection)
throws DatabaseServiceException {
try {
if (connection != null && !forceNewConnection) {
// logger.info("connection closed::{}", connection.isClosed());
if (!connection.isClosed()) {
if (logger.isDebugEnabled()) {
logger.debug("Returning existing connection::{}", connection);
}
return connection;
}
}
String dbURL = getDatabaseUrl(databaseConfiguration);
Class.forName(type.getClassPath());
// logger.info("*** type.getClassPath() ::{}, {}**** ", type.getClassPath());
DriverManager.setLoginTimeout(10);
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
if (logger.isDebugEnabled()) {
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
}
return connection;
} catch (ClassNotFoundException e) {
logger.error("Jdbc Driver not found", e);
throw new DatabaseServiceException(e.getMessage());
} catch (SQLException e) {
logger.error("SQLException::Couldn't get a Connection!", e);
throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage());
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-41886
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-qqh2-wvmv-h72m
Function: getConnection
File: extensions/database/src/com/google/refine/extension/database/mysql/MySQLConnectionManager.java
Repository: OpenRefine
Fixed Code:
public Connection getConnection(DatabaseConfiguration databaseConfiguration, boolean forceNewConnection)
throws DatabaseServiceException {
try {
if (connection != null && !forceNewConnection) {
// logger.info("connection closed::{}", connection.isClosed());
if (!connection.isClosed()) {
if (logger.isDebugEnabled()) {
logger.debug("Returning existing connection::{}", connection);
}
return connection;
}
}
String dbURL = databaseConfiguration.toURI().toString();
Class.forName(type.getClassPath());
// logger.info("*** type.getClassPath() ::{}, {}**** ", type.getClassPath());
DriverManager.setLoginTimeout(10);
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
if (logger.isDebugEnabled()) {
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
}
return connection;
} catch (ClassNotFoundException e) {
logger.error("Jdbc Driver not found", e);
throw new DatabaseServiceException(e.getMessage());
} catch (SQLException e) {
logger.error("SQLException::Couldn't get a Connection!", e);
throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage());
}
}
|
[
"CWE-89"
] |
CVE-2023-41886
|
HIGH
| 7.5
|
OpenRefine
|
getConnection
|
extensions/database/src/com/google/refine/extension/database/mysql/MySQLConnectionManager.java
|
2de1439f5be63d9d0e89bbacbd24fa28c8c3e29d
| 1
|
Analyze the following code function for security vulnerabilities
|
public TField readFieldBegin() throws TException {
byte type = readByte();
// if it's a stop, then we can return immediately, as the struct is over.
if (type == TType.STOP) {
return TSTOP;
}
short fieldId;
// mask off the 4 MSB of the type header. it could contain a field id delta.
short modifier = (short) ((type & 0xf0) >> 4);
if (modifier == 0) {
// not a delta. look ahead for the zigzag varint field id.
fieldId = readI16();
} else {
// has a delta. add the delta to the last read field id.
fieldId = (short) (lastFieldId_ + modifier);
}
TField field = new TField("", getTType((byte) (type & 0x0f)), fieldId);
// if this happens to be a boolean field, the value is encoded in the type
if (isBoolType(type)) {
// save the boolean value in a special instance variable.
boolValue_ = (byte) (type & 0x0f) == Types.BOOLEAN_TRUE ? Boolean.TRUE : Boolean.FALSE;
}
// push the new field onto the field stack so we can keep the deltas going.
lastFieldId_ = field.id;
return field;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFieldBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readFieldBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContextMenu(final int res) {
this.mResContextMenu = res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContextMenu
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
setContextMenu
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
void freezeInsetsState() {
if (mFrozenInsetsState == null) {
mFrozenInsetsState = new InsetsState(getInsetsState(), true /* copySources */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: freezeInsetsState
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
freezeInsetsState
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addToAddresses(Collection<String> addresses) {
addAddressesToList(addresses, mTo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToAddresses
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
addToAddresses
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateDeviceIdleTempAllowlist(@Nullable int[] appids, int changingUid,
boolean adding, long durationMs, @TempAllowListType int type,
@ReasonCode int reasonCode, @Nullable String reason, int callingUid) {
synchronized (ActivityManagerService.this) {
synchronized (mProcLock) {
if (appids != null) {
mDeviceIdleTempAllowlist = appids;
}
if (adding) {
if (type == TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_ALLOWED) {
// Note, the device idle temp-allowlist are by app-ids, but here
// mFgsStartTempAllowList contains UIDs.
mFgsStartTempAllowList.add(changingUid, durationMs,
new FgsTempAllowListItem(durationMs, reasonCode, reason,
callingUid));
}
} else {
mFgsStartTempAllowList.removeUid(changingUid);
}
setAppIdTempAllowlistStateLSP(changingUid, adding);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDeviceIdleTempAllowlist
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
|
updateDeviceIdleTempAllowlist
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Map<String, TemplateVariableGroup> getTemplateVariableGroups(
long classNameId, long classPK, String language, Locale locale)
throws Exception {
TemplateHandler templateHandler =
TemplateHandlerRegistryUtil.getTemplateHandler(classNameId);
if (templateHandler == null) {
return Collections.emptyMap();
}
Map<String, TemplateVariableGroup> templateVariableGroups =
templateHandler.getTemplateVariableGroups(
classPK, language, locale);
String[] restrictedVariables = templateHandler.getRestrictedVariables(
language);
TemplateVariableGroup portalServicesTemplateVariableGroup =
new TemplateVariableGroup("portal-services", restrictedVariables);
portalServicesTemplateVariableGroup.setAutocompleteEnabled(false);
portalServicesTemplateVariableGroup.addServiceLocatorVariables(
GroupLocalService.class, GroupService.class,
LayoutLocalService.class, LayoutService.class,
OrganizationLocalService.class, OrganizationService.class,
UserLocalService.class, UserService.class);
templateVariableGroups.put(
portalServicesTemplateVariableGroup.getLabel(),
portalServicesTemplateVariableGroup);
return templateVariableGroups;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTemplateVariableGroups
File: portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
Repository: samuelkong/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2963
|
MEDIUM
| 4.3
|
samuelkong/liferay-portal
|
getTemplateVariableGroups
|
portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
|
5db1f7622e8e2c9a559ef0145a0f04c5854a1e8b
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] verifyTiedProfileChallenge(String password, boolean isPattern, long challenge,
int userId) throws RequestThrottledException {
throwIfCalledOnMainThread();
try {
VerifyCredentialResponse response =
getLockSettings().verifyTiedProfileChallenge(password, isPattern, challenge,
userId);
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
return response.getPayload();
} else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
throw new RequestThrottledException(response.getTimeout());
} else {
return null;
}
} catch (RemoteException re) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyTiedProfileChallenge
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
verifyTiedProfileChallenge
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setSessionLock(WrappedSession wrappedSession, Lock lock) {
if (wrappedSession == null) {
throw new IllegalArgumentException(
"Can't set a lock for a null session");
}
Object currentSessionLock = wrappedSession
.getAttribute(getLockAttributeName());
assert (currentSessionLock == null
|| currentSessionLock == lock) : "Changing the lock for a session is not allowed";
wrappedSession.setAttribute(getLockAttributeName(), lock);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSessionLock
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
|
setSessionLock
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removePlugin(String projectName, String pluginName, AsyncMethodCallback resultHandler) {
unimplemented(resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePlugin
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
|
removePlugin
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
ctx.read();
super.channelActive(ctx);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: channelActive
File: ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-17513
|
MEDIUM
| 5
|
ratpack
|
channelActive
|
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
|
efb910d38a96494256f36675ef0e5061097dd77d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void customizeClientBuilder(ClientBuilder clientBuilder) {
// No-op extension point
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: customizeClientBuilder
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
|
customizeClientBuilder
|
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
|
private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app) {
List<ProviderInfo> providers = null;
try {
ParceledListSlice<ProviderInfo> slice = AppGlobals.getPackageManager().
queryContentProviders(app.processName, app.uid,
STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);
providers = slice != null ? slice.getList() : null;
} catch (RemoteException ex) {
}
if (DEBUG_MU) Slog.v(TAG_MU,
"generateApplicationProvidersLocked, app.info.uid = " + app.uid);
int userId = app.userId;
if (providers != null) {
int N = providers.size();
app.pubProviders.ensureCapacity(N + app.pubProviders.size());
for (int i=0; i<N; i++) {
ProviderInfo cpi =
(ProviderInfo)providers.get(i);
boolean singleton = isSingleton(cpi.processName, cpi.applicationInfo,
cpi.name, cpi.flags);
if (singleton && UserHandle.getUserId(app.uid) != UserHandle.USER_OWNER) {
// This is a singleton provider, but a user besides the
// default user is asking to initialize a process it runs
// in... well, no, it doesn't actually run in this process,
// it runs in the process of the default user. Get rid of it.
providers.remove(i);
N--;
i--;
continue;
}
ComponentName comp = new ComponentName(cpi.packageName, cpi.name);
ContentProviderRecord cpr = mProviderMap.getProviderByClass(comp, userId);
if (cpr == null) {
cpr = new ContentProviderRecord(this, cpi, app.info, comp, singleton);
mProviderMap.putProviderByClass(comp, cpr);
}
if (DEBUG_MU) Slog.v(TAG_MU,
"generateApplicationProvidersLocked, cpi.uid = " + cpr.uid);
app.pubProviders.put(cpi.name, cpr);
if (!cpi.multiprocess || !"android".equals(cpi.packageName)) {
// Don't add this if it is a platform component that is marked
// to run in multiple processes, because this is actually
// part of the framework so doesn't make sense to track as a
// separate apk in the process.
app.addPackage(cpi.applicationInfo.packageName, cpi.applicationInfo.versionCode,
mProcessStats);
}
ensurePackageDexOpt(cpi.applicationInfo.packageName);
}
}
return providers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateApplicationProvidersLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
generateApplicationProvidersLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyLockedProfile(@UserIdInt int userId) {
try {
if (!AppGlobals.getPackageManager().isUidPrivileged(Binder.getCallingUid())) {
throw new SecurityException("Only privileged app can call notifyLockedProfile");
}
} catch (RemoteException ex) {
throw new SecurityException("Fail to check is caller a privileged app", ex);
}
synchronized (this) {
final long ident = Binder.clearCallingIdentity();
try {
if (mUserController.shouldConfirmCredentials(userId)) {
if (mKeyguardController.isKeyguardLocked()) {
// Showing launcher to avoid user entering credential twice.
final int currentUserId = mUserController.getCurrentUserId();
startHomeActivityLocked(currentUserId, "notifyLockedProfile");
}
mStackSupervisor.lockAllProfileTasks(userId);
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyLockedProfile
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
|
notifyLockedProfile
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
UserHandle getUser() {
return user;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getUser
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<PollRequest> unmarshalRequests(Element env)
throws Exception
{
try
{
List<PollRequest> requests = new ArrayList<PollRequest>();
List<Element> requestElements = env.element("body").elements("poll");
for (Element e : requestElements)
{
requests.add(new PollRequest(e.attributeValue("token"),
Integer.parseInt(e.attributeValue("timeout"))));
}
return requests;
}
catch (Exception ex)
{
log.error("Error unmarshalling subscriptions from request", ex);
throw ex;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshalRequests
File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/PollHandler.java
Repository: seam2/jboss-seam
The code follows secure coding practices.
|
[
"CWE-264",
"CWE-200"
] |
CVE-2013-6447
|
MEDIUM
| 5
|
seam2/jboss-seam
|
unmarshalRequests
|
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/PollHandler.java
|
090aa6252affc978a96c388e3fc2c1c2688d9bb5
| 0
|
Analyze the following code function for security vulnerabilities
|
VerifyResult verifyJarEntryCerts(String jarName, boolean jarHasManifest,
Vector<JarEntry> entries) throws Exception {
// Contains number of entries the cert with this CertPath has signed.
Map<CertPath, Integer> jarSignCount = new HashMap<>();
int numSignableEntriesInJar = 0;
// Record current time just before checking the jar begins.
long now = System.currentTimeMillis();
if (jarHasManifest) {
for (JarEntry je : entries) {
String name = je.getName();
CodeSigner[] signers = je.getCodeSigners();
boolean isSigned = (signers != null);
boolean shouldHaveSignature = !je.isDirectory()
&& !isMetaInfFile(name);
if (shouldHaveSignature) {
numSignableEntriesInJar++;
}
if (shouldHaveSignature && isSigned) {
for (CodeSigner signer : signers) {
CertPath certPath = signer.getSignerCertPath();
if (!jarSignCount.containsKey(certPath))
jarSignCount.put(certPath, 1);
else
jarSignCount.put(certPath,
jarSignCount.get(certPath) + 1);
}
}
} // while e has more elements
} else { // if manifest is null
// Else increment total entries by 1 so that unsigned jars with
// no manifests can't sneak in
numSignableEntriesInJar++;
}
jarSignableEntries.put(jarName, numSignableEntriesInJar);
// Find all signers that have signed every signable entry in this jar.
boolean allEntriesSignedBySingleCert = false;
for (CertPath certPath : jarSignCount.keySet()) {
if (jarSignCount.get(certPath) == numSignableEntriesInJar) {
allEntriesSignedBySingleCert = true;
boolean wasPreviouslyVerified = certs.containsKey(certPath);
if (!wasPreviouslyVerified)
certs.put(certPath, new CertInformation());
CertInformation certInfo = certs.get(certPath);
if (wasPreviouslyVerified)
certInfo.resetForReverification();
certInfo.setNumJarEntriesSigned(jarName,
numSignableEntriesInJar);
Certificate cert = certPath.getCertificates().get(0);
if (cert instanceof X509Certificate) {
checkCertUsage(certPath, (X509Certificate) cert, null);
long notBefore = ((X509Certificate) cert).getNotBefore().getTime();
long notAfter = ((X509Certificate) cert).getNotAfter().getTime();
if (now < notBefore) {
certInfo.setNotYetValidCert();
}
if (notAfter < now) {
certInfo.setHasExpiredCert();
} else if (notAfter < now + SIX_MONTHS) {
certInfo.setHasExpiringCert();
}
}
}
}
// Every signable entry of this jar needs to be signed by at least
// one signer for the jar to be considered successfully signed.
VerifyResult result = null;
if (numSignableEntriesInJar == 0) {
// Allow jars with no signable entries to simply be considered signed.
// There should be no security risk in doing so.
result = VerifyResult.SIGNED_OK;
} else if (allEntriesSignedBySingleCert) {
// We need to find at least one signer without any issues.
for (CertPath entryCertPath : jarSignCount.keySet()) {
if (certs.containsKey(entryCertPath)
&& !hasSigningIssues(entryCertPath)) {
result = VerifyResult.SIGNED_OK;
break;
}
}
if (result == null) {
// All signers had issues
result = VerifyResult.SIGNED_NOT_OK;
}
} else {
result = VerifyResult.UNSIGNED;
}
LOG.debug("Jar found at {} has been verified as {}", jarName, result);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyJarEntryCerts
File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.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
|
verifyJarEntryCerts
|
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
|
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
| 0
|
Analyze the following code function for security vulnerabilities
|
private String extractDoc(JsonNode node) {
if (node != null) {
if (node.has(DOC)) {
return node.get(DOC).asText();
} else if (node.has(DESCRIPTION)) {
// This is to support older standards of cwl which use description instead of doc
return node.get(DESCRIPTION).asText();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractDoc
File: src/main/java/org/commonwl/view/cwl/CWLService.java
Repository: common-workflow-language/cwlviewer
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-41110
|
HIGH
| 7.5
|
common-workflow-language/cwlviewer
|
extractDoc
|
src/main/java/org/commonwl/view/cwl/CWLService.java
|
f6066f09edb70033a2ce80200e9fa9e70a5c29de
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean serveStaticResource(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String filenameWithPath = getRequestFilename(request);
if (HandlerHelper.isPathUnsafe(filenameWithPath)) {
getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN,
filenameWithPath);
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return true;
}
URL resourceUrl = null;
if (isAllowedVAADINBuildUrl(filenameWithPath)) {
resourceUrl = servletService.getClassLoader()
.getResource("META-INF" + filenameWithPath);
}
if (resourceUrl == null) {
resourceUrl = servletService.getStaticResource(filenameWithPath);
}
if (resourceUrl == null && shouldFixIncorrectWebjarPaths()
&& isIncorrectWebjarPath(filenameWithPath)) {
// Flow issue #4601
resourceUrl = servletService.getStaticResource(
fixIncorrectWebjarPath(filenameWithPath));
}
if (resourceUrl == null) {
// Not found in webcontent or in META-INF/resources in some JAR
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return true;
}
// There is a resource!
// Intentionally writing cache headers also for 304 responses
writeCacheHeaders(filenameWithPath, response);
long timestamp = writeModificationTimestamp(resourceUrl, request,
response);
if (browserHasNewestVersion(request, timestamp)) {
// Browser is up to date, nothing further to do than set the
// response code
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return true;
}
responseWriter.writeResponseContents(filenameWithPath, resourceUrl,
request, response);
return true;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-36321
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Add unit tests and change status code
Function: serveStaticResource
File: flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
Repository: vaadin/flow
Fixed Code:
@Override
public boolean serveStaticResource(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String filenameWithPath = getRequestFilename(request);
if (HandlerHelper.isPathUnsafe(filenameWithPath)) {
getLogger().info(HandlerHelper.UNSAFE_PATH_ERROR_MESSAGE_PATTERN,
filenameWithPath);
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
return true;
}
URL resourceUrl = null;
if (isAllowedVAADINBuildUrl(filenameWithPath)) {
resourceUrl = servletService.getClassLoader()
.getResource("META-INF" + filenameWithPath);
}
if (resourceUrl == null) {
resourceUrl = servletService.getStaticResource(filenameWithPath);
}
if (resourceUrl == null && shouldFixIncorrectWebjarPaths()
&& isIncorrectWebjarPath(filenameWithPath)) {
// Flow issue #4601
resourceUrl = servletService.getStaticResource(
fixIncorrectWebjarPath(filenameWithPath));
}
if (resourceUrl == null) {
// Not found in webcontent or in META-INF/resources in some JAR
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return true;
}
// There is a resource!
// Intentionally writing cache headers also for 304 responses
writeCacheHeaders(filenameWithPath, response);
long timestamp = writeModificationTimestamp(resourceUrl, request,
response);
if (browserHasNewestVersion(request, timestamp)) {
// Browser is up to date, nothing further to do than set the
// response code
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return true;
}
responseWriter.writeResponseContents(filenameWithPath, resourceUrl,
request, response);
return true;
}
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
serveStaticResource
|
flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 1
|
Analyze the following code function for security vulnerabilities
|
public static final native void sendSignalQuiet(int pid, int signal);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSignalQuiet
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
sendSignalQuiet
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean processRequest() throws WebdavException {
final String addMemberSuffix = intf.getAddMemberSuffix();
if (addMemberSuffix == null) {
return false;
}
final String reqUri = req.getRequestURI();
if (reqUri == null) {
return false;
}
final int pos = reqUri.lastIndexOf("/");
if ((pos > 0) && reqUri.regionMatches(pos + 1,
addMemberSuffix,
0,
addMemberSuffix.length())) {
addMember = true;
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRequest
File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
Repository: Bedework/bw-webdav
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
processRequest
|
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
|
67283fb8b9609acdb1a8d2e7fefe195b4a261062
| 0
|
Analyze the following code function for security vulnerabilities
|
private void installNotification(NotificationId id, final Notification notification,
String packageName, int userId) {
final long token = clearCallingIdentity();
try {
INotificationManager notificationManager = mInjector.getNotificationManager();
try {
// The calling uid must match either the package or op package, so use an op
// package that matches the cleared calling identity.
notificationManager.enqueueNotificationWithTag(packageName, "android",
id.mTag, id.mId, notification, userId);
} catch (RemoteException e) {
/* ignore - local call */
}
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installNotification
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
|
installNotification
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String exportSPApplicationFromAppID(String applicationId, boolean exportSecrets,
String tenantDomain) throws IdentityApplicationManagementException {
ApplicationBasicInfo application = getApplicationBasicInfoByResourceId(applicationId, tenantDomain);
if (application == null) {
throw buildClientException(APPLICATION_NOT_FOUND, "Application could not be found " +
"for the provided resourceId: " + applicationId);
}
String appName = application.getApplicationName();
try {
startTenantFlow(tenantDomain);
return exportSPApplication(appName, exportSecrets, tenantDomain);
} finally {
endTenantFlow();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exportSPApplicationFromAppID
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
exportSPApplicationFromAppID
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindActions() {
// TODO: b/152050825
/*
Button home = findViewById(R.id.home);
home.setOnClickListener(mOnHomeClick);
home.setVisibility(mShortcutInfo != null
&& mShortcutManager.isRequestPinShortcutSupported()
? VISIBLE : GONE);
Button snooze = findViewById(R.id.snooze);
snooze.setOnClickListener(mOnSnoozeClick);
*/
if (mAppBubble == BUBBLE_PREFERENCE_ALL) {
((TextView) findViewById(R.id.default_summary)).setText(getResources().getString(
R.string.notification_channel_summary_default_with_bubbles, mAppName));
}
findViewById(R.id.priority).setOnClickListener(mOnFavoriteClick);
findViewById(R.id.default_behavior).setOnClickListener(mOnDefaultClick);
findViewById(R.id.silence).setOnClickListener(mOnMuteClick);
final View settingsButton = findViewById(R.id.info);
settingsButton.setOnClickListener(getSettingsOnClickListener());
settingsButton.setVisibility(settingsButton.hasOnClickListeners() ? VISIBLE : GONE);
updateToggleActions(mSelectedAction == -1 ? getPriority() : mSelectedAction,
false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindActions
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
|
bindActions
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.