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 Route.Collection delete(final String path1, final String path2, final String path3,
final Route.OneArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{delete(path1, handler), delete(path2, handler),
delete(path3, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
delete
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAccept(boolean accept) {
this.accept = accept;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccept
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
setAccept
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<WorkflowTask> findTasks() throws DotDataException {
totalCount = APILocator.getWorkflowAPI().countTasks(this);
return APILocator.getWorkflowAPI().searchTasks(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findTasks
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
findTasks
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setInvalidityDate(Date invalidityDate) {
this.invalidityDate = invalidityDate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInvalidityDate
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setInvalidityDate
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String printPlace(SysSite site, String templatePath, CmsPlaceMetadata metadata) throws IOException, TemplateException {
StringWriter writer = new StringWriter();
printPlace(writer, site, templatePath, metadata);
return writer.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printPlace
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-20914
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
printPlace
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
|
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateNCharacterStream(String columnName,
@Nullable Reader x, long length) throws SQLException {
updateNCharacterStream(findColumn(columnName), x, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateNCharacterStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateNCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSyncActive(Account account, String authority, ComponentName cname) {
mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS,
"no permission to read the sync stats");
int userId = UserHandle.getCallingUserId();
int callingUid = Binder.getCallingUid();
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
if (syncManager == null) {
return false;
}
return syncManager.getSyncStorageEngine().isSyncActive(
new SyncStorageEngine.EndPoint(account, authority, userId));
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSyncActive
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
isSyncActive
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void read(ZipFile zipFile) throws IOException, XarException
{
Enumeration<ZipArchiveEntry> zipEntries = zipFile.getEntries();
while (zipEntries.hasMoreElements()) {
ZipArchiveEntry entry = zipEntries.nextElement();
if (!entry.isDirectory()) {
InputStream stream = zipFile.getInputStream(entry);
try {
readEntry(stream, entry.getName());
} finally {
stream.close();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
read
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelNotificationWithTag(String pkg, String tag, int id, int userId) {
checkCallerIsSystemOrSameApp(pkg);
userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
Binder.getCallingUid(), userId, true, false, "cancelNotificationWithTag", pkg);
// Don't allow client applications to cancel foreground service notis or autobundled
// summaries.
cancelNotification(Binder.getCallingUid(), Binder.getCallingPid(), pkg, tag, id, 0,
(Binder.getCallingUid() == Process.SYSTEM_UID
? 0 : Notification.FLAG_FOREGROUND_SERVICE)
| (Binder.getCallingUid() == Process.SYSTEM_UID
? 0 : Notification.FLAG_AUTOGROUP_SUMMARY), false, userId,
REASON_APP_CANCEL, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelNotificationWithTag
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
|
cancelNotificationWithTag
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
void setTaskToAffiliateWith(Task taskToAffiliateWith) {
if (launchMode != LAUNCH_SINGLE_INSTANCE && launchMode != LAUNCH_SINGLE_TASK) {
task.setTaskToAffiliateWith(taskToAffiliateWith);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTaskToAffiliateWith
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
|
setTaskToAffiliateWith
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void start(BundleContext context) throws Exception {
//Nothing to do. The bundle-activator interface only allows to load this extension as a stand-alone plugin.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: start
File: _ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/PreventExternalURIResolverExtension.java
Repository: diffplug/spotless
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-9843
|
MEDIUM
| 5.1
|
diffplug/spotless
|
start
|
_ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/PreventExternalURIResolverExtension.java
|
451251ff6a8534173e0db7cbd9dd7cbc26522cf7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T setLong(K name, long value) {
return set(name, fromLong(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLong
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
|
setLong
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSortBy() {
return sortBy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSortBy
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getSortBy
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 cmnt(String comment) {
return comment(comment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cmnt
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
cmnt
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Set<ResourceActivity> getResourceActivities() {
return Collections.emptySet();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceActivities
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getResourceActivities
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int addAppTask(IBinder activityToken, Intent intent,
ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
final int callingUid = Binder.getCallingUid();
final long callingIdent = Binder.clearCallingIdentity();
try {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(activityToken);
if (r == null) {
throw new IllegalArgumentException("Activity does not exist; token="
+ activityToken);
}
ComponentName comp = intent.getComponent();
if (comp == null) {
throw new IllegalArgumentException("Intent " + intent
+ " must specify explicit component");
}
if (thumbnail.getWidth() != mThumbnailWidth
|| thumbnail.getHeight() != mThumbnailHeight) {
throw new IllegalArgumentException("Bad thumbnail size: got "
+ thumbnail.getWidth() + "x" + thumbnail.getHeight() + ", require "
+ mThumbnailWidth + "x" + mThumbnailHeight);
}
if (intent.getSelector() != null) {
intent.setSelector(null);
}
if (intent.getSourceBounds() != null) {
intent.setSourceBounds(null);
}
if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0) {
if ((intent.getFlags()&Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS) == 0) {
// The caller has added this as an auto-remove task... that makes no
// sense, so turn off auto-remove.
intent.addFlags(Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
}
} else if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
// Must be a new task.
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
if (!comp.equals(mLastAddedTaskComponent) || callingUid != mLastAddedTaskUid) {
mLastAddedTaskActivity = null;
}
ActivityInfo ainfo = mLastAddedTaskActivity;
if (ainfo == null) {
ainfo = mLastAddedTaskActivity = AppGlobals.getPackageManager().getActivityInfo(
comp, 0, UserHandle.getUserId(callingUid));
if (ainfo.applicationInfo.uid != callingUid) {
throw new SecurityException(
"Can't add task for another application: target uid="
+ ainfo.applicationInfo.uid + ", calling uid=" + callingUid);
}
}
TaskRecord task = new TaskRecord(this, mStackSupervisor.getNextTaskId(), ainfo,
intent, description);
int trimIdx = trimRecentsForTaskLocked(task, false);
if (trimIdx >= 0) {
// If this would have caused a trim, then we'll abort because that
// means it would be added at the end of the list but then just removed.
return INVALID_TASK_ID;
}
final int N = mRecentTasks.size();
if (N >= (ActivityManager.getMaxRecentTasksStatic()-1)) {
final TaskRecord tr = mRecentTasks.remove(N - 1);
tr.removedFromRecents();
}
task.inRecents = true;
mRecentTasks.add(task);
r.task.stack.addTask(task, false, false);
task.setLastThumbnail(thumbnail);
task.freeLastThumbnail();
return task.taskId;
}
} finally {
Binder.restoreCallingIdentity(callingIdent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAppTask
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
|
addAppTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
public static JPopupMenu makePopUp(
@Nonnull final MindMapPanel source,
final boolean fullScreenModeActive,
@Nonnull final DialogProvider dialogProvider,
@Nullable final Topic topicUnderMouse,
@Nonnull @MustNotContainNull final Topic[] selectedTopics,
@Nonnull Map<Class<? extends PopUpMenuItemPlugin>, CustomJob> customProcessors
) {
final JPopupMenu result = UI_COMPO_FACTORY.makePopupMenu();
final List<PopUpMenuItemPlugin> pluginMenuItems = MindMapPluginRegistry.getInstance().findFor(PopUpMenuItemPlugin.class);
final List<JMenuItem> tmpList = new ArrayList<JMenuItem>();
final boolean isModelNotEmpty = source.getModel().getRoot() != null;
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MAIN, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MANIPULATORS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.EXTRAS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
final JMenu exportMenu = UI_COMPO_FACTORY.makeMenu(BUNDLE.getString("MMDExporters.SubmenuName"));
exportMenu.setIcon(ICON_SERVICE.getIconForId(IconID.POPUP_EXPORT));
final JMenu importMenu = UI_COMPO_FACTORY.makeMenu(BUNDLE.getString("MMDImporters.SubmenuName"));
importMenu.setIcon(ICON_SERVICE.getIconForId(IconID.POPUP_IMPORT));
putAllItemsAsSection(result, importMenu, findPopupMenuItems(source, PopUpSection.IMPORT, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
if (isModelNotEmpty) {
putAllItemsAsSection(result, exportMenu, findPopupMenuItems(source, PopUpSection.EXPORT, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
}
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.TOOLS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MISC, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
return result;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000542
- Severity: MEDIUM
- CVSS Score: 6.8
Description: #45 activated FEATURE_SECURE_PROCESSING for XML parsing
Function: makePopUp
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
Fixed Code:
@Nonnull
public static JPopupMenu makePopUp(
@Nonnull final MindMapPanel source,
final boolean fullScreenModeActive,
@Nonnull final DialogProvider dialogProvider,
@Nullable final Topic topicUnderMouse,
@Nonnull @MustNotContainNull final Topic[] selectedTopics,
@Nonnull Map<Class<? extends PopUpMenuItemPlugin>, CustomJob> customProcessors
) {
final JPopupMenu result = UI_COMPO_FACTORY.makePopupMenu();
final List<PopUpMenuItemPlugin> pluginMenuItems = MindMapPluginRegistry.getInstance().findFor(PopUpMenuItemPlugin.class);
final List<JMenuItem> tmpList = new ArrayList<JMenuItem>();
final boolean isModelNotEmpty = source.getModel().getRoot() != null;
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MAIN, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MANIPULATORS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.EXTRAS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
final JMenu exportMenu = UI_COMPO_FACTORY.makeMenu(BUNDLE.getString("MMDExporters.SubmenuName"));
exportMenu.setIcon(ICON_SERVICE.getIconForId(IconID.POPUP_EXPORT));
final JMenu importMenu = UI_COMPO_FACTORY.makeMenu(BUNDLE.getString("MMDImporters.SubmenuName"));
importMenu.setIcon(ICON_SERVICE.getIconForId(IconID.POPUP_IMPORT));
putAllItemsAsSection(result, importMenu, findPopupMenuItems(source, PopUpSection.IMPORT, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
if (isModelNotEmpty) {
putAllItemsAsSection(result, exportMenu, findPopupMenuItems(source, PopUpSection.EXPORT, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
}
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.TOOLS, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
putAllItemsAsSection(result, null, findPopupMenuItems(source, PopUpSection.MISC, fullScreenModeActive, tmpList, dialogProvider, topicUnderMouse, selectedTopics, pluginMenuItems, customProcessors));
return result;
}
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
makePopUp
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 1
|
Analyze the following code function for security vulnerabilities
|
private WindowState computeFocusedWindowLocked() {
final int displayCount = mDisplayContents.size();
for (int i = 0; i < displayCount; i++) {
final DisplayContent displayContent = mDisplayContents.valueAt(i);
WindowState win = findFocusedWindowLocked(displayContent);
if (win != null) {
return win;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeFocusedWindowLocked
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
|
computeFocusedWindowLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCallerShell() {
final int callingUid = injectBinderCallingUid();
return callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerShell
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
isCallerShell
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KeyExchange getKex() {
return kex;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKex
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
getKex
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isPrimitive2(final Class<?> clazz) {
Boolean primitive = clazz.isPrimitive() //
|| clazz == Boolean.class //
|| clazz == Character.class //
|| clazz == Byte.class //
|| clazz == Short.class //
|| clazz == Integer.class //
|| clazz == Long.class //
|| clazz == Float.class //
|| clazz == Double.class //
|| clazz == BigInteger.class //
|| clazz == BigDecimal.class //
|| clazz == String.class //
|| clazz == java.util.Date.class //
|| clazz.isEnum() //
;
if (!primitive) {
primitive = ModuleUtil.callWhenHasJavaSql(isPrimitiveFuncation, clazz);
}
return primitive != null ? primitive : false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPrimitive2
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
isPrimitive2
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getInputDispatchingTimeoutMillis() {
return mActivityRecord != null
? mActivityRecord.mInputDispatchingTimeoutMillis
: DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputDispatchingTimeoutMillis
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
getInputDispatchingTimeoutMillis
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_STATUS_BAR, conditional = true)
public boolean setStatusBarDisabled(@Nullable ComponentName admin, boolean disabled) {
throwIfParentInstance("setStatusBarDisabled");
try {
return mService.setStatusBarDisabled(admin, mContext.getPackageName(), disabled);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatusBarDisabled
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setStatusBarDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public GlobalSerializerConfig getGlobalSerializerConfig() {
return globalSerializerConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalSerializerConfig
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getGlobalSerializerConfig
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getWeeklyVotes() {
if (weeklyVotes < 0) {
weeklyVotes = 0;
}
return weeklyVotes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWeeklyVotes
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getWeeklyVotes
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public int stopService(IApplicationThread caller, Intent service,
String resolvedType, int userId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopService
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
stopService
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean killProcessesBelowAdj(int belowAdj, String reason) {
if (Binder.getCallingUid() != SYSTEM_UID) {
throw new SecurityException("killProcessesBelowAdj() only available to system");
}
boolean killed = false;
synchronized (this) {
synchronized (mProcLock) {
synchronized (mPidsSelfLocked) {
final int size = mPidsSelfLocked.size();
for (int i = 0; i < size; i++) {
final int pid = mPidsSelfLocked.keyAt(i);
final ProcessRecord proc = mPidsSelfLocked.valueAt(i);
if (proc == null) continue;
final int adj = proc.mState.getSetAdj();
if (adj > belowAdj && !proc.isKilledByAm()) {
proc.killLocked(reason, ApplicationExitInfo.REASON_PERMISSION_CHANGE,
true);
killed = true;
}
}
}
}
}
return killed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killProcessesBelowAdj
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
killProcessesBelowAdj
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getAvoidMoveToFront() {
return mAvoidMoveToFront;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAvoidMoveToFront
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getAvoidMoveToFront
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkObjectClassIsLocal(BaseCollection object, XWikiContext context) throws XWikiException
{
DocumentReference xclass = object.getXClassReference();
WikiReference wikiReference = xclass.getWikiReference();
String db = context.getWikiId();
if (!wikiReference.getName().equals(db)) {
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_OBJECT,
"XObject [{0}] is an instance of an external XClass and cannot be persisted in this wiki [{1}].", null,
new Object[] {this.localEntityReferenceSerializer.serialize(object.getReference()), db});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkObjectClassIsLocal
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
|
checkObjectClassIsLocal
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setResourceRoot(Class<?> cls)
{
rootClass=cls;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceRoot
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4583
|
HIGH
| 8.8
|
LEMS/jLEMS
|
setResourceRoot
|
src/main/java/org/lemsml/jlems/io/util/JUtil.java
|
8c224637d7d561076364a9e3c2c375daeaf463dc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addConferenceParticipants(String CallId, List<Uri> participants,
Session.Info sessionInfo) throws RemoteException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addConferenceParticipants
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
addConferenceParticipants
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getOnsubmit() {
return this.onsubmit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOnsubmit
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
getOnsubmit
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
public void select(AsyncResult<SQLConnection> conn, String sql, Handler<AsyncResult<ResultSet>> replyHandler) {
try {
if (conn.failed()) {
replyHandler.handle(Future.failedFuture(conn.cause()));
return;
}
conn.result().query(sql, replyHandler);
} catch (Exception e) {
log.error("select sql: " + e.getMessage() + " - " + sql, e);
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: select
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
|
select
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Element getDOMElement(XMLEventReader xmlEventReader) throws ParsingException {
Transformer transformer = null;
final String JDK_TRANSFORMER_PROPERTY = "picketlink.jdk.transformer";
boolean useJDKTransformer = Boolean.parseBoolean(SecurityActions.getSystemProperty(JDK_TRANSFORMER_PROPERTY, "false"));
try {
if (useJDKTransformer) {
transformer = TransformerUtil.getTransformer();
} else {
transformer = TransformerUtil.getStaxSourceToDomResultTransformer();
}
Document resultDocument = DocumentUtil.createDocument();
DOMResult domResult = new DOMResult(resultDocument);
Source source = new StAXSource(xmlEventReader);
TransformerUtil.transform(transformer, source, domResult);
Document doc = (Document) domResult.getNode();
return doc.getDocumentElement();
} catch (ConfigurationException e) {
throw logger.parserException(e);
} catch (XMLStreamException e) {
throw logger.parserException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDOMElement
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getDOMElement
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
List<ShortcutInfo> getAllShortcutsForTest() {
final List<ShortcutInfo> ret = new ArrayList<>(1);
forEachShortcut(ret::add);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllShortcutsForTest
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
getAllShortcutsForTest
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processRecoverTransactions(TransactionInfo info) throws Exception {
TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
context = cs.getContext();
TransactionId[] preparedTransactions = broker.getPreparedTransactions(context);
return new DataArrayResponse(preparedTransactions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRecoverTransactions
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processRecoverTransactions
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
void setProfileApp(ApplicationInfo app, String processName, ProfilerInfo profilerInfo,
ApplicationInfo sdkSandboxClientApp) {
synchronized (mAppProfiler.mProfilerLock) {
if (!Build.IS_DEBUGGABLE) {
boolean isAppDebuggable = (app.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
boolean isAppProfileable = app.isProfileableByShell();
if (sdkSandboxClientApp != null) {
isAppDebuggable |=
(sdkSandboxClientApp.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
isAppProfileable |= sdkSandboxClientApp.isProfileableByShell();
}
if (!isAppDebuggable && !isAppProfileable) {
throw new SecurityException("Process not debuggable, "
+ "and not profileable by shell: " + app.packageName);
}
}
mAppProfiler.setProfileAppLPf(processName, profilerInfo);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileApp
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
setProfileApp
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void promoteChildren(Element ele) {
promoteChildren(ele, ele.getChildNodes());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: promoteChildren
File: src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-28367
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
promoteChildren
|
src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
|
0199e7e194dba5e7d7197703f43ebe22401e61ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addAccountAndLogMetrics(
IAccountManagerResponse response, String accountType,
String authTokenType, String[] requiredFeatures,
boolean expectActivityLaunch, Bundle optionsIn, int userId) {
final int pid = Binder.getCallingPid();
final int uid = Binder.getCallingUid();
final Bundle options = (optionsIn == null) ? new Bundle() : optionsIn;
options.putInt(AccountManager.KEY_CALLER_UID, uid);
options.putInt(AccountManager.KEY_CALLER_PID, pid);
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
logRecordWithUid(
accounts, AccountsDb.DEBUG_ACTION_CALLED_ACCOUNT_ADD, AccountsDb.TABLE_ACCOUNTS,
uid);
new Session(accounts, response, accountType, expectActivityLaunch,
true /* stripAuthTokenFromResult */, null /* accountName */,
false /* authDetailsRequired */, true /* updateLastAuthenticationTime */) {
@Override
public void run() throws RemoteException {
mAuthenticator.addAccount(
this, mAccountType, authTokenType, requiredFeatures, options);
String callerPackage = options.getString(
AccountManager.KEY_ANDROID_PACKAGE_NAME);
logAddAccountMetrics(
callerPackage, accountType, requiredFeatures, authTokenType);
}
@Override
protected String toDebugString(long now) {
return super.toDebugString(now) + ", addAccount"
+ ", accountType " + accountType
+ ", requiredFeatures "
+ (requiredFeatures != null
? TextUtils.join(",", requiredFeatures)
: null);
}
}.bind();
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAccountAndLogMetrics
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
addAccountAndLogMetrics
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateBasePath() {
if (serverIndex != null) {
setBasePath(servers.get(serverIndex).URL(serverVariables));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBasePath
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
|
updateBasePath
|
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 handleNotifyFinishedGoingToSleep() {
synchronized (KeyguardViewMediator.this) {
if (DEBUG) Log.d(TAG, "handleNotifyFinishedGoingToSleep");
mKeyguardViewControllerLazy.get().onFinishedGoingToSleep();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNotifyFinishedGoingToSleep
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
handleNotifyFinishedGoingToSleep
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConnectTimeout
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setConnectTimeout
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Container get(ContainerType containerType) {
return jpaContainerProvider.get(OptionEntity_LongInt.class, containerType);
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-15018
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Fix #18 SQLInjection vulnerability cleared
Pattern and Option DAOs re-written to a common key-value base class. Using composite primary key in place of surrogate key.
Function: get
File: src/main/java/uk/q3c/krail/jpa/user/opt/DefaultJpaOptionContainerProvider.java
Repository: KrailOrg/krail-jpa
Fixed Code:
@Override
public Container get(ContainerType containerType) {
return jpaContainerProvider.get(JpaOptionEntity.class, containerType);
}
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
get
|
src/main/java/uk/q3c/krail/jpa/user/opt/DefaultJpaOptionContainerProvider.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 1
|
Analyze the following code function for security vulnerabilities
|
public Descriptor getDescriptor() {
return descriptor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptor
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraintValue.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getDescriptor
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraintValue.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public DirectoryBrowserSupport doWs( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, InterruptedException {
checkPermission(AbstractProject.WORKSPACE);
FilePath ws = getSomeWorkspace();
if ((ws == null) || (!ws.exists())) {
// if there's no workspace, report a nice error message
// Would be good if when asked for *plain*, do something else!
// (E.g. return 404, or send empty doc.)
// Not critical; client can just check if content type is not text/plain,
// which also serves to detect old versions of Hudson.
req.getView(this,"noWorkspace.jelly").forward(req,rsp);
return null;
} else {
return new DirectoryBrowserSupport(this, ws, getDisplayName()+" workspace", "folder.png", true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doWs
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
doWs
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasBack() {
final Boolean [] retVal = new Boolean[1];
final boolean[] complete = new boolean[1];
act.runOnUiThread(new Runnable() {
public void run() {
try {
retVal[0] = web.canGoBack();
} finally {
complete[0] = true;
}
}
});
while (!complete[0]) {
Display.getInstance().invokeAndBlock(new Runnable() {
@Override
public void run() {
if (!complete[0]) {
try {
Thread.sleep(20);
} catch (InterruptedException ex) {
}
}
}
});
}
return retVal[0].booleanValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasBack
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
|
hasBack
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParceledListSlice<SecurityEvent> retrievePreRebootSecurityLogs(ComponentName admin,
String packageName) {
if (!mHasFeature) {
return null;
}
final CallerIdentity caller = getCallerIdentity(admin, packageName);
if (isPermissionCheckFlagEnabled()) {
Preconditions.checkCallAuthorization(isOrganizationOwnedDeviceWithManagedProfile()
|| areAllUsersAffiliatedWithDeviceLocked());
enforcePermission(MANAGE_DEVICE_POLICY_SECURITY_LOGGING, caller.getPackageName(),
UserHandle.USER_ALL);
} else {
if (admin != null) {
Preconditions.checkCallAuthorization(
isProfileOwnerOfOrganizationOwnedDevice(caller)
|| isDefaultDeviceOwner(caller));
} else {
// A delegate app passes a null admin component, which is expected
Preconditions.checkCallAuthorization(
isCallerDelegate(caller, DELEGATION_SECURITY_LOGGING));
}
Preconditions.checkCallAuthorization(isOrganizationOwnedDeviceWithManagedProfile()
|| areAllUsersAffiliatedWithDeviceLocked());
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.RETRIEVE_PRE_REBOOT_SECURITY_LOGS)
.setAdmin(caller.getPackageName())
.write();
if (!mContext.getResources().getBoolean(R.bool.config_supportPreRebootSecurityLogs)
|| !mInjector.securityLogGetLoggingEnabledProperty()) {
return null;
}
recordSecurityLogRetrievalTime();
ArrayList<SecurityEvent> output = new ArrayList<SecurityEvent>();
try {
SecurityLog.readPreviousEvents(output);
int enabledUser = getSecurityLoggingEnabledUser();
if (enabledUser != UserHandle.USER_ALL) {
SecurityLog.redactEvents(output, enabledUser);
}
return new ParceledListSlice<SecurityEvent>(output);
} catch (IOException e) {
Slogf.w(LOG_TAG, "Fail to read previous events" , e);
return new ParceledListSlice<SecurityEvent>(Collections.<SecurityEvent>emptyList());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrievePreRebootSecurityLogs
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
retrievePreRebootSecurityLogs
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private native int nativeSendMouseWheelEvent(
long nativeContentViewCoreImpl, long timeMs, float x, float y, float verticalAxis);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeSendMouseWheelEvent
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
|
nativeSendMouseWheelEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Cursor query(boolean distinct, String table, String[] columns,
String selection, String[] selectionArgs, String groupBy,
String having, String orderBy, String limit, CancellationSignal cancellationSignal) {
return queryWithFactory(null, distinct, table, columns, selection, selectionArgs,
groupBy, having, orderBy, limit, cancellationSignal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: query
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
query
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_SHUTDOWN.equals(intent.getAction())) {
synchronized (KeyguardViewMediator.this){
mShuttingDown = true;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onReceive
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String escape(String input) {
StringBuilder b = new StringBuilder();
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (!CharMatcher.ascii().matches(c)) {
b.append(escapeChar(c));
} else {
b.append(c);
}
}
return b.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escape
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
|
escape
|
varexport/src/main/java/com/indeed/util/varexport/Variable.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetPassword(UserReference userReference, String newPassword)
throws ResetPasswordException
{
if (this.checkUserReference(userReference)) {
XWikiContext context = this.contextProvider.get();
DocumentUserReference documentUserReference = (DocumentUserReference) userReference;
DocumentReference reference = documentUserReference.getReference();
try {
XWikiDocument userDocument = context.getWiki().getDocument(reference, context);
userDocument.removeXObjects(RESET_PASSWORD_REQUEST_CLASS_REFERENCE);
BaseObject userXObject = userDocument.getXObject(USER_CLASS_REFERENCE);
userXObject.setStringValue("password", newPassword);
String saveComment = this.localizationManager.getTranslationPlain(
"xe.admin.passwordReset.step2.versionComment.passwordReset");
context.getWiki().saveDocument(userDocument, saveComment, true, context);
} catch (XWikiException e) {
throw new ResetPasswordException("Cannot open user document to perform reset password.", e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-522
- CVE: CVE-2022-41933
- Severity: MEDIUM
- CVSS Score: 6.5
Description: XWIKI-19869: Improve user property storage
- Provide a new API for sending text based email
- Provide a migration and a listener for informing users about it
Function: resetPassword
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void resetPassword(UserReference userReference, String newPassword)
throws ResetPasswordException
{
if (this.checkUserReference(userReference)) {
XWikiContext context = this.contextProvider.get();
DocumentUserReference documentUserReference = (DocumentUserReference) userReference;
DocumentReference reference = documentUserReference.getReference();
try {
XWikiDocument userDocument = context.getWiki().getDocument(reference, context);
userDocument.removeXObjects(RESET_PASSWORD_REQUEST_CLASS_REFERENCE);
BaseObject userXObject = userDocument.getXObject(USER_CLASS_REFERENCE);
// /!\ We cannot use BaseCollection#setStringValue as it's storing value in plain text.
userXObject.set("password", newPassword, context);
String saveComment = this.localizationManager.getTranslationPlain(
"xe.admin.passwordReset.step2.versionComment.passwordReset");
context.getWiki().saveDocument(userDocument, saveComment, true, context);
} catch (XWikiException e) {
throw new ResetPasswordException("Cannot open user document to perform reset password.", e);
}
}
}
|
[
"CWE-522"
] |
CVE-2022-41933
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
resetPassword
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
|
443e8398b75a1295067d74afb5898370782d863a
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Intent[] createShortcutIntents(int launcherUserId,
@NonNull String callingPackage,
@NonNull String packageName, @NonNull String shortcutId, int userId,
int callingPid, int callingUid) {
// Calling permission must be checked by LauncherAppsImpl.
Preconditions.checkStringNotEmpty(packageName, "packageName can't be empty");
Preconditions.checkStringNotEmpty(shortcutId, "shortcutId can't be empty");
synchronized (mLock) {
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
.attemptToRestoreIfNeededAndSave();
final boolean getPinnedByAnyLauncher =
canSeeAnyPinnedShortcut(callingPackage, launcherUserId,
callingPid, callingUid);
// Make sure the shortcut is actually visible to the launcher.
final ShortcutInfo si = getShortcutInfoLocked(
launcherUserId, callingPackage, packageName, shortcutId, userId,
getPinnedByAnyLauncher);
// "si == null" should suffice here, but check the flags too just to make sure.
if (si == null || !si.isEnabled() || !(si.isAlive() || getPinnedByAnyLauncher)) {
Log.e(TAG, "Shortcut " + shortcutId + " does not exist or disabled");
return null;
}
return si.getIntents();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createShortcutIntents
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
createShortcutIntents
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
void setVisibility(boolean visible) {
if (getParent() == null) {
Slog.w(TAG_WM, "Attempted to set visibility of non-existing app token: " + token);
return;
}
if (visible) {
mDeferHidingClient = false;
}
setVisibility(visible, mDeferHidingClient);
mAtmService.addWindowLayoutReasons(
ActivityTaskManagerService.LAYOUT_REASON_VISIBILITY_CHANGED);
mTaskSupervisor.getActivityMetricsLogger().notifyVisibilityChanged(this);
mTaskSupervisor.mAppVisibilitiesChangedSinceLastPause = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVisibility
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
|
setVisibility
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getTextContent() {
switch (getNodeType()) {
case ELEMENT_NODE:
case ATTRIBUTE_NODE:
case ENTITY_NODE:
case ENTITY_REFERENCE_NODE:
case DOCUMENT_FRAGMENT_NODE:
final StringBuilder builder = new StringBuilder();
for (final DomNode child : getChildren()) {
final short childType = child.getNodeType();
if (childType != COMMENT_NODE && childType != PROCESSING_INSTRUCTION_NODE) {
builder.append(child.getTextContent());
}
}
return builder.toString();
case TEXT_NODE:
case CDATA_SECTION_NODE:
case COMMENT_NODE:
case PROCESSING_INSTRUCTION_NODE:
return getNodeValue();
default:
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTextContent
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
|
getTextContent
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Response attachToPost(Message mess, String filename, InputStream file, HttpServletRequest request) {
Identity identity = getIdentity(request);
if(identity == null) {
return Response.serverError().status(Status.UNAUTHORIZED).build();
} else if (!identity.equalsByPersistableKey(mess.getCreator())) {
if(mess.getModifier() == null || !identity.equalsByPersistableKey(mess.getModifier())) {
return Response.serverError().status(Status.UNAUTHORIZED).build();
}
}
VFSContainer container = fom.getMessageContainer(mess.getForum().getKey(), mess.getKey());
VFSItem item = container.resolve(filename);
VFSLeaf attachment = null;
if(item == null) {
attachment = container.createChildLeaf(filename);
} else {
filename = VFSManager.rename(container, filename);
if(filename == null) {
return Response.serverError().status(Status.NOT_ACCEPTABLE).build();
}
attachment = container.createChildLeaf(filename);
}
try(OutputStream out = attachment.getOutputStream(false)) {
IOUtils.copy(file, out);
} catch (IOException e) {
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
} finally {
FileUtils.closeSafely(file);
}
return Response.ok().build();
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-41242
- Severity: HIGH
- CVSS Score: 7.9
Description: OO-5819: container can only create file in its own path
Function: attachToPost
File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
Repository: OpenOLAT
Fixed Code:
private Response attachToPost(Message mess, String filename, InputStream file, HttpServletRequest request) {
Identity identity = getIdentity(request);
if(identity == null) {
return Response.serverError().status(Status.UNAUTHORIZED).build();
} else if (!identity.equalsByPersistableKey(mess.getCreator())) {
if(mess.getModifier() == null || !identity.equalsByPersistableKey(mess.getModifier())) {
return Response.serverError().status(Status.UNAUTHORIZED).build();
}
}
VFSContainer container = fom.getMessageContainer(mess.getForum().getKey(), mess.getKey());
VFSItem item = container.resolve(filename);
VFSLeaf attachment = null;
if(item == null) {
attachment = container.createChildLeaf(filename);
} else {
filename = VFSManager.rename(container, filename);
if(filename == null) {
return Response.serverError().status(Status.NOT_ACCEPTABLE).build();
}
attachment = container.createChildLeaf(filename);
}
try(OutputStream out = attachment.getOutputStream(false)) {
IOUtils.copy(file, out);
} catch (IOException e) {
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
} finally {
FileUtils.closeSafely(file);
}
return Response.ok().build();
}
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
attachToPost
|
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void afterCreate(Record record) {
// 业务实体才验证
if (MetadataHelper.isBusinessEntity(entity)) verify(record);
EntityHelper.bindCommonsFieldsValue(record, record.getPrimary() == null);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-1613
- Severity: MEDIUM
- CVSS Score: 4.0
Description: fix: #596
Function: afterCreate
File: src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
Repository: getrebuild/rebuild
Fixed Code:
@Override
protected void afterCreate(Record record) {
int ec = entity.getEntityCode();
// 记录验证
if (MetadataHelper.isBusinessEntity(entity)) {
verify(record);
} else if (ec == EntityHelper.Feeds || ec == EntityHelper.FeedsComment
|| ec == EntityHelper.ProjectTask || ec == EntityHelper.ProjectTaskComment
|| ec == EntityHelper.User || ec == EntityHelper.Department || ec == EntityHelper.Role || ec == EntityHelper.Team) {
removeFieldIfUnSafe(record);
}
EntityHelper.bindCommonsFieldsValue(record, record.getPrimary() == null);
}
|
[
"CWE-79"
] |
CVE-2023-1613
|
MEDIUM
| 4
|
getrebuild/rebuild
|
afterCreate
|
src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
|
d422c1b9c0f6970bf7af0257a2c6b0f8be535963
| 1
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setParent(String parent)
{
// If the passed parent is an empty string we also need to set the reference to null. The reason is that
// in the database we store "" when the parent is empty and thus when Hibernate loads this class it'll call
// setParent with "" if the parent had not been set when saved.
if (StringUtils.isEmpty(parent)) {
setParentReference((EntityReference) null);
} else {
setParentReference(getRelativeEntityReferenceResolver().resolve(parent, EntityType.DOCUMENT));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setParent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract DeserializerFactory withConfig(DeserializerFactoryConfig config);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withConfig
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withConfig
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMetaclass(MetaClass metaclass)
{
this.metaclass = metaclass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMetaclass
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
|
setMetaclass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPhoneStateChanged(int phoneState) {
updateEmergencyCallButton();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPhoneStateChanged
File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
onPhoneStateChanged
|
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getUserSerialNumber(int userHandle) {
synchronized (mPackagesLock) {
if (!exists(userHandle)) return -1;
return getUserInfoLocked(userHandle).serialNumber;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserSerialNumber
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
getUserSerialNumber
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private void incRefsLocked(long id) {
if (DEBUG_REFS) {
if (mRefStacks == null) {
mRefStacks = new HashMap<>();
}
RuntimeException ex = new RuntimeException();
ex.fillInStackTrace();
mRefStacks.put(id, ex);
}
mNumRefs++;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: incRefsLocked
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
incRefsLocked
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public Optional<TimeZone> getTimeZone() {
return this.config.hasOption(ClickHouseClientOption.SERVER_TIME_ZONE)
? Optional.of(this.config.getServerTimeZone())
: Optional.empty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimeZone
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
getTimeZone
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void changeSendCipher(BlockCipher bc, MAC mac)
{
tc.changeSendCipher(bc, mac);
}
|
Vulnerability Classification:
- CWE: CWE-354
- CVE: CVE-2023-48795
- Severity: MEDIUM
- CVSS Score: 5.9
Description: Implement kex-strict from OpenSSH
Implement's OpenSSH's mitigation for the Terrapin attack.
Function: changeSendCipher
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
Fixed Code:
public void changeSendCipher(BlockCipher bc, MAC mac)
{
tc.changeSendCipher(bc, mac);
if (km.isStrictKex())
tc.resetSendSequenceNumber();
}
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
changeSendCipher
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 1
|
Analyze the following code function for security vulnerabilities
|
public Object clone()
{
Shell shell = new Shell();
shell.setExecutable( getExecutable() );
shell.setWorkingDirectory( getWorkingDirectory() );
shell.setShellArgs( getShellArgs() );
return shell;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clone
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
clone
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
Association startAssociationLocked(int sourceUid, String sourceProcess, int sourceState,
int targetUid, ComponentName targetComponent, String targetProcess) {
if (!mTrackingAssociations) {
return null;
}
ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> components
= mAssociations.get(targetUid);
if (components == null) {
components = new ArrayMap<>();
mAssociations.put(targetUid, components);
}
SparseArray<ArrayMap<String, Association>> sourceUids = components.get(targetComponent);
if (sourceUids == null) {
sourceUids = new SparseArray<>();
components.put(targetComponent, sourceUids);
}
ArrayMap<String, Association> sourceProcesses = sourceUids.get(sourceUid);
if (sourceProcesses == null) {
sourceProcesses = new ArrayMap<>();
sourceUids.put(sourceUid, sourceProcesses);
}
Association ass = sourceProcesses.get(sourceProcess);
if (ass == null) {
ass = new Association(sourceUid, sourceProcess, targetUid, targetComponent,
targetProcess);
sourceProcesses.put(sourceProcess, ass);
}
ass.mCount++;
ass.mNesting++;
if (ass.mNesting == 1) {
ass.mStartTime = ass.mLastStateUptime = SystemClock.uptimeMillis();
ass.mLastState = sourceState;
}
return ass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAssociationLocked
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
|
startAssociationLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String formatString(final String msg, Object... args) {
return String.format(Locale.ENGLISH, msg, args);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatString
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
formatString
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setAccessToken(accessToken);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccessToken
File: samples/client/petstore/java/okhttp-gson/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
|
setAccessToken
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(params = "action=" + ACTION_CONFIG)
@ResponseBody
public UeditorConfig config(HttpServletRequest request) {
String urlPrefix = siteComponent.getSite(request.getServerName()).getSitePath();
UeditorConfig config = new UeditorConfig();
config.setImageActionName(ACTION_UPLOAD);
config.setSnapscreenActionName(ACTION_UPLOAD);
config.setScrawlActionName(ACTION_UPLOAD_SCRAW);
config.setVideoActionName(ACTION_UPLOAD);
config.setFileActionName(ACTION_UPLOAD);
config.setCatcherActionName(ACTION_CATCHIMAGE);
config.setImageManagerActionName(ACTION_LISTFILE);
config.setFileManagerActionName(ACTION_LISTFILE);
config.setImageFieldName(FIELD_NAME);
config.setScrawlFieldName(FIELD_NAME);
config.setCatcherFieldName(FIELD_NAME);
config.setVideoFieldName(FIELD_NAME);
config.setFileFieldName(FIELD_NAME);
config.setImageUrlPrefix(urlPrefix);
config.setScrawlUrlPrefix(urlPrefix);
config.setSnapscreenUrlPrefix(urlPrefix);
config.setCatcherUrlPrefix(urlPrefix);
config.setVideoUrlPrefix(urlPrefix);
config.setFileUrlPrefix(urlPrefix);
config.setImageManagerUrlPrefix(urlPrefix);
config.setFileManagerUrlPrefix(urlPrefix);
config.setImageAllowFiles(IMAGE_ALLOW_FILES);
config.setCatcherAllowFiles(IMAGE_ALLOW_FILES);
config.setVideoAllowFiles(VIDEO_ALLOW_FILES);
config.setFileAllowFiles(ALLOW_FILES);
config.setImageManagerAllowFiles(IMAGE_ALLOW_FILES);
config.setFileManagerAllowFiles(ALLOW_FILES);
return config;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: config
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2021-27693
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
config
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java
|
0f4c4872914b6a71305e121a7d9a19c07cde0338
| 0
|
Analyze the following code function for security vulnerabilities
|
static SolrServer setupSolr(File solrRoot) throws IOException, SolrServerException {
logger.info("Setting up solr search index at {}", solrRoot);
File solrConfigDir = new File(solrRoot, "conf");
// Create the config directory
if (solrConfigDir.exists()) {
logger.info("solr search index found at {}", solrConfigDir);
} else {
logger.info("solr config directory doesn't exist. Creating {}", solrConfigDir);
FileUtils.forceMkdir(solrConfigDir);
}
// Make sure there is a configuration in place
copyClasspathResourceToFile("/solr/conf/protwords.txt", solrConfigDir);
copyClasspathResourceToFile("/solr/conf/schema.xml", solrConfigDir);
copyClasspathResourceToFile("/solr/conf/scripts.conf", solrConfigDir);
copyClasspathResourceToFile("/solr/conf/solrconfig.xml", solrConfigDir);
copyClasspathResourceToFile("/solr/conf/stopwords.txt", solrConfigDir);
copyClasspathResourceToFile("/solr/conf/synonyms.txt", solrConfigDir);
// Test for the existence of a data directory
File solrDataDir = new File(solrRoot, "data");
if (!solrDataDir.exists()) {
FileUtils.forceMkdir(solrDataDir);
}
// Test for the existence of the index. Note that an empty index directory will prevent solr from
// completing normal setup.
File solrIndexDir = new File(solrDataDir, "index");
if (solrIndexDir.isDirectory() && solrIndexDir.list().length == 0) {
FileUtils.deleteDirectory(solrIndexDir);
}
return SolrServerFactory.newEmbeddedInstance(solrRoot, solrDataDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setupSolr
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
setupSolr
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
@Deprecated
public
static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
copy
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loadDublinCore(Context c, Item myitem, String filename)
throws SQLException, IOException, ParserConfigurationException,
SAXException, TransformerException, AuthorizeException
{
Document document = loadXML(filename);
// Get the schema, for backward compatibility we will default to the
// dublin core schema if the schema name is not available in the import
// file
String schema;
NodeList metadata = XPathAPI.selectNodeList(document, "/dublin_core");
Node schemaAttr = metadata.item(0).getAttributes().getNamedItem(
"schema");
if (schemaAttr == null)
{
schema = MetadataSchema.DC_SCHEMA;
}
else
{
schema = schemaAttr.getNodeValue();
}
// Get the nodes corresponding to formats
NodeList dcNodes = XPathAPI.selectNodeList(document,
"/dublin_core/dcvalue");
if (!isQuiet)
{
System.out.println("\tLoading dublin core from " + filename);
}
// Add each one as a new format to the registry
for (int i = 0; i < dcNodes.getLength(); i++)
{
Node n = dcNodes.item(i);
addDCValue(c, myitem, schema, n);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadDublinCore
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
loadDublinCore
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
deviceManagerService = context.getServiceImpl(IDeviceService.class);
routingEngineService = context.getServiceImpl(IRoutingService.class);
topologyService = context.getServiceImpl(ITopologyService.class);
sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
vips = new HashMap<String, LBVip>();
pools = new HashMap<String, LBPool>();
members = new HashMap<String, LBMember>();
vipIpToId = new HashMap<Integer, String>();
vipIpToMac = new HashMap<Integer, MacAddress>();
memberIpToId = new HashMap<Integer, String>();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
init
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getKeyId() {
return keyId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyId
File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
Repository: tink-crypto/tink
The code follows secure coding practices.
|
[
"CWE-176"
] |
CVE-2020-8929
|
MEDIUM
| 5
|
tink-crypto/tink
|
getKeyId
|
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
|
93d839a5865b9d950dffdc9d0bc99b71280a8899
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkout(AbstractBuild build, Launcher launcher, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
SCM scm = getScm();
if(scm==null)
return true; // no SCM
FilePath workspace = build.getWorkspace();
workspace.mkdirs();
boolean r = scm.checkout(build, launcher, workspace, listener, changelogFile);
if (r) {
// Only calcRevisionsFromBuild if checkout was successful. Note that modern SCM implementations
// won't reach this line anyway, as they throw AbortExceptions on checkout failure.
calcPollingBaseline(build, launcher, listener);
}
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkout
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
checkout
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseSteps(final List<Element> stepList) throws GameParseException {
for (final Element current : stepList) {
final IDelegate delegate = getDelegate(current, "delegate", true);
final PlayerId player = getPlayerId(current, "player", false);
final String name = current.getAttribute("name");
String displayName = null;
final List<Element> propertyElements = getChildren("stepProperty", current);
final Properties stepProperties = pareStepProperties(propertyElements);
if (current.hasAttribute("display")) {
displayName = current.getAttribute("display");
}
final GameStep step = new GameStep(name, displayName, player, delegate, data, stepProperties);
if (current.hasAttribute("maxRunCount")) {
final int runCount = Integer.parseInt(current.getAttribute("maxRunCount"));
if (runCount <= 0) {
throw newGameParseException("maxRunCount must be positive");
}
step.setMaxRunCount(runCount);
}
data.getSequence().addStep(step);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseSteps
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseSteps
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateEmergencyCallButton() {
boolean visible = false;
if (mIsVoiceCapable) {
// Emergency calling requires voice capability.
if (isInCall()) {
visible = true; // always show "return to call" if phone is off-hook
} else {
final boolean simLocked = KeyguardUpdateMonitor.getInstance(mContext)
.isSimPinVoiceSecure();
if (simLocked) {
// Some countries can't handle emergency calls while SIM is locked.
visible = mEnableEmergencyCallWhileSimLocked;
} else {
// Only show if there is a secure screen (pin/pattern/SIM pin/SIM puk);
visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser());
}
}
}
if (visible) {
setVisibility(View.VISIBLE);
int textId;
if (isInCall()) {
textId = com.android.internal.R.string.lockscreen_return_to_call;
} else {
textId = com.android.internal.R.string.lockscreen_emergency_call;
}
setText(textId);
} else {
setVisibility(View.GONE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateEmergencyCallButton
File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
updateEmergencyCallButton
|
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getShellArgsList()
{
List<String> shellArgs = new ArrayList<String>();
List<String> existingShellArgs = super.getShellArgsList();
if ( ( existingShellArgs != null ) && !existingShellArgs.isEmpty() )
{
shellArgs.addAll( existingShellArgs );
}
shellArgs.add( "-c" );
return shellArgs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShellArgsList
File: src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getShellArgsList
|
src/main/java/org/codehaus/plexus/util/cli/shell/BourneShell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setUpFsVerityIfPossible(AndroidPackage pkg) throws Installer.InstallerException,
PrepareFailure, IOException, DigestException, NoSuchAlgorithmException {
if (!PackageManagerServiceUtils.isApkVerityEnabled()) {
return;
}
if (isIncrementalPath(pkg.getPath()) && IncrementalManager.getVersion()
< IncrementalManager.MIN_VERSION_TO_SUPPORT_FSVERITY) {
return;
}
// Collect files we care for fs-verity setup.
ArrayMap<String, String> fsverityCandidates = new ArrayMap<>();
// NB: These files will become only accessible if the signing key is loaded in kernel's
// .fs-verity keyring.
fsverityCandidates.put(pkg.getBaseApkPath(),
VerityUtils.getFsveritySignatureFilePath(pkg.getBaseApkPath()));
final String dmPath = DexMetadataHelper.buildDexMetadataPathForApk(
pkg.getBaseApkPath());
if (new File(dmPath).exists()) {
fsverityCandidates.put(dmPath, VerityUtils.getFsveritySignatureFilePath(dmPath));
}
for (String path : pkg.getSplitCodePaths()) {
fsverityCandidates.put(path, VerityUtils.getFsveritySignatureFilePath(path));
final String splitDmPath = DexMetadataHelper.buildDexMetadataPathForApk(path);
if (new File(splitDmPath).exists()) {
fsverityCandidates.put(splitDmPath,
VerityUtils.getFsveritySignatureFilePath(splitDmPath));
}
}
final String packageName = pkg.getPackageName();
for (Map.Entry<String, String> entry : fsverityCandidates.entrySet()) {
final String filePath = entry.getKey();
final String signaturePath = entry.getValue();
// fs-verity is optional for now. Only set up if signature is provided.
if (new File(signaturePath).exists() && !VerityUtils.hasFsverity(filePath)) {
try {
VerityUtils.setUpFsverity(filePath, signaturePath);
} catch (IOException e) {
throw new PrepareFailure(PackageManager.INSTALL_FAILED_BAD_SIGNATURE,
"Failed to enable fs-verity: " + e);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUpFsVerityIfPossible
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
setUpFsVerityIfPossible
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void interopDatabaseClearNative();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: interopDatabaseClearNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
interopDatabaseClearNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handle(Void event) {
if (preCommitTask != null) {
preCommitTask.accept(this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handle
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
handle
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
ClientLifecycleManager getLifecycleManager() {
return mLifecycleManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLifecycleManager
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
|
getLifecycleManager
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void scrollTo(int row, ScrollDestination destination) {
Objects.requireNonNull(destination,
"ScrollDestination can not be null");
if (row > getDataCommunicator().getDataProviderSize()) {
throw new IllegalArgumentException("Row outside dataProvider size");
}
getRpcProxy(GridClientRpc.class).scrollToRow(row, destination);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scrollTo
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
scrollTo
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate findByPrimaryKey(long kbTemplateId)
throws NoSuchTemplateException {
return findByPrimaryKey((Serializable)kbTemplateId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByPrimaryKey
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
findByPrimaryKey
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
private static URI toUri(HttpRequest in) throws URISyntaxException {
final String uri = in.uri();
if (uri.startsWith("//")) {
// Normalize the path that starts with more than one slash into the one with a single slash,
// so that java.net.URI does not raise a URISyntaxException.
for (int i = 0; i < uri.length(); i++) {
if (uri.charAt(i) != '/') {
return new URI(uri.substring(i - 1));
}
}
return ROOT;
} else {
return new URI(uri);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toUri
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toUri
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
default boolean contains(String name) {
return get(name, Object.class).isPresent();
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2022-21700
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Use ConversionContext constants where possible instead of class (#2356)
Changes
-------
* Added ArgumentConversionContext constants in ConversionContext
* Replaced Argument.of and use of argument classes with
ConversionContext constants where possible
* Added getFirst method in ConvertibleMultiValues that accepts
ArgumentConversionContent parameter
Partially addresses issue #2355
Function: contains
File: core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
Repository: micronaut-projects/micronaut-core
Fixed Code:
default boolean contains(String name) {
return get(name, Argument.OBJECT_ARGUMENT).isPresent();
}
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
contains
|
core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 1
|
Analyze the following code function for security vulnerabilities
|
ActivityRecord completeFinishing(String reason) {
return completeFinishing(true /* updateVisibility */, reason);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: completeFinishing
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
|
completeFinishing
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public SSLEngine getEngine() {
return engine;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEngine
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
getEngine
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startRecentsActivity(Intent intent, long eventTime,
@Nullable IRecentsAnimationRunner recentsAnimationRunner) {
enforceTaskPermission("startRecentsActivity()");
final int callingPid = Binder.getCallingPid();
final int callingUid = Binder.getCallingUid();
final long origId = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
final ComponentName recentsComponent = mRecentTasks.getRecentsComponent();
final String recentsFeatureId = mRecentTasks.getRecentsComponentFeatureId();
final int recentsUid = mRecentTasks.getRecentsComponentUid();
final WindowProcessController caller = getProcessController(callingPid, callingUid);
// Start a new recents animation
final RecentsAnimation anim = new RecentsAnimation(this, mTaskSupervisor,
getActivityStartController(), mWindowManager, intent, recentsComponent,
recentsFeatureId, recentsUid, caller);
if (recentsAnimationRunner == null) {
anim.preloadRecentsActivity();
} else {
anim.startRecentsActivity(recentsAnimationRunner, eventTime);
}
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startRecentsActivity
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
|
startRecentsActivity
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void setSearchCoordinatorSvcForUnitTest(ISearchCoordinatorSvc theSearchCoordinatorSvc) {
mySearchCoordinatorSvc = theSearchCoordinatorSvc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSearchCoordinatorSvcForUnitTest
File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setSearchCoordinatorSvcForUnitTest
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beforeAdd(ChannelHandlerContext ctx) throws Exception {
super.beforeAdd(ctx);
this.ctx = ctx;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beforeAdd
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
beforeAdd
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<PasswordQualityRequirement> getPasswordRequirements(String dn)
{
List<PasswordQualityRequirement> pqRequirements = new ArrayList<>();
try
{
GetPasswordQualityRequirementsExtendedRequest extendedRequest;
if(StringUtils.isEmpty(dn))
{
extendedRequest = GetPasswordQualityRequirementsExtendedRequest
.createAddWithDefaultPasswordPolicyRequest();
}
else
{
extendedRequest = GetPasswordQualityRequirementsExtendedRequest
.createSelfChangeForSpecifiedUserRequest(dn);
}
GetPasswordQualityRequirementsExtendedResult result =
(GetPasswordQualityRequirementsExtendedResult)
pool.processExtendedOperation(extendedRequest);
pqRequirements = result.getPasswordRequirements();
}
catch (LDAPException e)
{
log.error("Failed to retrieve password requirements.", e);
}
return pqRequirements;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordRequirements
File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java
Repository: pingidentity/ssam
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25084
|
MEDIUM
| 4
|
pingidentity/ssam
|
getPasswordRequirements
|
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
|
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyCallerUserId(@UserIdInt int userId) {
if (isCallerSystem()) {
return; // no check
}
final int callingUid = injectBinderCallingUid();
// Otherwise, make sure the arguments are valid.
if (UserHandle.getUserId(callingUid) != userId) {
throw new SecurityException("Invalid user-ID");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyCallerUserId
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
verifyCallerUserId
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean isAuthenticated() {
return authenticated;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAuthenticated
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
isAuthenticated
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canMagnifyWindow(int windowType) {
switch (windowType) {
case WindowManager.LayoutParams.TYPE_INPUT_METHOD:
case WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG:
case WindowManager.LayoutParams.TYPE_NAVIGATION_BAR:
case WindowManager.LayoutParams.TYPE_MAGNIFICATION_OVERLAY: {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canMagnifyWindow
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
|
canMagnifyWindow
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
void cleanUpSplashScreen() {
// We only clean up the splash screen if we were supposed to handle it. If it was
// transferred to another activity, the next one will handle the clean up.
if (mHandleExitSplashScreen && !startingMoved
&& (mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_FINISH
|| mTransferringSplashScreenState == TRANSFER_SPLASH_SCREEN_IDLE)) {
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Cleaning splash screen token=%s", this);
mAtmService.mTaskOrganizerController.onAppSplashScreenViewRemoved(getTask());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpSplashScreen
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
|
cleanUpSplashScreen
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@PUT
@Produces(MediaType.TEXT_XML)
@Path("createMediaPackageWithID/{id}")
@RestQuery(name = "createMediaPackageWithID", description = "Create an empty media package with ID /n Overrides Existing Mediapackage ", pathParameters = {
@RestParameter(description = "The Id for the new Mediapackage", isRequired = true, name = "id", type = RestParameter.Type.STRING) }, reponses = {
@RestResponse(description = "Returns media package", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR) }, returnDescription = "")
public Response createMediaPackage(@PathParam("id") String mediaPackageId) {
MediaPackage mp;
try {
mp = ingestService.createMediaPackage(mediaPackageId);
startCache.put(mp.getIdentifier().toString(), new Date());
return Response.ok(mp).build();
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
createMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public void open(Method method, URL url, boolean asyncFlag) {
this.open(method, url, asyncFlag, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: open
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
open
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void flushBuffer() throws IOException {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: flushBuffer
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
flushBuffer
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.