instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public String handlePageNotFound(Map<String, Object> data) {
if (PROFILE.equals(userview.getParamString("menuId"))) {
return pageProfile(data);
} else if (INBOX.equals(userview.getParamString("menuId"))) {
return pageInbox(data);
} else {
return super.handlePageNotFound(data);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePageNotFound
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
|
handlePageNotFound
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
static float measurePara(TextPaint paint, CharSequence text, int start, int end) {
MeasuredText mt = MeasuredText.obtain();
TextLine tl = TextLine.obtain();
try {
mt.setPara(text, start, end, TextDirectionHeuristics.LTR, null);
Directions directions;
int dir;
if (mt.mEasy) {
directions = DIRS_ALL_LEFT_TO_RIGHT;
dir = Layout.DIR_LEFT_TO_RIGHT;
} else {
directions = AndroidBidi.directions(mt.mDir, mt.mLevels,
0, mt.mChars, 0, mt.mLen);
dir = mt.mDir;
}
char[] chars = mt.mChars;
int len = mt.mLen;
boolean hasTabs = false;
TabStops tabStops = null;
// leading margins should be taken into account when measuring a paragraph
int margin = 0;
if (text instanceof Spanned) {
Spanned spanned = (Spanned) text;
LeadingMarginSpan[] spans = getParagraphSpans(spanned, start, end,
LeadingMarginSpan.class);
for (LeadingMarginSpan lms : spans) {
margin += lms.getLeadingMargin(true);
}
}
for (int i = 0; i < len; ++i) {
if (chars[i] == '\t') {
hasTabs = true;
if (text instanceof Spanned) {
Spanned spanned = (Spanned) text;
int spanEnd = spanned.nextSpanTransition(start, end,
TabStopSpan.class);
TabStopSpan[] spans = getParagraphSpans(spanned, start, spanEnd,
TabStopSpan.class);
if (spans.length > 0) {
tabStops = new TabStops(TAB_INCREMENT, spans);
}
}
break;
}
}
tl.set(paint, text, start, end, dir, directions, hasTabs, tabStops);
return margin + tl.metrics(null);
} finally {
TextLine.recycle(tl);
MeasuredText.recycle(mt);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: measurePara
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
measurePara
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public void buildBundle(HttpHeaders httpHeaders, Subject currentSubject) {
final ProxiedResourceHelper proxiedResourceHelper = new ProxiedResourceHelper(httpHeaders, currentSubject, nodeService, remoteInterfaceProvider, executor);
final var manifestsResponse = proxiedResourceHelper.requestOnAllNodes(
RemoteSupportBundleInterface.class,
RemoteSupportBundleInterface::getNodeManifest, CALL_TIMEOUT);
final Map<String, SupportBundleNodeManifest> nodeManifests = extractManifests(manifestsResponse);
Path bundleSpoolDir = null;
try {
bundleSpoolDir = prepareBundleSpoolDir();
final Path finalSpoolDir = bundleSpoolDir; // needed for the lambda
// Fetch from all nodes in parallel
final List<CompletableFuture<Void>> futures = nodeManifests.entrySet().stream().map(entry ->
CompletableFuture.runAsync(() -> fetchNodeInfos(proxiedResourceHelper, entry.getKey(), entry.getValue(), finalSpoolDir), executor)).toList();
for (CompletableFuture<Void> f : futures) {
f.get();
}
fetchClusterInfos(proxiedResourceHelper, nodeManifests, bundleSpoolDir);
writeZipFile(bundleSpoolDir);
} catch (Exception e) {
LOG.warn("Exception while trying to build support bundle", e);
throw new ServerErrorException(Response.Status.INTERNAL_SERVER_ERROR, e);
} finally {
try {
if (bundleSpoolDir != null) {
FileUtils.deleteDirectory(bundleSpoolDir.toFile());
}
} catch (IOException e) {
LOG.error("Failed to cleanup temp directory <{}>", bundleSpoolDir);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildBundle
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
buildBundle
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onChildLocationsChanged(
NotificationStackScrollLayout stackScrollLayout) {
if (mHandler.hasCallbacks(mVisibilityReporter)) {
// Visibilities will be reported when the existing
// callback is executed.
return;
}
// Calculate when we're allowed to run the visibility
// reporter. Note that this timestamp might already have
// passed. That's OK, the callback will just be executed
// ASAP.
long nextReportUptimeMs =
mLastVisibilityReportUptimeMs + VISIBILITY_REPORT_MIN_DELAY_MS;
mHandler.postAtTime(mVisibilityReporter, nextReportUptimeMs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChildLocationsChanged
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
|
onChildLocationsChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setLaunchingAffordance(boolean launchingAffordance) {
getLeftIcon().setLaunchingAffordance(launchingAffordance);
getRightIcon().setLaunchingAffordance(launchingAffordance);
getCenterIcon().setLaunchingAffordance(launchingAffordance);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLaunchingAffordance
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setLaunchingAffordance
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "process_date", length = 19)
public Date getProcessDate() {
return this.processDate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessDate
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getProcessDate
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private void toggleMedia(boolean enable, boolean video) {
String message;
if (video) {
message = "videoOff";
if (enable) {
binding.cameraButton.setAlpha(1.0f);
message = "videoOn";
startVideoCapture();
} else {
binding.cameraButton.setAlpha(0.7f);
if (videoCapturer != null) {
try {
videoCapturer.stopCapture();
} catch (InterruptedException e) {
Log.d(TAG, "Failed to stop capturing video while sensor is near the ear");
}
}
}
if (localStream != null && localStream.videoTracks.size() > 0) {
localStream.videoTracks.get(0).setEnabled(enable);
}
if (enable) {
binding.selfVideoRenderer.setVisibility(View.VISIBLE);
} else {
binding.selfVideoRenderer.setVisibility(View.INVISIBLE);
}
} else {
message = "audioOff";
if (enable) {
message = "audioOn";
binding.microphoneButton.setAlpha(1.0f);
} else {
binding.microphoneButton.setAlpha(0.7f);
}
if (localStream != null && localStream.audioTracks.size() > 0) {
localStream.audioTracks.get(0).setEnabled(enable);
}
}
if (isConnectionEstablished() && peerConnectionWrapperList != null) {
if (!hasMCU) {
for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
peerConnectionWrapper.sendChannelData(new DataChannelMessage(message));
}
} else {
for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
if (peerConnectionWrapper.getSessionId().equals(webSocketClient.getSessionId())) {
peerConnectionWrapper.sendChannelData(new DataChannelMessage(message));
break;
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toggleMedia
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
toggleMedia
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void _buildDutySchedules(final Map<String,User> users) {
m_dutySchedules = new HashMap<String,List<DutySchedule>>();
for (final Entry<String,User> entry : users.entrySet()) {
final String key = entry.getKey();
final User curUser = entry.getValue();
if (curUser.getDutySchedules().size() > 0) {
final List<DutySchedule> dutyList = new ArrayList<DutySchedule>();
for (final String duty : curUser.getDutySchedules()) {
dutyList.add(new DutySchedule(duty));
}
m_dutySchedules.put(key, dutyList);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _buildDutySchedules
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
_buildDutySchedules
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logInstallKeyPairFailure(CallerIdentity caller,
boolean isCredentialManagementApp) {
if (!isCredentialManagementApp) {
return;
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.CREDENTIAL_MANAGEMENT_APP_INSTALL_KEY_PAIR_FAILED)
.setStrings(caller.getPackageName())
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logInstallKeyPairFailure
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
|
logInstallKeyPairFailure
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder cdata(String data) {
super.cdataImpl(data);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cdata
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
cdata
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Path getResourceCachePath(URI uri) throws IOException {
Path resourceCachePath = Paths.get(CACHE_PATH, uri.getScheme(), uri.getHost(), uri.getPath());
return FilesUtils.getDeployedPath(resourceCachePath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceCachePath
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
getResourceCachePath
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Analyze the following code function for security vulnerabilities
|
void startAlternateRecentsActivity(ActivityManager.RunningTaskInfo topTask,
ActivityOptions opts, boolean fromHome, boolean fromSearchHome, boolean fromThumbnail,
TaskStackViewLayoutAlgorithm.VisibilityReport vr) {
// Update the configuration based on the launch options
mConfig.launchedFromHome = fromSearchHome || fromHome;
mConfig.launchedFromSearchHome = fromSearchHome;
mConfig.launchedFromAppWithThumbnail = fromThumbnail;
mConfig.launchedToTaskId = (topTask != null) ? topTask.id : -1;
mConfig.launchedWithAltTab = mTriggeredFromAltTab;
mConfig.launchedReuseTaskStackViews = mCanReuseTaskStackViews;
mConfig.launchedNumVisibleTasks = vr.numVisibleTasks;
mConfig.launchedNumVisibleThumbnails = vr.numVisibleThumbnails;
mConfig.launchedHasConfigurationChanged = false;
Intent intent = new Intent(sToggleRecentsAction);
intent.setClassName(sRecentsPackage, sRecentsActivity);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| Intent.FLAG_ACTIVITY_TASK_ON_HOME);
if (opts != null) {
mContext.startActivityAsUser(intent, opts.toBundle(), UserHandle.CURRENT);
} else {
mContext.startActivityAsUser(intent, UserHandle.CURRENT);
}
mCanReuseTaskStackViews = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAlternateRecentsActivity
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
startAlternateRecentsActivity
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/updateAvatar")
@ResponseBody
public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file)
{
SysUser currentUser = getSysUser();
try
{
if (!file.isEmpty())
{
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file);
currentUser.setAvatar(avatar);
if (userService.updateUserInfo(currentUser) > 0)
{
setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
}
return error();
}
catch (Exception e)
{
log.error("修改头像失败!", e);
return error(e.getMessage());
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2022-32065
- Severity: LOW
- CVSS Score: 3.5
Description: 用户头像上传格式限制
Function: updateAvatar
File: ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
Repository: yangzongzhuan/RuoYi
Fixed Code:
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/updateAvatar")
@ResponseBody
public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file)
{
SysUser currentUser = getSysUser();
try
{
if (!file.isEmpty())
{
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
currentUser.setAvatar(avatar);
if (userService.updateUserInfo(currentUser) > 0)
{
setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
}
return error();
}
catch (Exception e)
{
log.error("修改头像失败!", e);
return error(e.getMessage());
}
}
|
[
"CWE-79"
] |
CVE-2022-32065
|
LOW
| 3.5
|
yangzongzhuan/RuoYi
|
updateAvatar
|
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
|
d8b2a9a905fb750fa60e2400238cf4750a77c5e6
| 1
|
Analyze the following code function for security vulnerabilities
|
public void saveWithProgrammingRights() throws XWikiException
{
saveWithProgrammingRights("", false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveWithProgrammingRights
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
saveWithProgrammingRights
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFolder(String folder) {
this.folder = folder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFolder
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
setFolder
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void closeSystemDialogs(String reason) {
synchronized(mWindowMap) {
final int numDisplays = mDisplayContents.size();
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
final int numWindows = windows.size();
for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
final WindowState w = windows.get(winNdx);
if (w.mHasSurface) {
try {
w.mClient.closeSystemDialogs(reason);
} catch (RemoteException e) {
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeSystemDialogs
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
|
closeSystemDialogs
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public Builder setSound(Uri sound) {
mN.sound = sound;
mN.audioAttributes = AUDIO_ATTRIBUTES_DEFAULT;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSound
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSound
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@PUT
@Path("{userCriteria}/roles/{roleName}")
public Response addRole(@Context final SecurityContext securityContext, @PathParam("userCriteria") final String userCriteria, @PathParam("roleName") final String roleName) {
writeLock();
try {
if (!hasEditRights(securityContext)) {
throw getException(Status.BAD_REQUEST, "User {} does not have write access to users!", securityContext.getUserPrincipal().getName());
}
if (! Authentication.isValidRole(roleName)) {
throw getException(Status.BAD_REQUEST, "Invalid role {}!", roleName);
}
final OnmsUser user = getOnmsUser(userCriteria);
LOG.debug("addRole: updating user {}", user);
boolean modified = false;
if (!user.getRoles().contains(roleName)) {
user.getRoles().add(roleName);
modified = true;
}
if (modified) {
LOG.debug("addRole: user {} updated", user);
try {
m_userManager.save(user);
} catch (final Throwable t) {
throw getException(Status.INTERNAL_SERVER_ERROR, t);
}
return Response.noContent().build();
}
return Response.notModified().build();
} finally {
writeUnlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRole
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-0872
|
HIGH
| 8
|
OpenNMS/opennms
|
addRole
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
|
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void update(StringWriter stringWriter, Connection connection, String fromVersion) throws SQLException, IOException {
switch (fromVersion) {
case VERSION_20170708:
runScript(stringWriter, connection, VERSION_20170708, VERSION_20180210);
case VERSION_20180210:
runScript(stringWriter, connection, VERSION_20180210, VERSION_180707);
case VERSION_180707:
updateMetadata(stringWriter, connection);
runScript(stringWriter, connection, VERSION_180707, VERSION_180825);
case VERSION_180825:
runScript(stringWriter, connection, VERSION_180825, VERSION_180825);
case VERSION_181024:
runScript(stringWriter, connection, VERSION_181024, CmsVersion.getVersion());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-20914
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
update
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java
|
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cloneInto(Notification that, boolean heavy) {
that.mAllowlistToken = this.mAllowlistToken;
that.when = this.when;
that.creationTime = this.creationTime;
that.mSmallIcon = this.mSmallIcon;
that.number = this.number;
// PendingIntents are global, so there's no reason (or way) to clone them.
that.contentIntent = this.contentIntent;
that.deleteIntent = this.deleteIntent;
that.fullScreenIntent = this.fullScreenIntent;
if (this.tickerText != null) {
that.tickerText = this.tickerText.toString();
}
if (heavy && this.tickerView != null) {
that.tickerView = this.tickerView.clone();
}
if (heavy && this.contentView != null) {
that.contentView = this.contentView.clone();
}
if (heavy && this.mLargeIcon != null) {
that.mLargeIcon = this.mLargeIcon;
}
that.iconLevel = this.iconLevel;
that.sound = this.sound; // android.net.Uri is immutable
that.audioStreamType = this.audioStreamType;
if (this.audioAttributes != null) {
that.audioAttributes = new AudioAttributes.Builder(this.audioAttributes).build();
}
final long[] vibrate = this.vibrate;
if (vibrate != null) {
final int N = vibrate.length;
final long[] vib = that.vibrate = new long[N];
System.arraycopy(vibrate, 0, vib, 0, N);
}
that.ledARGB = this.ledARGB;
that.ledOnMS = this.ledOnMS;
that.ledOffMS = this.ledOffMS;
that.defaults = this.defaults;
that.flags = this.flags;
that.priority = this.priority;
that.category = this.category;
that.mGroupKey = this.mGroupKey;
that.mSortKey = this.mSortKey;
if (this.extras != null) {
try {
that.extras = new Bundle(this.extras);
// will unparcel
that.extras.size();
} catch (BadParcelableException e) {
Log.e(TAG, "could not unparcel extras from notification: " + this, e);
that.extras = null;
}
}
if (!ArrayUtils.isEmpty(allPendingIntents)) {
that.allPendingIntents = new ArraySet<>(allPendingIntents);
}
if (this.actions != null) {
that.actions = new Action[this.actions.length];
for(int i=0; i<this.actions.length; i++) {
if ( this.actions[i] != null) {
that.actions[i] = this.actions[i].clone();
}
}
}
if (heavy && this.bigContentView != null) {
that.bigContentView = this.bigContentView.clone();
}
if (heavy && this.headsUpContentView != null) {
that.headsUpContentView = this.headsUpContentView.clone();
}
that.visibility = this.visibility;
if (this.publicVersion != null) {
that.publicVersion = new Notification();
this.publicVersion.cloneInto(that.publicVersion, heavy);
}
that.color = this.color;
that.mChannelId = this.mChannelId;
that.mTimeout = this.mTimeout;
that.mShortcutId = this.mShortcutId;
that.mLocusId = this.mLocusId;
that.mBadgeIcon = this.mBadgeIcon;
that.mSettingsText = this.mSettingsText;
that.mGroupAlertBehavior = this.mGroupAlertBehavior;
that.mFgsDeferBehavior = this.mFgsDeferBehavior;
that.mBubbleMetadata = this.mBubbleMetadata;
that.mAllowSystemGeneratedContextualActions = this.mAllowSystemGeneratedContextualActions;
if (!heavy) {
that.lightenPayload(); // will clean out extras
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cloneInto
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
cloneInto
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean moveAffiliatedTasksToFront(TaskRecord task, int taskIndex) {
int N = mRecentTasks.size();
TaskRecord top = task;
int topIndex = taskIndex;
while (top.mNextAffiliate != null && topIndex > 0) {
top = top.mNextAffiliate;
topIndex--;
}
if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: adding affilliates starting at "
+ topIndex + " from intial " + taskIndex);
// Find the end of the chain, doing a sanity check along the way.
boolean sane = top.mAffiliatedTaskId == task.mAffiliatedTaskId;
int endIndex = topIndex;
TaskRecord prev = top;
while (endIndex < N) {
TaskRecord cur = mRecentTasks.get(endIndex);
if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: looking at next chain @"
+ endIndex + " " + cur);
if (cur == top) {
// Verify start of the chain.
if (cur.mNextAffiliate != null || cur.mNextAffiliateTaskId != INVALID_TASK_ID) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": first task has next affiliate: " + prev);
sane = false;
break;
}
} else {
// Verify middle of the chain's next points back to the one before.
if (cur.mNextAffiliate != prev
|| cur.mNextAffiliateTaskId != prev.taskId) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": middle task " + cur + " @" + endIndex
+ " has bad next affiliate "
+ cur.mNextAffiliate + " id " + cur.mNextAffiliateTaskId
+ ", expected " + prev);
sane = false;
break;
}
}
if (cur.mPrevAffiliateTaskId == INVALID_TASK_ID) {
// Chain ends here.
if (cur.mPrevAffiliate != null) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": last task " + cur + " has previous affiliate "
+ cur.mPrevAffiliate);
sane = false;
}
if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: end of chain @" + endIndex);
break;
} else {
// Verify middle of the chain's prev points to a valid item.
if (cur.mPrevAffiliate == null) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": task " + cur + " has previous affiliate "
+ cur.mPrevAffiliate + " but should be id "
+ cur.mPrevAffiliate);
sane = false;
break;
}
}
if (cur.mAffiliatedTaskId != task.mAffiliatedTaskId) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": task " + cur + " has affiliated id "
+ cur.mAffiliatedTaskId + " but should be "
+ task.mAffiliatedTaskId);
sane = false;
break;
}
prev = cur;
endIndex++;
if (endIndex >= N) {
Slog.wtf(TAG, "Bad chain ran off index " + endIndex
+ ": last task " + prev);
sane = false;
break;
}
}
if (sane) {
if (endIndex < taskIndex) {
Slog.wtf(TAG, "Bad chain @" + endIndex
+ ": did not extend to task " + task + " @" + taskIndex);
sane = false;
}
}
if (sane) {
// All looks good, we can just move all of the affiliated tasks
// to the top.
for (int i=topIndex; i<=endIndex; i++) {
if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: moving affiliated " + task
+ " from " + i + " to " + (i-topIndex));
TaskRecord cur = mRecentTasks.remove(i);
mRecentTasks.add(i-topIndex, cur);
}
if (DEBUG_RECENTS) Slog.d(TAG, "addRecent: done moving tasks " + topIndex
+ " to " + endIndex);
return true;
}
// Whoops, couldn't do it.
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveAffiliatedTasksToFront
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
moveAffiliatedTasksToFront
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@PermissionCheckerManager.PermissionResult
@RequiresPermission(value = Manifest.permission.UPDATE_APP_OPS_STATS, conditional = true)
public int checkPermissionForDataDelivery(@NonNull String permission,
@NonNull AttributionSource attributionSource, @Nullable String message) {
return PermissionChecker.checkPermissionForDataDelivery(mContext, permission,
// FIXME(b/199526514): PID should be passed inside AttributionSource.
PermissionChecker.PID_UNKNOWN, attributionSource, message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermissionForDataDelivery
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
checkPermissionForDataDelivery
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<QuerySortOrder> getBackEndSorting() {
return Collections.unmodifiableList(backEndSorting);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackEndSorting
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
getBackEndSorting
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient addDefaultCookie(String key, String value) {
defaultCookieMap.put(key, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultCookie
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
|
addDefaultCookie
|
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 boolean initializeRights(XWikiDocument document, String xwikiAdminGroupDocumentReference,
List<Right> rights)
{
boolean updated = false;
try {
XWikiContext xwikiContext = this.xcontextProvider.get();
BaseObject object = document.newXObject(LOCAL_CLASS_REFERENCE, xwikiContext);
XWikiContext xWikiContext = this.xcontextProvider.get();
object.set(GROUPS_FIELD_NAME, xwikiAdminGroupDocumentReference, xWikiContext);
object.set(LEVELS_FIELD_NAME, rights.stream().map(Right::getName).collect(Collectors.toList()),
xWikiContext);
object.set(ALLOW_FIELD_NAME, 1, xWikiContext);
updated = true;
} catch (XWikiException e) {
this.logger.error(String.format("Error adding a [%s] object to the document [%s]", LOCAL_CLASS_REFERENCE,
document.getDocumentReference()));
}
return updated;
}
|
Vulnerability Classification:
- CWE: CWE-269
- CVE: CVE-2023-34465
- Severity: HIGH
- CVSS Score: 8.1
Description: XWIKI-20671: Fix Mail.MailConfig initialization
Function: initializeRights
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/internal/DocumentInitializerRightsManager.java
Repository: xwiki/xwiki-platform
Fixed Code:
private boolean initializeRights(XWikiDocument document, List<Right> rights)
{
boolean updated = false;
try {
BaseObject object = document.newXObject(LOCAL_CLASS_REFERENCE, this.xcontextProvider.get());
setRights(object, rights);
updated = true;
} catch (XWikiException e) {
this.logger.error(String.format("Error adding a [%s] object to the document [%s]", LOCAL_CLASS_REFERENCE,
document.getDocumentReference()));
}
return updated;
}
|
[
"CWE-269"
] |
CVE-2023-34465
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
initializeRights
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/internal/DocumentInitializerRightsManager.java
|
8910b8857d3442d2e8142f655fdc0512930354d1
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (folder != null ? folder.hashCode() : 0);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
hashCode
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendReply(final HttpResponseStatus status, final byte[] data) {
sendBuffer(status, ChannelBuffers.wrappedBuffer(data));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendReply
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
sendReply
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void appendLoginModules(XmlGenerator gen, String tag, List<LoginModuleConfig> loginModuleConfigs) {
gen.open(tag);
for (LoginModuleConfig lm : loginModuleConfigs) {
List<String> attrs = new ArrayList<>();
attrs.add("class-name");
attrs.add(lm.getClassName());
if (lm.getUsage() != null) {
attrs.add("usage");
attrs.add(lm.getUsage().name());
}
gen.open("login-module", attrs.toArray())
.appendProperties(lm.getProperties())
.close();
}
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendLoginModules
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
|
appendLoginModules
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addSlow(Iterable<? extends Entry<? extends CharSequence, String>> headers) {
// Slow copy
for (Entry<? extends CharSequence, String> header : headers) {
add(header.getKey(), header.getValue());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSlow
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
|
addSlow
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean willActivityBeVisible(IBinder token) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: willActivityBeVisible
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
willActivityBeVisible
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isHybridXref() {
return hybridXref;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHybridXref
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
isHybridXref
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setNotificationActivityStarter(
NotificationActivityStarter notificationActivityStarter) {
mNotificationActivityStarter = notificationActivityStarter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNotificationActivityStarter
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
setNotificationActivityStarter
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void characters(final char[] chars, final int start, final int length) throws SAXException {
if (this.currentAttribute != null) {
value.append(chars, start, length);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: characters
File: cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
Repository: apereo/java-cas-client
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2014-4172
|
HIGH
| 7.5
|
apereo/java-cas-client
|
characters
|
cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
|
ae37092100c8eaec610dab6d83e5e05a8ee58814
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<BundleFile> listBundles() {
try (var files = Files.walk(bundleDir)) {
return files
.filter(p -> !Files.isDirectory(p))
.filter(p -> p.getFileName().toString().startsWith(BUNDLE_NAME_PREFIX))
.map(f -> {
try {
return new BundleFile(f.getFileName().toString(), Files.size(f));
} catch (IOException e) {
LOG.warn("Exception while trying to list support bundles", e);
throw new ServerErrorException(Response.Status.INTERNAL_SERVER_ERROR, e);
}
})
.sorted(Comparator.comparing(BundleFile::fileName).reversed())
.collect(Collectors.toList());
} catch (NoSuchFileException ignored) {
return List.of();
} catch (IOException e) {
LOG.warn("Exception while trying to list support bundles", e);
throw new ServerErrorException(Response.Status.INTERNAL_SERVER_ERROR, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listBundles
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
listBundles
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
private void put(RequestMethod requestMethod, String classPath, String[] requestPaths, String[] requestParams,
Method method) {
if (ArrayUtils.isEmpty(requestPaths)) {
String urlKey = requestMethod.name() + REQUEST_PATH_SEPARATOR + classPath;
addUrlAndMethodRelation(urlKey, requestParams, method);
return;
}
for (String requestPath : requestPaths) {
String urlKey = requestMethod.name() + REQUEST_PATH_SEPARATOR + classPath + requestPath;
addUrlAndMethodRelation(urlKey, requestParams, method);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: core/src/main/java/com/alibaba/nacos/core/code/ControllerMethodsCache.java
Repository: alibaba/nacos
The code follows secure coding practices.
|
[
"CWE-290"
] |
CVE-2021-29441
|
HIGH
| 7.5
|
alibaba/nacos
|
put
|
core/src/main/java/com/alibaba/nacos/core/code/ControllerMethodsCache.java
|
91d16023d91ea21a5e58722c751485a0b9bbeeb3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void setSurfaceControl(SurfaceControl sc) {
super.setSurfaceControl(sc);
if (sc != null) {
mLastDropInputMode = DropInputMode.NONE;
updateUntrustedEmbeddingInputProtection();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSurfaceControl
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
|
setSurfaceControl
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initReaderAndWriter() throws IOException {
InputStream is = socket.getInputStream();
OutputStream os = socket.getOutputStream();
if (compressionHandler != null) {
is = compressionHandler.getInputStream(is);
os = compressionHandler.getOutputStream(os);
}
// OutputStreamWriter is already buffered, no need to wrap it into a BufferedWriter
writer = new OutputStreamWriter(os, "UTF-8");
reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
// If debugging is enabled, we open a window and write out all network traffic.
initDebugger();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initReaderAndWriter
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
initReaderAndWriter
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateLeftAffordance() {
updateLeftAffordanceIcon();
updateLeftPreview();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLeftAffordance
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
updateLeftAffordance
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRenderAll(boolean renderAll) {
this.renderAll = renderAll;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRenderAll
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
|
setRenderAll
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
String getClientID() {
return clientID;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientID
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getClientID
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private char getEllipsisChar(TextUtils.TruncateAt method) {
return (method == TextUtils.TruncateAt.END_SMALL) ?
TextUtils.ELLIPSIS_TWO_DOTS[0] :
TextUtils.ELLIPSIS_NORMAL[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEllipsisChar
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getEllipsisChar
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addAttachmentAndUpdateView(Attachment attachment) {
try {
long size = mAttachmentsView.addAttachment(mAccount, attachment);
if (size > 0) {
mAttachmentsChanged = true;
updateSaveUi();
}
} catch (AttachmentFailureException e) {
LogUtils.e(LOG_TAG, e, "Error adding attachment");
showAttachmentTooBigToast(e.getErrorRes());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachmentAndUpdateView
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
|
addAttachmentAndUpdateView
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private PostgresClient createFoo(TestContext context) {
return createTable(context, TENANT, FOO,
"id UUID PRIMARY KEY , jsonb JSONB NOT NULL");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFoo
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
|
createFoo
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTopologyRecoveryEnabled(boolean topologyRecovery) {
this.topologyRecovery = topologyRecovery;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTopologyRecoveryEnabled
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setTopologyRecoveryEnabled
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
synchronized ArrayList<ConnectionInfo> getSettings() {
ArrayList<ConnectionInfo> settings = new ArrayList<>();
if (connInfoMap.size() == 0) {
Properties prop = loadProperties();
if (prop.size() == 0) {
for (String gen : GENERIC) {
ConnectionInfo info = new ConnectionInfo(gen);
settings.add(info);
updateSetting(info);
}
} else {
for (int i = 0;; i++) {
String data = prop.getProperty(Integer.toString(i));
if (data == null) {
break;
}
ConnectionInfo info = new ConnectionInfo(data);
settings.add(info);
updateSetting(info);
}
}
} else {
settings.addAll(connInfoMap.values());
}
Collections.sort(settings);
return settings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettings
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getSettings
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean exists(XWikiDocument doc, XWikiContext inputxcontext) throws XWikiException
{
// In order to avoid trying to issue any SQL query to the DB, we first check if the wiki containing the
// doc exists. If not, then the doc cannot exist for sure.
try {
if (!this.wikiDescriptorManager.exists(this.wikiDescriptorManager.getCurrentWikiId())) {
return false;
}
} catch (WikiManagerException e) {
// An error occurred while retrieving the wiki descriptors. This is an important problem and we shouldn't
// swallow it and instead we mist let it bubble up.
Object[] args = {this.wikiDescriptorManager.getCurrentWikiId()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_CHECK_EXISTS_DOC,
"Error while checking for existence of the [{0}] wiki", e, args);
}
return executeRead(inputxcontext, session -> {
try {
String fullName = doc.getFullName();
String sql = "select doc.fullName from XWikiDocument as doc where doc.fullName=:fullName";
if (!doc.getLocale().equals(Locale.ROOT)) {
sql += " and doc.language=:language";
}
Query<String> query = session.createQuery(sql);
query.setParameter("fullName", fullName);
if (!doc.getLocale().equals(Locale.ROOT)) {
query.setParameter("language", doc.getLocale().toString());
}
Iterator<String> it = query.list().iterator();
while (it.hasNext()) {
if (fullName.equals(it.next())) {
return true;
}
}
return false;
} catch (Exception e) {
Object[] args = {doc.getDocumentReferenceWithLocale()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_CHECK_EXISTS_DOC, "Exception while reading document {0}",
e, args);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exists
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
|
exists
|
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
|
void resumeKeyDispatchingLocked() {
if (keysPaused) {
keysPaused = false;
if (getDisplayContent() != null) {
getDisplayContent().getInputMonitor().resumeDispatchingLw(this);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumeKeyDispatchingLocked
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
|
resumeKeyDispatchingLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return Objects.hash(reportedFeatures, nonReportableFeatures);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
hashCode
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setFullScreen(boolean fullScreen) {
this.fullScreen = fullScreen;
if (fullScreen) {
bounds = new Rectangle(getBounds());
setX(0);
setY(0);
setWidth(Display.getInstance().getDisplayWidth());
setHeight(Display.getInstance().getDisplayHeight());
} else {
if (bounds != null) {
setX(bounds.getX());
setY(bounds.getY());
setWidth(bounds.getSize().getWidth());
setHeight(bounds.getSize().getHeight());
}
}
repaint();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFullScreen
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
|
setFullScreen
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int executeUpdateDelete(@NonNull SQLiteDatabase db, @NonNull String sql,
@Nullable Object[] bindArgs) throws SQLException {
try (SQLiteStatement st = db.compileStatement(sql)) {
bindArgs(st, bindArgs);
return st.executeUpdateDelete();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeUpdateDelete
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
executeUpdateDelete
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean startDreamActivity(@NonNull Intent intent) {
assertPackageMatchesCallingUid(intent.getPackage());
enforceCallerIsDream(intent.getPackage());
final ActivityInfo a = new ActivityInfo();
a.theme = com.android.internal.R.style.Theme_Dream;
a.exported = true;
a.name = DreamActivity.class.getName();
a.enabled = true;
a.launchMode = ActivityInfo.LAUNCH_SINGLE_INSTANCE;
a.persistableMode = ActivityInfo.PERSIST_NEVER;
a.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
a.colorMode = ActivityInfo.COLOR_MODE_DEFAULT;
a.flags |= ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS;
a.resizeMode = RESIZE_MODE_UNRESIZEABLE;
final ActivityOptions options = ActivityOptions.makeBasic();
options.setLaunchActivityType(ACTIVITY_TYPE_DREAM);
synchronized (mGlobalLock) {
final WindowProcessController process = mProcessMap.getProcess(Binder.getCallingPid());
a.packageName = process.mInfo.packageName;
a.applicationInfo = process.mInfo;
a.processName = process.mName;
a.uiOptions = process.mInfo.uiOptions;
a.taskAffinity = "android:" + a.packageName + "/dream";
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
final long origId = Binder.clearCallingIdentity();
try {
getActivityStartController().obtainStarter(intent, "dream")
.setCallingUid(callingUid)
.setCallingPid(callingPid)
.setCallingPackage(intent.getPackage())
.setActivityInfo(a)
.setActivityOptions(options.toBundle())
// To start the dream from background, we need to start it from a persistent
// system process. Here we set the real calling uid to the system server uid
.setRealCallingUid(Binder.getCallingUid())
.setAllowBackgroundActivityStart(true)
.execute();
return true;
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDreamActivity
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
startDreamActivity
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
@Override
public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode(
"getSource(" + (sourceClass != null ? sourceClass.getSimpleName() + ".class" : "null") + ')');
}
checkReadable();
if (sourceClass == null || sourceClass == DOMSource.class) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
return (T) new DOMSource(dbf.newDocumentBuilder().parse(new InputSource(value.getInputStream())));
} else if (sourceClass == SAXSource.class) {
return (T) new SAXSource(new InputSource(value.getInputStream()));
} else if (sourceClass == StAXSource.class) {
XMLInputFactory xif = XMLInputFactory.newInstance();
return (T) new StAXSource(xif.createXMLStreamReader(value.getInputStream()));
} else if (sourceClass == StreamSource.class) {
return (T) new StreamSource(value.getInputStream());
}
throw unsupported(sourceClass.getName());
} catch (Exception e) {
throw logAndConvert(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-23463
- Severity: MEDIUM
- CVSS Score: 6.4
Description: fix for #3195 CQLXML XXE vulnerability
Function: getSource
File: h2/src/main/org/h2/jdbc/JdbcSQLXML.java
Repository: h2database
Fixed Code:
@SuppressWarnings("unchecked")
@Override
public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode(
"getSource(" + (sourceClass != null ? sourceClass.getSimpleName() + ".class" : "null") + ')');
}
checkReadable();
// According to https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
if (sourceClass == null || sourceClass == DOMSource.class) {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
for (Map.Entry<String,Boolean> entry : secureFeatureMap.entrySet()) {
try {
dbf.setFeature(entry.getKey(), entry.getValue());
} catch (Exception ignore) {/**/}
}
dbf.setXIncludeAware(false);
dbf.setExpandEntityReferences(false);
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
DocumentBuilder db = dbf.newDocumentBuilder();
db.setEntityResolver(NOOP_ENTITY_RESOLVER);
return (T) new DOMSource(db.parse(new InputSource(value.getInputStream())));
} else if (sourceClass == SAXSource.class) {
XMLReader reader = XMLReaderFactory.createXMLReader();
for (Map.Entry<String,Boolean> entry : secureFeatureMap.entrySet()) {
try {
reader.setFeature(entry.getKey(), entry.getValue());
} catch (Exception ignore) {/**/}
}
reader.setEntityResolver(NOOP_ENTITY_RESOLVER);
return (T) new SAXSource(reader, new InputSource(value.getInputStream()));
} else if (sourceClass == StAXSource.class) {
XMLInputFactory xif = XMLInputFactory.newInstance();
xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
xif.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
xif.setProperty("javax.xml.stream.isSupportingExternalEntities", false);
return (T) new StAXSource(xif.createXMLStreamReader(value.getInputStream()));
} else if (sourceClass == StreamSource.class) {
TransformerFactory tf = TransformerFactory.newInstance();
tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
tf.setURIResolver(NOOP_URI_RESOLVER);
tf.newTransformer().transform(new StreamSource(value.getInputStream()), new SAXResult(new DefaultHandler()));
return (T) new StreamSource(value.getInputStream());
}
throw unsupported(sourceClass.getName());
} catch (Exception e) {
throw logAndConvert(e);
}
}
|
[
"CWE-611"
] |
CVE-2021-23463
|
MEDIUM
| 6.4
|
h2database
|
getSource
|
h2/src/main/org/h2/jdbc/JdbcSQLXML.java
|
d83285fd2e48fb075780ee95badee6f5a15ea7f8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEmpty() {
return head == head.after;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEmpty
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
isEmpty
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPackageImportance(String pkg) {
checkCallerIsSystemOrSameApp(pkg);
return mRankingHelper.getImportance(pkg, Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageImportance
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getPackageImportance
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public void activityDestroyed(IBinder token) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
mRemote.transact(ACTIVITY_DESTROYED_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: activityDestroyed
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
activityDestroyed
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Obs createObs(Concept concept, Object value, Date datetime, String accessionNumber) {
Obs obs = new Obs();
obs.setConcept(concept);
ConceptDatatype dt = obs.getConcept().getDatatype();
if (dt.isNumeric()) {
obs.setValueNumeric(Double.parseDouble(value.toString()));
} else if (HtmlFormEntryConstants.COMPLEX_UUID.equals(dt.getUuid())) {
obs.setComplexData((ComplexData) value);
obs.setValueComplex(obs.getComplexData().getTitle());
} else if (dt.isText()) {
if (value instanceof Location) {
Location location = (Location) value;
obs.setValueText(location.getId().toString() + " - " + location.getName());
} else if (value instanceof Person) {
Person person = (Person) value;
obs.setValueText(person.getId().toString() + " - " + person.getPersonName().toString());
} else {
obs.setValueText(value.toString());
}
} else if (dt.isCoded()) {
if (value instanceof Drug) {
obs.setValueDrug((Drug) value);
obs.setValueCoded(((Drug) value).getConcept());
} else if (value instanceof ConceptName) {
obs.setValueCodedName((ConceptName) value);
obs.setValueCoded(obs.getValueCodedName().getConcept());
} else if (value instanceof Concept) {
obs.setValueCoded((Concept) value);
} else {
obs.setValueCoded((Concept) convertToType(value.toString(), Concept.class));
}
} else if (dt.isBoolean()) {
if (value != null) {
try {
obs.setValueAsString(value.toString());
}
catch (ParseException e) {
throw new IllegalArgumentException("Unable to convert " + value + " to a Boolean Obs value", e);
}
}
} else if (ConceptDatatype.DATE.equals(dt.getHl7Abbreviation())
|| ConceptDatatype.TIME.equals(dt.getHl7Abbreviation())
|| ConceptDatatype.DATETIME.equals(dt.getHl7Abbreviation())) {
Date date = (Date) value;
obs.setValueDatetime(date);
} else if ("ZZ".equals(dt.getHl7Abbreviation())) {
// don't set a value
} else {
throw new IllegalArgumentException("concept datatype not yet implemented: " + dt.getName()
+ " with Hl7 Abbreviation: " + dt.getHl7Abbreviation());
}
if (datetime != null)
obs.setObsDatetime(datetime);
if (accessionNumber != null)
obs.setAccessionNumber(accessionNumber);
return obs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createObs
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
createObs
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isTtySupported(String callingPackage, String callingFeatureId) {
try {
Log.startSession("TSI.iTS", Log.getPackageAbbreviation(callingPackage));
if (!canReadPhoneState(callingPackage, callingFeatureId, "isTtySupported")) {
throw new SecurityException("Only default dialer or an app with" +
"READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE can call this api");
}
synchronized (mLock) {
return mCallsManager.isTtySupported();
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTtySupported
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
isTtySupported
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Throwing.Function<String, String> prefix() {
return p -> p.substring(1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prefix
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
prefix
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Unstable
public static String escapeElementText(String content)
{
if (content == null) {
return null;
}
// Initializes a string builder with an initial capacity 1.1 times greater than the initial content to account
// for special character substitutions.
int contentLength = content.length();
StringBuilder result = new StringBuilder((int) (contentLength * 1.1));
for (int i = 0; i < contentLength; ++i) {
char c = content.charAt(i);
switch (c) {
case '&':
result.append(AMP);
break;
case '<':
result.append(LT);
break;
default:
result.append(c);
}
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeElementText
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-24898
|
MEDIUM
| 4
|
xwiki/xwiki-commons
|
escapeElementText
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
|
947e8921ebd95462d5a7928f397dd1b64f77c7d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public short getShortProperty(String name) throws JMSException {
Object o = this.getObjectProperty(name);
if (o == null)
throw new NumberFormatException("Null is not a valid short");
else if (o instanceof String) {
return Short.parseShort((String) o);
} else if (o instanceof Byte) {
return (Byte) o;
} else if (o instanceof Short) {
return (Short) o;
} else
throw new MessageFormatException(String.format("Unable to convert from class [%s]", o.getClass().getName()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getShortProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName) {
synchronized (mPackages) {
return mSettings.getIntentFilterVerificationsLPr(packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentFilterVerifications
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
|
getIntentFilterVerifications
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String sanitizeFileName(String filename) {
return sanitizeFileName(filename, SANITIZED_CHAR);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sanitizeFileName
File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.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
|
sanitizeFileName
|
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
private String packageDescriptionByPathAndName(String path, String name) {
String result = "";
if (StringUtils.isNotEmpty(path)) {
if (!path.startsWith("http")) {
if (path.startsWith("{") && path.endsWith("}")) {
String srcContent = path.substring(1, path.length() - 1);
if (StringUtils.isEmpty(name)) {
name = srcContent;
}
if (Arrays.stream(imgArray).anyMatch(imgType -> StringUtils.equals(imgType, srcContent.substring(srcContent.indexOf('.') + 1)))) {
if (zentaoClient instanceof ZentaoGetClient) {
path = zentaoClient.getBaseUrl() + "/index.php?m=file&f=read&fileID=" + srcContent;
} else {
// 禅道开源版
path = zentaoClient.getBaseUrl() + "/file-read-" + srcContent;
}
} else {
return result;
}
} else {
name = name.replaceAll("&", "&");
try {
URI uri = new URI(zentaoClient.getBaseUrl());
path = uri.getScheme() + "://" + uri.getHost() + path.replaceAll("&", "&");
} catch (URISyntaxException e) {
path = zentaoClient.getBaseUrl() + path.replaceAll("&", "&");
LogUtil.error(e);
}
}
path = "/resource/md/get/url?url=" + URLEncoder.encode(path, StandardCharsets.UTF_8);
}
// 图片与描述信息之间需换行,否则无法预览图片
result = "\n\n";
}
return result;
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2022-23544
- Severity: MEDIUM
- CVSS Score: 6.1
Description: fix(测试跟踪): 缺陷平台请求转发添加白名单
Function: packageDescriptionByPathAndName
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
Repository: metersphere
Fixed Code:
private String packageDescriptionByPathAndName(String path, String name) {
String result = "";
if (StringUtils.isNotEmpty(path)) {
if (!path.startsWith("http")) {
if (path.startsWith("{") && path.endsWith("}")) {
String srcContent = path.substring(1, path.length() - 1);
if (StringUtils.isEmpty(name)) {
name = srcContent;
}
if (Arrays.stream(imgArray).anyMatch(imgType -> StringUtils.equals(imgType, srcContent.substring(srcContent.indexOf('.') + 1)))) {
if (zentaoClient instanceof ZentaoGetClient) {
path = zentaoClient.getBaseUrl() + "/index.php?m=file&f=read&fileID=" + srcContent;
} else {
// 禅道开源版
path = zentaoClient.getBaseUrl() + "/file-read-" + srcContent;
}
} else {
return result;
}
} else {
name = name.replaceAll("&", "&");
path = path.replaceAll("&", "&");
}
StringBuilder stringBuilder = new StringBuilder();
for (String item : path.split("&")) {
// 去掉多余的参数
if (!StringUtils.containsAny(item, "platform", "workspaceId")) {
stringBuilder.append(item);
stringBuilder.append("&");
}
}
path = getProxyPath(stringBuilder.toString());
}
// 图片与描述信息之间需换行,否则无法预览图片
result = "\n\n";
}
return result;
}
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
packageDescriptionByPathAndName
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 1
|
Analyze the following code function for security vulnerabilities
|
public List<Cliente> buscarFuncionarioEmail(String email) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
stmt = con.prepareStatement(stmtBuscarEmail + "'%" + email + "%' and (perfil = 2 or perfil = 3) and inativo=false order by nome");
rs = stmt.executeQuery();
return montaListaClientes(rs);
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
rs.close();
} catch (Exception ex) {
System.out.println("Erro ao fechar result set.Erro: " + ex.getMessage());
}
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2015-10061
- Severity: MEDIUM
- CVSS Score: 5.2
Description: ClienteDAO - alterados statements para utilizar o metodo setString do PreparedStatement para evitar SQL Injection
- alterados statements para utilizar ilike ao inves de like para pesquisar sem case sensitivity
BancoDeDados - colocado ponto e virgula apos todas as queries.
Function: buscarFuncionarioEmail
File: src/java/br/com/magazine/dao/ClienteDAO.java
Repository: evandro-machado/Trabalho-Web2
Fixed Code:
public List<Cliente> buscarFuncionarioEmail(String email) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
email = "%"+email+"%";
stmt = con.prepareStatement(stmtBuscarEmailFuncionario);
stmt.setString(1,email);
rs = stmt.executeQuery();
return montaListaClientes(rs);
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
rs.close();
} catch (Exception ex) {
System.out.println("Erro ao fechar result set.Erro: " + ex.getMessage());
}
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
[
"CWE-89"
] |
CVE-2015-10061
|
MEDIUM
| 5.2
|
evandro-machado/Trabalho-Web2
|
buscarFuncionarioEmail
|
src/java/br/com/magazine/dao/ClienteDAO.java
|
f59ac954625d0a4f6d34f069a2e26686a7a20aeb
| 1
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKeyPrefix
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
|
setApiKeyPrefix
|
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 void migrate93(File dataDir, Stack<Integer> versions) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate93
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate93
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String createCountQueryFor(String originalQuery) {
return createCountQueryFor(originalQuery, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCountQueryFor
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
createCountQueryFor
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSnapshotDisabled(boolean snapshotDisabled) {
this.snapshotDisabled = snapshotDisabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSnapshotDisabled
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
setSnapshotDisabled
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Node migrateShowCondition(Element showConditionElement) {
List<NodeTuple> tuples = new ArrayList<>();
tuples.add(new NodeTuple(
new ScalarNode(Tag.STR, "inputName"),
new ScalarNode(Tag.STR, showConditionElement.elementText("inputName").trim())));
tuples.add(new NodeTuple(
new ScalarNode(Tag.STR, "valueMatcher"),
migrateValueMatcher(showConditionElement.element("valueMatcher"))));
return new MappingNode(Tag.MAP, tuples, FlowStyle.BLOCK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrateShowCondition
File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-538"
] |
CVE-2021-21250
|
MEDIUM
| 4
|
theonedev/onedev
|
migrateShowCondition
|
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
|
9196fd795e87dab069b4260a3590a0ea886e770f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Object returnCopy(Object source) throws Exception {
Class<? extends Object> clazz = source.getClass();
Object ret = clazz.newInstance();
Set<String> fieldNames = new HashSet<String>();
List<Field> fields = new ArrayList<Field>();
addSuperclassFields(fields, clazz);
for (Field f : fields) {
fieldNames.add(f.getName());
}
for (String root : fieldNames) {
for (Method getter : clazz.getMethods()) {
if (getter.getName().toUpperCase().equals("GET" + root.toUpperCase())
&& getter.getParameterTypes().length == 0) {
Method setter = getSetter(clazz, getter, "SET" + root.toUpperCase());
//NOTE: Collection properties are not copied
if (setter != null && methodsSupportSameArgs(getter, setter)
&& !(getter.getReturnType().isInstance(Collection.class))) {
Object o = getter.invoke(source, Collections.EMPTY_LIST.toArray());
if (o != null) {
setter.invoke(ret, o);
}
}
}
}
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: returnCopy
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
returnCopy
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void handleUserSwitchComplete(int userId) {
mSwitchingUser = false;
updateFingerprintListeningState();
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onUserSwitchComplete(userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleUserSwitchComplete
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleUserSwitchComplete
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getPermittedAccessibilityServicesForUser(int userId) {
if (!mHasFeature) {
return null;
}
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(canManageUsers(caller) || canQueryAdminPolicy(caller));
synchronized (getLockObject()) {
List<String> result = null;
// If we have multiple profiles we return the intersection of the
// permitted lists. This can happen in cases where we have a device
// and profile owner.
int[] profileIds = mUserManager.getProfileIdsWithDisabled(userId);
for (int profileId : profileIds) {
// Just loop though all admins, only device or profiles
// owners can have permitted lists set.
DevicePolicyData policy = getUserDataUnchecked(profileId);
final int N = policy.mAdminList.size();
for (int j = 0; j < N; j++) {
ActiveAdmin admin = policy.mAdminList.get(j);
List<String> fromAdmin = admin.permittedAccessiblityServices;
if (fromAdmin != null) {
if (result == null) {
result = new ArrayList<>(fromAdmin);
} else {
result.retainAll(fromAdmin);
}
}
}
}
// If we have a permitted list add all system accessibility services.
if (result != null) {
long id = mInjector.binderClearCallingIdentity();
try {
UserInfo user = getUserInfo(userId);
if (user.isManagedProfile()) {
userId = user.profileGroupId;
}
final List<AccessibilityServiceInfo> installedServices =
withAccessibilityManager(userId,
AccessibilityManager::getInstalledAccessibilityServiceList);
if (installedServices != null) {
for (AccessibilityServiceInfo service : installedServices) {
ServiceInfo serviceInfo = service.getResolveInfo().serviceInfo;
ApplicationInfo applicationInfo = serviceInfo.applicationInfo;
if ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
result.add(serviceInfo.packageName);
}
}
}
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
return result;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermittedAccessibilityServicesForUser
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
|
getPermittedAccessibilityServicesForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (obj instanceof FeatureSetKey) {
FeatureSetKey that = (FeatureSetKey) obj;
return that.nonReportableFeatures.equals(nonReportableFeatures)
&& that.reportedFeatures.equals(reportedFeatures);
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
equals
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) {
enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "moveTopActivityToPinnedStack()");
synchronized (this) {
if (!mSupportsPictureInPicture) {
throw new IllegalStateException("moveTopActivityToPinnedStack:"
+ "Device doesn't support picture-in-pciture mode");
}
long ident = Binder.clearCallingIdentity();
try {
return mStackSupervisor.moveTopStackActivityToPinnedStackLocked(stackId, bounds);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTopActivityToPinnedStack
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
|
moveTopActivityToPinnedStack
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
void showRecents(boolean triggeredFromAltTab) {
mTriggeredFromAltTab = triggeredFromAltTab;
try {
startRecentsActivity();
} catch (ActivityNotFoundException e) {
Console.logRawError("Failed to launch RecentAppsIntent", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showRecents
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
showRecents
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@NotNull Future<String> buildInner() {
return new DebugLoggingImageFromDockerfile()
.withDockerfileFromBuilder(this)
.withFileFromPath(".", Paths.get("src/itest/docker-image"))
.withFileFromString("sshd_config", sshdConfig.build());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildInner
File: src/itest/java/com/hierynomus/sshj/SshdContainer.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
buildInner
|
src/itest/java/com/hierynomus/sshj/SshdContainer.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private int performDisplayOverrideConfigUpdate(Configuration values, boolean deferResume,
int displayId) {
mTempConfig.setTo(mStackSupervisor.getDisplayOverrideConfiguration(displayId));
final int changes = mTempConfig.updateFrom(values);
if (changes != 0) {
Slog.i(TAG, "Override config changes=" + Integer.toHexString(changes) + " "
+ mTempConfig + " for displayId=" + displayId);
mStackSupervisor.setDisplayOverrideConfiguration(mTempConfig, displayId);
final boolean isDensityChange = (changes & ActivityInfo.CONFIG_DENSITY) != 0;
if (isDensityChange && displayId == DEFAULT_DISPLAY) {
mAppWarnings.onDensityChanged();
killAllBackgroundProcessesExcept(N,
ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE);
}
}
// Update the configuration with WM first and check if any of the stacks need to be resized
// due to the configuration change. If so, resize the stacks now and do any relaunches if
// necessary. This way we don't need to relaunch again afterwards in
// ensureActivityConfiguration().
if (mWindowManager != null) {
final int[] resizedStacks =
mWindowManager.setNewDisplayOverrideConfiguration(mTempConfig, displayId);
if (resizedStacks != null) {
for (int stackId : resizedStacks) {
resizeStackWithBoundsFromWindowManager(stackId, deferResume);
}
}
}
return changes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performDisplayOverrideConfigUpdate
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
|
performDisplayOverrideConfigUpdate
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isKeyguardSecure() {
if (mKeyguardDelegate == null) return false;
return mKeyguardDelegate.isSecure();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isKeyguardSecure
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
isKeyguardSecure
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleApplicationCrash(IBinder app,
ApplicationErrorReport.CrashInfo crashInfo) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationCrash
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
handleApplicationCrash
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getCurrentRenderProcessId() {
return nativeGetCurrentRenderProcessId(mNativeContentViewCore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentRenderProcessId
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getCurrentRenderProcessId
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getCorsDomain(String referer, String userAgent)
{
String dom = null;
if (referer != null && referer.toLowerCase()
.matches("https?://([a-z0-9,-]+[.])*draw[.]io/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".draw.io/") + 8);
}
else if (referer != null && referer.toLowerCase()
.matches("https?://([a-z0-9,-]+[.])*diagrams[.]net/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".diagrams.net/") + 13);
}
else if (referer != null && referer.toLowerCase()
.matches("https?://([a-z0-9,-]+[.])*quipelements[.]com/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".quipelements.com/") + 17);
}
// Enables Confluence/Jira proxy via referer or hardcoded user-agent (for old versions)
// UA refers to old FF on macOS so low risk and fixes requests from existing servers
else if ((referer != null
&& referer.equals("draw.io Proxy Confluence Server"))
|| (userAgent != null && userAgent.equals(
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0")))
{
dom = "";
}
return dom;
}
|
Vulnerability Classification:
- CWE: CWE-601, CWE-918
- CVE: CVE-2022-1767
- Severity: MEDIUM
- CVSS Score: 5.0
Description: 18.0.7 release
Function: getCorsDomain
File: src/main/java/com/mxgraph/online/ProxyServlet.java
Repository: jgraph/drawio
Fixed Code:
protected String getCorsDomain(String referer, String userAgent)
{
String dom = null;
if (referer != null && referer.toLowerCase()
.matches("^https?://([a-z0-9,-]+[.])*draw[.]io/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".draw.io/") + 8);
}
else if (referer != null && referer.toLowerCase()
.matches("^https?://([a-z0-9,-]+[.])*diagrams[.]net/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".diagrams.net/") + 13);
}
else if (referer != null && referer.toLowerCase()
.matches("^https?://([a-z0-9,-]+[.])*quipelements[.]com/.*"))
{
dom = referer.toLowerCase().substring(0,
referer.indexOf(".quipelements.com/") + 17);
}
// Enables Confluence/Jira proxy via referer or hardcoded user-agent (for old versions)
// UA refers to old FF on macOS so low risk and fixes requests from existing servers
else if ((referer != null
&& referer.equals("draw.io Proxy Confluence Server"))
|| (userAgent != null && userAgent.equals(
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0")))
{
dom = "";
}
return dom;
}
|
[
"CWE-601",
"CWE-918"
] |
CVE-2022-1767
|
MEDIUM
| 5
|
jgraph/drawio
|
getCorsDomain
|
src/main/java/com/mxgraph/online/ProxyServlet.java
|
c63f3a04450f30798df47f9badbc74eb8a69fbdf
| 1
|
Analyze the following code function for security vulnerabilities
|
private void readManifestPaths() throws IOException {
getLogger().debug("Reading manifest.json from webpack");
HttpURLConnection connection = prepareConnection("/manifest.json",
"GET");
int responseCode = connection.getResponseCode();
if (responseCode != HTTP_OK) {
getLogger().error(
"Unable to get manifest.json from "
+ "webpack-dev-server, got {} {}",
responseCode, connection.getResponseMessage());
return;
}
String manifestJson = FrontendUtils
.streamToString(connection.getInputStream());
manifestPaths = FrontendUtils.parseManifestPaths(manifestJson);
if (getLogger().isDebugEnabled()) {
getLogger().debug(
"Got asset paths from webpack manifest.json: \n {}",
String.join("\n ", manifestPaths));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readManifestPaths
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
readManifestPaths
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isLaunchModeOneOf(int mode1, int mode2) {
return mode1 == mLaunchMode || mode2 == mLaunchMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLaunchModeOneOf
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
isLaunchModeOneOf
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAttachedToPage() {
return attachedToPage_;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAttachedToPage
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
isAttachedToPage
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAlgorithmName()
{
return "AES";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAlgorithmName
File: core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
getAlgorithmName
|
core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleSetVmOrFwdMessage() {
if (DBG) log("handleSetVMMessage: set VM request complete");
if (!isFwdChangeSuccess()) {
handleVmOrFwdSetError(VoicemailDialogUtil.FWD_SET_RESPONSE_ERROR_DIALOG);
} else if (!isVmChangeSuccess()) {
handleVmOrFwdSetError(VoicemailDialogUtil.VM_RESPONSE_ERROR_DIALOG);
} else {
handleVmAndFwdSetSuccess(VoicemailDialogUtil.VM_CONFIRM_DIALOG);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSetVmOrFwdMessage
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
handleSetVmOrFwdMessage
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getGeoToolsJarInfo() {
final StringBuilder sb = new StringBuilder();
final String newline = String.format("%n");
final String indent = " ";
sb.append("GeoTools jars on classpath:");
for (String jarName : getGeoToolsJars()) {
sb.append(newline).append(indent).append(jarName);
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGeoToolsJarInfo
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getGeoToolsJarInfo
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getNamespace() { return namespace; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNamespace
File: varexport/src/main/java/com/indeed/util/varexport/Variable.java
Repository: indeedeng/util
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
getNamespace
|
varexport/src/main/java/com/indeed/util/varexport/Variable.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 0
|
Analyze the following code function for security vulnerabilities
|
private final int _decodeTag(int lowBits) throws IOException
{
if (lowBits <= 23) {
return lowBits;
}
switch (lowBits - 24) {
case 0:
return _decode8Bits();
case 1:
return _decode16Bits();
case 2:
return _decode32Bits();
case 3:
// 16-Jan-2014, tatu: Technically legal, but nothing defined, so let's
// only allow for cases where encoder is being wasteful...
long l = _decode64Bits();
if (l < MIN_INT_L || l > MAX_INT_L) {
_reportError("Illegal Tag value: "+l);
}
return (int) l;
}
throw _constructError("Invalid low bits for Tag token: 0x"+Integer.toHexString(lowBits));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _decodeTag
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_decodeTag
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public long maxMemory()
{
return Runtime.getRuntime().maxMemory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maxMemory
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
maxMemory
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reInit(Conversation conversation) {
reInit(conversation, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reInit
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
|
reInit
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showCircularMask(boolean visible) {
synchronized(mWindowMap) {
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
">>> OPEN TRANSACTION showCircularMask(visible=" + visible + ")");
SurfaceControl.openTransaction();
try {
if (visible) {
// TODO(multi-display): support multiple displays
if (mCircularDisplayMask == null) {
int screenOffset = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.circular_display_mask_offset);
int maskThickness = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.circular_display_mask_thickness);
mCircularDisplayMask = new CircularDisplayMask(
getDefaultDisplayContentLocked().getDisplay(),
mFxSession,
mPolicy.windowTypeToLayerLw(
WindowManager.LayoutParams.TYPE_POINTER)
* TYPE_LAYER_MULTIPLIER + 10, screenOffset, maskThickness);
}
mCircularDisplayMask.setVisibility(true);
} else if (mCircularDisplayMask != null) {
mCircularDisplayMask.setVisibility(false);
mCircularDisplayMask = null;
}
} finally {
SurfaceControl.closeTransaction();
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
"<<< CLOSE TRANSACTION showCircularMask(visible=" + visible + ")");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showCircularMask
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
|
showCircularMask
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public LocalFileHeader getNextEntry() throws IOException {
return getNextEntry(null, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextEntry
File: src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
getNextEntry
|
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void contextInitialized(ServletContext ctx) {
servletContextService.contextInitialized(ctx);
synchronized (container) {
applicationInitializedEvent.fire(ctx);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contextInitialized
File: impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
contextInitialized
|
impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
private void computeMaximumWidgetBitmapMemory() {
WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Point size = new Point();
display.getRealSize(size);
// Cap memory usage at 1.5 times the size of the display
// 1.5 * 4 bytes/pixel * w * h ==> 6 * w * h
mMaxWidgetBitmapMemory = 6 * size.x * size.y;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeMaximumWidgetBitmapMemory
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
computeMaximumWidgetBitmapMemory
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelAutohide() {
mAutohideSuspended = false;
mHandler.removeCallbacks(mAutohide);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelAutohide
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
|
cancelAutohide
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void copyIn(String copyInStatement, Connection connection) throws Exception {
long totalInsertedRecords = 0;
CopyManager copyManager = new CopyManager((BaseConnection) connection);
if(copyInStatement.contains("STDIN")){
//run as is
int sep = copyInStatement.indexOf("\n");
String copyIn = copyInStatement.substring(0, sep);
String data = copyInStatement.substring(sep+1);
totalInsertedRecords = copyManager.copyIn(copyIn, new StringReader(data));
}
else{
//copy from a file,
String[] valuesInQuotes = StringUtils.substringsBetween(copyInStatement , "'", "'");
if(valuesInQuotes.length == 0){
log.warn("SQL statement: COPY FROM, has no STDIN and no file path wrapped in ''");
throw new Exception("SQL statement: COPY FROM, has no STDIN and no file path wrapped in ''");
}
//do not read from the file system for now as this needs to support data files packaged in
//the jar, read files into memory and load - consider improvements to this
String filePath = valuesInQuotes[0];
String data;
if(new File(filePath).isAbsolute()){
data = FileUtils.readFileToString(new File(filePath), "UTF8");
}
else{
try {
//assume running from within a jar,
data = ResourceUtils.resource2String(filePath);
} catch (Exception e) {
//from IDE
data = ResourceUtils.resource2String("/"+filePath);
}
}
copyInStatement = copyInStatement.replace("'"+filePath+"'", "STDIN");
totalInsertedRecords = copyManager.copyIn(copyInStatement, new StringReader(data));
}
log.info("Inserted " + totalInsertedRecords + " via COPY IN. Tenant: " + tenantId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyIn
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
|
copyIn
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onHorizontalLine(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLElement("hr", parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHorizontalLine
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
onHorizontalLine
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getValue(String key, String defaultValue) {
String value = fields.get(key);
if(StringHelper.containsNonWhitespace(key)) {
return value;
}
return defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: src/main/java/org/olat/restapi/support/MultipartReader.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getValue
|
src/main/java/org/olat/restapi/support/MultipartReader.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public Long duplicateCheckCountSql(DuplicateCheckVo duplicateCheckVo);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: duplicateCheckCountSql
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45207
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
duplicateCheckCountSql
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDictMapper.java
|
8632a835c23f558dfee3584d7658cc6a13ccec6f
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.