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
void sendBugreportToDeviceOwner(Uri bugreportUri, String bugreportHash) { synchronized (getLockObject()) { final Intent intent = new Intent(DeviceAdminReceiver.ACTION_BUGREPORT_SHARE); intent.setComponent(mOwners.getDeviceOwnerComponent()); intent.setDataAndType(bugreportUri, RemoteBugreportManager.BUGREPORT_MIMETYPE); intent.putExtra(DeviceAdminReceiver.EXTRA_BUGREPORT_HASH, bugreportHash); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); final UriGrantsManagerInternal ugm = LocalServices .getService(UriGrantsManagerInternal.class); final NeededUriGrants needed = ugm.checkGrantUriPermissionFromIntent(intent, Process.SHELL_UID, mOwners.getDeviceOwnerComponent().getPackageName(), mOwners.getDeviceOwnerUserId()); ugm.grantUriPermissionUncheckedFromIntent(needed, null); mContext.sendBroadcastAsUser(intent, UserHandle.of(mOwners.getDeviceOwnerUserId())); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendBugreportToDeviceOwner File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
sendBugreportToDeviceOwner
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Beta public static BufferedReader newReader(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newReader File: android/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
newReader
android/guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
@Override public void run() { Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable"); if (DEBUG) Log.d(TAG, "keyguardGoingAway"); mKeyguardViewControllerLazy.get().keyguardGoingAway(); int flags = 0; if (mKeyguardViewControllerLazy.get().shouldDisableWindowAnimationsForUnlock() || mWakeAndUnlocking && !mWallpaperSupportsAmbientMode) { flags |= KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS; } if (mKeyguardViewControllerLazy.get().isGoingToNotificationShade() || mWakeAndUnlocking && mWallpaperSupportsAmbientMode) { // When the wallpaper supports ambient mode, the scrim isn't fully opaque during // wake and unlock, and we should fade in the app on top of the wallpaper flags |= WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_TO_SHADE; } if (mKeyguardViewControllerLazy.get().isUnlockWithWallpaper()) { flags |= KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER; } if (mKeyguardViewControllerLazy.get().shouldSubtleWindowAnimationsForUnlock()) { flags |= WindowManagerPolicyConstants .KEYGUARD_GOING_AWAY_FLAG_SUBTLE_WINDOW_ANIMATIONS; } // If we are unlocking to the launcher, clear the snapshot so that any changes as part // of the in-window animations are reflected. This is needed even if we're not actually // playing in-window animations for this particular unlock since a previous unlock might // have changed the Launcher state. if (mWakeAndUnlocking && KeyguardUnlockAnimationController.Companion.isNexusLauncherUnderneath()) { flags |= KEYGUARD_GOING_AWAY_FLAG_TO_LAUNCHER_CLEAR_SNAPSHOT; } mUpdateMonitor.setKeyguardGoingAway(true); mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(true); // Don't actually hide the Keyguard at the moment, wait for window // manager until it tells us it's safe to do so with // startKeyguardExitAnimation. // Posting to mUiOffloadThread to ensure that calls to ActivityTaskManager will be in // order. final int keyguardFlag = flags; mUiBgExecutor.execute(() -> { try { ActivityTaskManager.getService().keyguardGoingAway(keyguardFlag); } catch (RemoteException e) { Log.e(TAG, "Error while calling WindowManager", e); } }); Trace.endSection(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run 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
run
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
private String formatHeaderDate(Date date) { DateFormat rfc1123Format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT")); return rfc1123Format.format(date); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: formatHeaderDate File: agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
formatHeaderDate
agent/jvm/src/main/java/org/jolokia/jvmagent/handler/JolokiaHttpHandler.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
public static Function<Job, Track> payloadAsTrack(final ServiceRegistry reg) { return new Function.X<Job, Track>() { @Override public Track xapply(Job job) throws MediaPackageException { waitForJob(reg, none(0L), job); return (Track) MediaPackageElementParser.getFromXml(job.getPayload()); } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: payloadAsTrack File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
payloadAsTrack
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
private void handleNode(Deque<Map<String, Object>> stack, Node node, boolean simpleMode) { // Handle document node if (node.getNodeType() == Node.DOCUMENT_NODE) { NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { if (children.item(i).getLocalName() != null) { handleNode(stack, children.item(i), simpleMode); return; } } } Map<String, Object> elementMap = new LinkedHashMap<>(); handleTypeAndAttributes(node, elementMap); // Set children NodeList children = node.getChildNodes(); int count = 0; for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); // This is to deal with text between xml tags for example new line characters if (child.getNodeType() != Node.TEXT_NODE && child.getNodeType() != Node.CDATA_SECTION_NODE) { handleNode(stack, child, simpleMode); count++; } else { // Deal with text nodes handleTextNode(child, elementMap); } } if (children.getLength() > 1) { if (!stack.isEmpty()) { List<Object> nodeChildren = new ArrayList<>(); for (int i = 0; i < count; i++) { nodeChildren.add(stack.pollLast()); } String key = simpleMode ? "_" + node.getLocalName() : "_children"; Collections.reverse(nodeChildren); if (nodeChildren.size() > 0) { // Before adding the children we need to handle mixed text Object text = elementMap.get("_text"); if (text instanceof List) { for (Object element : (List) text) { nodeChildren.add(element); } elementMap.remove("_text"); } elementMap.put(key, nodeChildren); } } } if (!elementMap.isEmpty()) { stack.addLast(elementMap); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleNode File: src/main/java/apoc/load/Xml.java Repository: neo4j-contrib/neo4j-apoc-procedures The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000820
HIGH
7.5
neo4j-contrib/neo4j-apoc-procedures
handleNode
src/main/java/apoc/load/Xml.java
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "Transport Connection to: " + transport.getRemoteAddress(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString 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
toString
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
protected void prepareTiles(Template template, HttpServletRequest request) { ComponentContext componentContext = (ComponentContext)request.getAttribute( ComponentConstants.COMPONENT_CONTEXT); if (componentContext == null) { return; } ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( WebKeys.THEME_DISPLAY); String tilesTitle = (String)componentContext.getAttribute("title"); themeDisplay.setTilesTitle(tilesTitle); template.put("tilesTitle", tilesTitle); String tilesContent = (String)componentContext.getAttribute("content"); themeDisplay.setTilesContent(tilesContent); template.put("tilesContent", tilesContent); boolean tilesSelectable = GetterUtil.getBoolean( (String)componentContext.getAttribute("selectable")); themeDisplay.setTilesSelectable(tilesSelectable); template.put("tilesSelectable", tilesSelectable); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareTiles File: portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java Repository: samuelkong/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2963
MEDIUM
4.3
samuelkong/liferay-portal
prepareTiles
portal-impl/src/com/liferay/portal/template/TemplateContextHelper.java
5db1f7622e8e2c9a559ef0145a0f04c5854a1e8b
0
Analyze the following code function for security vulnerabilities
@Override public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException { String id = correlationID != null ? new String(correlationID, getCharset()) : null; this.setStringProperty(JMS_MESSAGE_CORR_ID, id); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setJMSCorrelationIDAsBytes File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
setJMSCorrelationIDAsBytes
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public List<Tag> getAllTags() { List<Tag> tags = new ArrayList<>(); Cursor cursor = db.query(MySQLiteHelper.TABLE_TAGS, allColumns, null, null, null, null, null); cursor.moveToFirst(); while (!cursor.isAfterLast()) { Tag account = cursorToTag(cursor); tags.add(account); cursor.moveToNext(); } cursor.close(); return tags; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllTags File: app/src/main/java/com/dimtion/shaarlier/TagsSource.java Repository: dimtion/Shaarlier The code follows secure coding practices.
[ "CWE-89" ]
CVE-2015-10076
MEDIUM
5.2
dimtion/Shaarlier
getAllTags
app/src/main/java/com/dimtion/shaarlier/TagsSource.java
3d1d9b239d9b3cd87e8bed45a0f02da583ad371e
0
Analyze the following code function for security vulnerabilities
public void setAutoRestore(boolean doAutoRestore) { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "setAutoRestore"); Slog.i(TAG, "Auto restore => " + doAutoRestore); final long oldId = Binder.clearCallingIdentity(); try { synchronized (this) { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.BACKUP_AUTO_RESTORE, doAutoRestore ? 1 : 0); mAutoRestore = doAutoRestore; } } finally { Binder.restoreCallingIdentity(oldId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAutoRestore File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
setAutoRestore
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@GuardedBy("sSync") @VisibleForTesting public static void createSystemAssetsInZygoteLocked(boolean reinitialize, String frameworkPath) { if (sSystem != null && !reinitialize) { return; } try { final ArrayList<ApkAssets> apkAssets = new ArrayList<>(); apkAssets.add(ApkAssets.loadFromPath(frameworkPath, ApkAssets.PROPERTY_SYSTEM)); final String[] systemIdmapPaths = OverlayConfig.getZygoteInstance().createImmutableFrameworkIdmapsInZygote(); for (String idmapPath : systemIdmapPaths) { apkAssets.add(ApkAssets.loadOverlayFromPath(idmapPath, ApkAssets.PROPERTY_SYSTEM)); } sSystemApkAssetsSet = new ArraySet<>(apkAssets); sSystemApkAssets = apkAssets.toArray(new ApkAssets[apkAssets.size()]); if (sSystem == null) { sSystem = new AssetManager(true /*sentinel*/); } sSystem.setApkAssets(sSystemApkAssets, false /*invalidateCaches*/); } catch (IOException e) { throw new IllegalStateException("Failed to create system AssetManager", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSystemAssetsInZygoteLocked 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
createSystemAssetsInZygoteLocked
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public String getPlainText() { return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPlainText File: core/src/main/java/hudson/util/Secret.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
getPlainText
core/src/main/java/hudson/util/Secret.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
@Override public void setDateHeader(String arg0, long arg1) { // ignore }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDateHeader 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
setDateHeader
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public ApiScenario create(SaveApiScenarioRequest request, List<MultipartFile> bodyFiles, List<MultipartFile> scenarioFiles) { checkQuota(); request.setId(UUID.randomUUID().toString()); checkNameExist(request); int nextNum = getNextNum(request.getProjectId()); if (StringUtils.isBlank(request.getCustomNum())) { request.setCustomNum(String.valueOf(nextNum)); } checkScenarioNum(request); final ApiScenarioWithBLOBs scenario = buildSaveScenario(request); scenario.setVersion(0); scenario.setCreateTime(System.currentTimeMillis()); scenario.setNum(nextNum); List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenario); scenario.setUseUrl(JSONArray.toJSONString(useUrl)); scenario.setOrder(ServiceUtils.getNextOrder(scenario.getProjectId(), extApiScenarioMapper::getLastOrder)); //检查场景的请求步骤。如果含有ESB请求步骤的话,要做参数计算处理。 esbApiParamService.checkScenarioRequests(request); apiScenarioMapper.insert(scenario); apiScenarioReferenceIdService.saveByApiScenario(scenario); // 存储依赖关系 ApiAutomationRelationshipEdgeService relationshipEdgeService = CommonBeanFactory.getBean(ApiAutomationRelationshipEdgeService.class); if (relationshipEdgeService != null) { relationshipEdgeService.initRelationshipEdge(null, scenario); } uploadFiles(request, bodyFiles, scenarioFiles); return scenario; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
create
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
public List<BaseBlock> getHeaders() { return new ArrayList<>(this.headers); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHeaders File: src/main/java/com/github/junrar/Archive.java Repository: junrar The code follows secure coding practices.
[ "CWE-835" ]
CVE-2022-23596
MEDIUM
5
junrar
getHeaders
src/main/java/com/github/junrar/Archive.java
7b16b3d90b91445fd6af0adfed22c07413d4fab7
0
Analyze the following code function for security vulnerabilities
public String getFormField() { return formField; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFormField File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getFormField
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@Override public void login(String username, String password) { // ignore }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: login 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
login
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
@Deprecated public Document toXMLDocument(XWikiContext context) throws XWikiException { return toXMLDocument(true, false, false, false, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toXMLDocument 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
toXMLDocument
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
@Nullable private Set<String> transformColonDelimitedStringToSet(String value) { if (TextUtils.isEmpty(value)) return null; final TextUtils.SimpleStringSplitter splitter = new TextUtils.SimpleStringSplitter(':'); splitter.setString(value); final Set<String> items = new HashSet<>(); while (splitter.hasNext()) { final String str = splitter.next(); if (TextUtils.isEmpty(str)) { continue; } items.add(str); } return items; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transformColonDelimitedStringToSet File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
transformColonDelimitedStringToSet
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
public boolean isTouchExplorationEnabled() { return mTouchExplorationEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isTouchExplorationEnabled 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
isTouchExplorationEnabled
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private static File getDevServerPortFile(File npmFolder) { // UUID changes between JVM restarts String jvmUuid = System.getProperty(WEBPACK_PORTFILE_UUID_PROPERTY); if (jvmUuid == null) { jvmUuid = UUID.randomUUID().toString(); System.setProperty(WEBPACK_PORTFILE_UUID_PROPERTY, jvmUuid); } // Frontend path ensures uniqueness for multiple devmode apps running // simultaneously String frontendBuildPath = npmFolder.getAbsolutePath(); String uniqueUid = UUID.nameUUIDFromBytes( (jvmUuid + frontendBuildPath).getBytes(StandardCharsets.UTF_8)) .toString(); return new File(System.getProperty("java.io.tmpdir"), uniqueUid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDevServerPortFile File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
getDevServerPortFile
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
@Override public void killAllBackgroundProcessesExcept(int minTargetSdk, int maxProcState) { synchronized (ActivityManagerService.this) { ActivityManagerService.this.killAllBackgroundProcessesExcept( minTargetSdk, maxProcState); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killAllBackgroundProcessesExcept 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
killAllBackgroundProcessesExcept
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private void logQsSwipeDown(float y) { float vel = getCurrentQSVelocity(); final int gesture = mStatusBarState == StatusBarState.KEYGUARD ? MetricsEvent.ACTION_LS_QS : MetricsEvent.ACTION_SHADE_QS_PULL; mLockscreenGestureLogger.write(gesture, (int) ((y - mInitialTouchY) / mStatusBar.getDisplayDensity()), (int) (vel / mStatusBar.getDisplayDensity())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logQsSwipeDown File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
logQsSwipeDown
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public void unremoveProject(String name, AsyncMethodCallback resultHandler) { // Restore the project first then update its metadata as 'active'. handleAsVoidResult(executor.execute(Command.unremoveProject(SYSTEM, name)) .thenCompose(unused -> mds.restoreProject(SYSTEM, name)), resultHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unremoveProject File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
unremoveProject
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
static String cidFromCodePath(String fullCodePath) { int eidx = fullCodePath.lastIndexOf("/"); String subStr1 = fullCodePath.substring(0, eidx); int sidx = subStr1.lastIndexOf("/"); return subStr1.substring(sidx+1, eidx); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cidFromCodePath File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
cidFromCodePath
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public Bundle addingBundle(Bundle bundle, BundleEvent event) { Bundle result = super.addingBundle(bundle, event); if ((bundle.getState() & Bundle.ACTIVE) != 0 && symbolicName.equals(bundle.getSymbolicName())) { resourceBundle = new WeakReference<>(bundle); registerResource(bundle); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addingBundle File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java Repository: vaadin/osgi The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
addingBundle
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
0
Analyze the following code function for security vulnerabilities
private long longToZigzag(long l) { return (l << 1) ^ (l >> 63); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: longToZigzag File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
longToZigzag
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FolderDirectoryEntry that = (FolderDirectoryEntry) o; if (!subDirectory.equals(that.subDirectory)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: common/src/main/java/com/thoughtworks/go/domain/FolderDirectoryEntry.java Repository: gocd The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-43288
LOW
3.5
gocd
equals
common/src/main/java/com/thoughtworks/go/domain/FolderDirectoryEntry.java
f5c1d2aa9ab302a97898a6e4b16218e64fe8e9e4
0
Analyze the following code function for security vulnerabilities
public boolean isCommentUseCaptcha() { return commentUseCaptcha; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCommentUseCaptcha 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
isCommentUseCaptcha
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
0
Analyze the following code function for security vulnerabilities
@Transactional @Listen public void on(ProjectEvent event) { /* * Update asynchronously to avoid deadlock */ updateDates.put(event.getProject().getId(), event.getDate()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: on File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
on
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
@Override public void setSourceFile(final File sourceFile) { this.sourceFile = sourceFile; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSourceFile File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java Repository: codehaus-plexus/plexus-archiver The code follows secure coding practices.
[ "CWE-22", "CWE-61" ]
CVE-2023-37460
CRITICAL
9.8
codehaus-plexus/plexus-archiver
setSourceFile
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
54759839fbdf85caf8442076f001d5fd64e0dcb2
0
Analyze the following code function for security vulnerabilities
@Override public @UserIdInt int getLastResumedActivityUserId() { enforceCallingPermission( permission.INTERACT_ACROSS_USERS_FULL, "getLastResumedActivityUserId()"); synchronized (this) { if (mLastResumedActivity == null) { return mUserController.getCurrentUserId(); } return mLastResumedActivity.userId; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastResumedActivityUserId 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
getLastResumedActivityUserId
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
protected String _numberToName(int ch, boolean neg) throws IOException { final int lowBits = ch & 0x1F; int i; if (lowBits <= 23) { i = lowBits; } else { switch (lowBits) { case 24: i = _decode8Bits(); break; case 25: i = _decode16Bits(); break; case 26: i = _decode32Bits(); break; case 27: { long l = _decode64Bits(); if (neg) { l = -l - 1L; } return String.valueOf(l); } default: throw _constructError("Invalid length indicator for ints ("+lowBits+"), token 0x"+Integer.toHexString(ch)); } } if (neg) { i = -i - 1; } return String.valueOf(i); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _numberToName File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_numberToName
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
public void endOfEntryReached(InputStream inputStream) throws IOException { cipherInputStream.endOfEntryReached(inputStream); }
Vulnerability Classification: - CWE: CWE-346 - CVE: CVE-2023-22899 - Severity: MEDIUM - CVSS Score: 5.9 Description: #485 Calculate AES mac with cache and push back functionality Function: endOfEntryReached File: src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java Repository: srikanth-lingala/zip4j Fixed Code: public void endOfEntryReached(InputStream inputStream, int numberOfBytesPushedBack) throws IOException { cipherInputStream.endOfEntryReached(inputStream, numberOfBytesPushedBack); }
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
endOfEntryReached
src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
1
Analyze the following code function for security vulnerabilities
public void validateShortcutForPinRequest(@NonNull ShortcutInfo shortcut) { fixUpIncomingShortcutInfo(shortcut, /* forUpdate= */ false, /*forPinRequest=*/ true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateShortcutForPinRequest 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
validateShortcutForPinRequest
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public int encryptWithAd(byte[] ad, byte[] plaintext, int plaintextOffset, byte[] ciphertext, int ciphertextOffset, int length) throws ShortBufferException { int space; if (ciphertextOffset > ciphertext.length) space = 0; else space = ciphertext.length - ciphertextOffset; if (!haskey) { // The key is not set yet - return the plaintext as-is. if (length > space) throw new ShortBufferException(); if (plaintext != ciphertext || plaintextOffset != ciphertextOffset) System.arraycopy(plaintext, plaintextOffset, ciphertext, ciphertextOffset, length); return length; } if (space < 16 || length > (space - 16)) throw new ShortBufferException(); setup(ad); encrypt(plaintext, plaintextOffset, ciphertext, ciphertextOffset, length); poly.update(ciphertext, ciphertextOffset, length); finish(ad, length); System.arraycopy(polyKey, 0, ciphertext, ciphertextOffset + length, 16); return length + 16; }
Vulnerability Classification: - CWE: CWE-125, CWE-787 - CVE: CVE-2020-25021 - Severity: HIGH - CVSS Score: 7.5 Description: Improve array bounds checks in CipherState implementations Thanks to Pietro Oliva for identifying these issues. Function: encryptWithAd File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java Repository: rweather/noise-java Fixed Code: @Override public int encryptWithAd(byte[] ad, byte[] plaintext, int plaintextOffset, byte[] ciphertext, int ciphertextOffset, int length) throws ShortBufferException { int space; if (ciphertextOffset < 0 || ciphertextOffset > ciphertext.length) throw new IllegalArgumentException(); if (length < 0 || plaintextOffset < 0 || plaintextOffset > plaintext.length) throw new IllegalArgumentException(); space = ciphertext.length - ciphertextOffset; if (!haskey) { // The key is not set yet - return the plaintext as-is. if (length > space) throw new ShortBufferException(); if (plaintext != ciphertext || plaintextOffset != ciphertextOffset) System.arraycopy(plaintext, plaintextOffset, ciphertext, ciphertextOffset, length); return length; } if (space < 16 || length > (space - 16)) throw new ShortBufferException(); setup(ad); encrypt(plaintext, plaintextOffset, ciphertext, ciphertextOffset, length); poly.update(ciphertext, ciphertextOffset, length); finish(ad, length); System.arraycopy(polyKey, 0, ciphertext, ciphertextOffset + length, 16); return length + 16; }
[ "CWE-125", "CWE-787" ]
CVE-2020-25021
HIGH
7.5
rweather/noise-java
encryptWithAd
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
18e86b6f8bea7326934109aa9ffa705ebf4bde90
1
Analyze the following code function for security vulnerabilities
public Set<String> getBundleTypesAllowedForStorage() { return myBundleTypesAllowedForStorage; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBundleTypesAllowedForStorage File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getBundleTypesAllowedForStorage
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@Override public void printXMLStartElement(String name) { handleSpaceWhenStartElement(); super.printXMLStartElement(name); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-32070 - Severity: MEDIUM - CVSS Score: 6.1 Description: XRENDERING-663: Restrict allowed attributes in HTML rendering * Change HTML renderers to only print allowed attributes and elements. * Add prefix to forbidden attributes to preserve them in XWiki syntax. * Adapt tests to expect that invalid attributes get a prefix. Function: printXMLStartElement File: xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java Repository: xwiki/xwiki-rendering Fixed Code: @Override public void printXMLStartElement(String name) { if (this.htmlElementSanitizer == null || this.htmlElementSanitizer.isElementAllowed(name)) { handleSpaceWhenStartElement(); super.printXMLStartElement(name); } }
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
printXMLStartElement
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
1
Analyze the following code function for security vulnerabilities
private boolean isUsbDataSignalingEnabledInternalLocked() { final ActiveAdmin admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked( UserHandle.USER_SYSTEM); return admin == null || admin.mUsbDataSignalingEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUsbDataSignalingEnabledInternalLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
isUsbDataSignalingEnabledInternalLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public void syncAllIssues(Project project, IssueSyncRequest syncRequest) {}
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: syncAllIssues File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
syncAllIssues
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
@Override public InputStream findResource(URI systemId) { if ("file".equals(systemId.getScheme())) { try { return new FileInputStream(new File(systemId)); } catch (final Exception e) { log.info("File {} does not exist:" + systemId); return null; } } else if("jar".equals(systemId.getScheme())) { try { String toPath = systemId.toString(); if(toPath.contains("!")) { int index = toPath.indexOf('!'); String relative = toPath.substring(index + 1); Path newPath = root.resolve(relative); return Files.newInputStream(newPath); } } catch (Exception e) { log.error("File {} does not exist:" + systemId, e); return null; } } else if("zip".equals(systemId.getScheme())) { try { String toPath = systemId.toString(); if(toPath.contains(":")) { int index = toPath.indexOf(':'); String relative = toPath.substring(index + 1); Path newPath = root.resolve(relative); return Files.newInputStream(newPath); } } catch (Exception e) { log.error("File {} does not exist:" + systemId, e); return null; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findResource File: src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
findResource
src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java
699490be8e931af0ef1f135c55384db1f4232637
0
Analyze the following code function for security vulnerabilities
@Override public void projectOpened(Project project) { archiveAction.setEnabled(true); restoreAction.setEnabled(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: projectOpened File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java Repository: NationalSecurityAgency/ghidra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
projectOpened
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
0
Analyze the following code function for security vulnerabilities
static void resetBadHosts() { BAD_HOSTS.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetBadHosts File: src/net/sourceforge/plantuml/security/SURL.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
resetBadHosts
src/net/sourceforge/plantuml/security/SURL.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
public static String jsFunction_addApplication(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException { String status = null; if (args != null && args.length >= 4 && isStringArray(args)) { String name = (String) args[0]; if(StringUtils.isEmpty(name.trim())) { handleException("Application Name is empty."); } String username = (String) args[1]; String tier = (String) args[2]; if(StringUtils.isEmpty(tier.trim())) { handleException("No tier is defined for the Application."); } String callbackUrl = (String) args[3]; String description = (String) args[4]; String groupId = null; Map appAttributes = null; if (args.length > 5 && args[5] != null) { groupId = (String) args[5]; } String tokenType; if (args.length > 6 && args[6] != null) { tokenType = (String) args[6]; } else { tokenType = DEFAULT_TOKEN_TYPE; } try { if (args.length > 7 && args[7] != null) { String applicationAttributeString = (String) args[7]; if (!applicationAttributeString.isEmpty()) { appAttributes = new ObjectMapper().readValue(applicationAttributeString, Map.class); } } } catch (IOException e) { handleException("Error in reading application attributes of " + name, e); } APIConsumer apiConsumer = getAPIConsumer(thisObj); Subscriber subscriber = new Subscriber(username); Application application = new Application(name, subscriber); application.setTier(tier); application.setCallbackUrl(callbackUrl); application.setDescription(description); application.setTokenType(tokenType); if (groupId != null) { application.setGroupId(groupId); } if (appAttributes != null) { application.setApplicationAttributes(appAttributes); } int applicationId = apiConsumer.addApplication(application, username); status = apiConsumer.getApplicationStatusById(applicationId); return status; } else { handleException("Missing parameters."); } return status; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_addApplication File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_addApplication
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
@Override public boolean showStrictModeViolationDialog() { synchronized (mGlobalLock) { return mShowDialogs && !mSleeping && !mShuttingDown; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showStrictModeViolationDialog 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
showStrictModeViolationDialog
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private List<String> checkLockedFiles(VFSLeaf vfsItem, VFSContainer currentContainer, Identity identity) { String name = vfsItem.getName(); if (!name.toLowerCase().endsWith(".zip")) { return Collections.emptyList(); } if(currentContainer.canVersion() != VFSConstants.YES) { //this command don't overwrite existing folders return Collections.emptyList(); } String sZipContainer = name.substring(0, name.length() - 4); VFSItem zipContainer = currentContainer.resolve(sZipContainer); if(zipContainer == null) { return Collections.emptyList(); } else if (zipContainer instanceof VFSContainer) { return ZipUtil.checkLockedFileBeforeUnzipNonStrict(vfsItem, (VFSContainer)zipContainer, identity); } else { //replace a file with a folder ??? return Collections.emptyList(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkLockedFiles File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdUnzip.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
checkLockedFiles
src/main/java/org/olat/core/commons/modules/bc/commands/CmdUnzip.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
void removeCall(Call call, DisconnectCause disconnectCause) { CreateConnectionResponse response = mPendingResponses.remove(mCallIdMapper.getCallId(call)); if (response != null) { response.handleCreateConnectionFailure(disconnectCause); } mCallIdMapper.removeCall(call); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeCall File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
removeCall
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Sessional @Override public Project findByServiceDeskName(String serviceDeskName) { cacheLock.readLock().lock(); try { Long projectId = null; for (ProjectFacade facade: cache.values()) { if (serviceDeskName.equals(facade.getServiceDeskName())) { projectId = facade.getId(); break; } } if (projectId != null) return load(projectId); else return null; } finally { cacheLock.readLock().unlock(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByServiceDeskName File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
findByServiceDeskName
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
public void run() { // clean up the session's bookkeeping synchronized (mSession) { mSession.mRestoreTransport = null; mSession.mEnded = true; } // clean up the BackupManagerImpl side of the bookkeeping // and cancel any pending timeout message mBackupManager.clearRestoreSession(mSession); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
run
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public SyncStatusInfo getSyncStatusAsUser(Account account, String authority, ComponentName cname, int userId) { if (TextUtils.isEmpty(authority)) { throw new IllegalArgumentException("Authority must not be empty"); } enforceCrossUserPermission(userId, "no permission to read the sync stats for user " + userId); mContext.enforceCallingOrSelfPermission(Manifest.permission.READ_SYNC_STATS, "no permission to read the sync stats"); int callerUid = Binder.getCallingUid(); long identityToken = clearCallingIdentity(); try { SyncManager syncManager = getSyncManager(); if (syncManager == null) { return null; } SyncStorageEngine.EndPoint info; if (!(account == null || authority == null)) { info = new SyncStorageEngine.EndPoint(account, authority, userId); } else { throw new IllegalArgumentException("Must call sync status with valid authority"); } return syncManager.getSyncStorageEngine().getStatusByAuthority(info); } finally { restoreCallingIdentity(identityToken); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSyncStatusAsUser 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
getSyncStatusAsUser
services/core/java/com/android/server/content/ContentService.java
63363af721650e426db5b0bdfb8b2d4fe36abdb0
0
Analyze the following code function for security vulnerabilities
@Override public VFSContainer createChildContainer(String name) { File fNewFile = new File(getBasefile(), name); if(!isInPath(name)) { log.warn("Could not create a new container::{} in container::{} - file out of parent directory", name, getBasefile().getAbsolutePath()); return null; } if (!fNewFile.mkdir()) { return null; } LocalFolderImpl locFI = new LocalFolderImpl(fNewFile, this); locFI.setDefaultItemFilter(defaultFilter); return locFI; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2021-41242 - Severity: HIGH - CVSS Score: 7.9 Description: OO-5819: clean starting / for backward compatibility Function: createChildContainer File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java Repository: OpenOLAT Fixed Code: @Override public VFSContainer createChildContainer(String name) { name = cleanFilename(name); // backward compatibility File fNewFile = new File(getBasefile(), name); if(!isInPath(name)) { log.warn("Could not create a new container::{} in container::{} - file out of parent directory", name, getBasefile().getAbsolutePath()); return null; } if (!fNewFile.mkdir()) { return null; } LocalFolderImpl locFI = new LocalFolderImpl(fNewFile, this); locFI.setDefaultItemFilter(defaultFilter); return locFI; }
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
createChildContainer
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
1
Analyze the following code function for security vulnerabilities
private static native @Nullable String nativeGetResourceEntryName(long ptr, @AnyRes int resid);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetResourceEntryName 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
nativeGetResourceEntryName
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public String getCPULauncherArgs() { return getProperty(TS_CPU_LAUNCHER_ARGS, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCPULauncherArgs File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getCPULauncherArgs
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Column(name = "channel", nullable = false, length = 50) public String getChannel() { return this.channel; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChannel File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getChannel
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@LargeTest @Test public void testOutgoingVideoCallCanceledCheckVideoHistory() throws Exception { IdPair ids = startOutgoingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA, Process.myUserHandle(), VideoProfile.STATE_BIDIRECTIONAL); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.LOCAL); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21283 - Severity: MEDIUM - CVSS Score: 5.5 Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15) Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Function: testOutgoingVideoCallCanceledCheckVideoHistory File: tests/src/com/android/server/telecom/tests/VideoCallTests.java Repository: android Fixed Code: @LargeTest @Test public void testOutgoingVideoCallCanceledCheckVideoHistory() throws Exception { IdPair ids = startOutgoingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA, Process.myUserHandle(), VideoProfile.STATE_BIDIRECTIONAL, null); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.LOCAL); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); }
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testOutgoingVideoCallCanceledCheckVideoHistory
tests/src/com/android/server/telecom/tests/VideoCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
1
Analyze the following code function for security vulnerabilities
public BareMetal createBMAndDiscoveryGraph(String macs) { BareMetal bareMetal = bareMetalManager.createNewFromPXE(macs); Task t = createDiscoveryGraph(bareMetal.getId()); //direct run discovery to avoid ipxe chainload timeout stateMachine.runTaskGraph(t.getId()); return bareMetal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createBMAndDiscoveryGraph File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java Repository: fit2cloud/rackshift The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-42405
CRITICAL
9.8
fit2cloud/rackshift
createBMAndDiscoveryGraph
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
305aea3b20d36591d519f7d04e0a25be05a51e93
0
Analyze the following code function for security vulnerabilities
public void delete(String table, CQLWrapper cql, Handler<AsyncResult<UpdateResult>> replyHandler) { client.getConnection(conn -> delete(conn, table, cql, closeAndHandleResult(conn, replyHandler))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete 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
delete
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public String getType() { return type; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getType File: src/main/java/cn/luischen/model/ContentDomain.java Repository: WinterChenS/my-site The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29638
MEDIUM
5.4
WinterChenS/my-site
getType
src/main/java/cn/luischen/model/ContentDomain.java
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
0
Analyze the following code function for security vulnerabilities
@Override public boolean removeUploadedAttachments(DocumentReference documentReference) { TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession(); return temporaryAttachmentSession.removeAttachments(documentReference); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUploadedAttachments File: xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-749" ]
CVE-2023-26478
HIGH
8.1
xwiki/xwiki-platform
removeUploadedAttachments
xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
3c73c59e39b6436b1074d8834cf276916010014d
0
Analyze the following code function for security vulnerabilities
private void setTextViewColorSecondary(RemoteViews contentView, @IdRes int id, StandardTemplateParams p) { contentView.setTextColor(id, getSecondaryTextColor(p)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTextViewColorSecondary File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setTextViewColorSecondary
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public SerializationServiceBuilder addPortableFactory(int id, PortableFactory factory) { portableFactories.put(id, factory); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPortableFactory File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
addPortableFactory
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override public boolean canProfileOwnerResetPasswordWhenLocked(int userId) { Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()), String.format(NOT_SYSTEM_CALLER_MSG, "call canProfileOwnerResetPasswordWhenLocked")); synchronized (getLockObject()) { final ActiveAdmin poAdmin = getProfileOwnerAdminLocked(userId); if (poAdmin == null || getEncryptionStatus() != ENCRYPTION_STATUS_ACTIVE_PER_USER || !isResetPasswordTokenActiveForUserLocked(userId)) { return false; } final ApplicationInfo poAppInfo; try { poAppInfo = mIPackageManager.getApplicationInfo( poAdmin.info.getPackageName(), 0 /* flags */, userId); } catch (RemoteException e) { Slogf.e(LOG_TAG, "Failed to query PO app info", e); return false; } if (poAppInfo == null) { Slogf.wtf(LOG_TAG, "Cannot find AppInfo for profile owner"); return false; } if (!poAppInfo.isEncryptionAware()) { return false; } Slogf.d(LOG_TAG, "PO should be able to reset password from direct boot"); return true; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canProfileOwnerResetPasswordWhenLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
canProfileOwnerResetPasswordWhenLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public boolean onOptionsItemSelected(MenuItem item) { final int itemId = item.getItemId(); if (itemId == android.R.id.home) { // See ActionBar#setDisplayHomeAsUpEnabled() CallFeaturesSetting.goUpToTopLevelSetting(this, mSubscriptionInfoHelper); return true; } return super.onOptionsItemSelected(item); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onOptionsItemSelected File: src/com/android/phone/GsmUmtsCallForwardOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
onOptionsItemSelected
src/com/android/phone/GsmUmtsCallForwardOptions.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
public URI addQueryParamsToURI(URI uri, List<Property> allQueryParams, boolean encodeParamsToggle) { UriComponentsBuilder uriBuilder = UriComponentsBuilder.newInstance(); uriBuilder.uri(uri); if (allQueryParams != null) { for (Property queryParam : allQueryParams) { String key = queryParam.getKey(); if (isNotEmpty(key)) { if (encodeParamsToggle == true) { uriBuilder.queryParam( URLEncoder.encode(key, StandardCharsets.UTF_8), URLEncoder.encode((String) queryParam.getValue(), StandardCharsets.UTF_8) ); } else { uriBuilder.queryParam( key, queryParam.getValue() ); } } } } return uriBuilder.build(true).toUri(); }
Vulnerability Classification: - CWE: CWE-918 - CVE: CVE-2022-4096 - Severity: MEDIUM - CVSS Score: 6.5 Description: fix: Better support for disallowed hosts (#16842) Function: addQueryParamsToURI File: app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/URIUtils.java Repository: appsmithorg/appsmith Fixed Code: public URI addQueryParamsToURI(URI uri, List<Property> allQueryParams, boolean encodeParamsToggle) { UriComponentsBuilder uriBuilder = UriComponentsBuilder.newInstance(); uriBuilder.uri(uri); if (allQueryParams != null) { for (Property queryParam : allQueryParams) { String key = queryParam.getKey(); if (isNotEmpty(key)) { if (encodeParamsToggle) { uriBuilder.queryParam( URLEncoder.encode(key, StandardCharsets.UTF_8), URLEncoder.encode((String) queryParam.getValue(), StandardCharsets.UTF_8) ); } else { uriBuilder.queryParam( key, queryParam.getValue() ); } } } } return uriBuilder.build(true).toUri(); }
[ "CWE-918" ]
CVE-2022-4096
MEDIUM
6.5
appsmithorg/appsmith
addQueryParamsToURI
app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/restApiUtils/helpers/URIUtils.java
769719ccfe667f059fe0b107a19ec9feb90f2e40
1
Analyze the following code function for security vulnerabilities
private boolean storeNextMessage(String msg) { final boolean participating = conversation.getMode() == Conversational.MODE_SINGLE || conversation.getMucOptions().participating(); if (this.conversation.getStatus() != Conversation.STATUS_ARCHIVED && participating && this.conversation.setNextMessage(msg)) { this.activity.xmppConnectionService.updateConversation(this.conversation); return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: storeNextMessage File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
storeNextMessage
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public String getNavbarMenuLink2URL() { return CONF.navbarCustomMenuLink2Url(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNavbarMenuLink2URL File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getNavbarMenuLink2URL
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public void setRequest(WinstoneRequest req) { this.req = req; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRequest File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
setRequest
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") public String getTemplate() { String templateReferenceAsString; DocumentReference templateDocumentReference = getTemplateDocumentReference(); if (templateDocumentReference != null) { templateReferenceAsString = LOCAL_REFERENCE_SERIALIZER.serialize(templateDocumentReference); } else { templateReferenceAsString = ""; } return templateReferenceAsString; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTemplate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getTemplate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private void writeUserLocked(UserInfo userInfo) { FileOutputStream fos = null; AtomicFile userFile = new AtomicFile(new File(mUsersDir, userInfo.id + XML_SUFFIX)); try { fos = userFile.startWrite(); final BufferedOutputStream bos = new BufferedOutputStream(fos); // XmlSerializer serializer = XmlUtils.serializerInstance(); final XmlSerializer serializer = new FastXmlSerializer(); serializer.setOutput(bos, StandardCharsets.UTF_8.name()); serializer.startDocument(null, true); serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); serializer.startTag(null, TAG_USER); serializer.attribute(null, ATTR_ID, Integer.toString(userInfo.id)); serializer.attribute(null, ATTR_SERIAL_NO, Integer.toString(userInfo.serialNumber)); serializer.attribute(null, ATTR_FLAGS, Integer.toString(userInfo.flags)); serializer.attribute(null, ATTR_CREATION_TIME, Long.toString(userInfo.creationTime)); serializer.attribute(null, ATTR_LAST_LOGGED_IN_TIME, Long.toString(userInfo.lastLoggedInTime)); if (userInfo.iconPath != null) { serializer.attribute(null, ATTR_ICON_PATH, userInfo.iconPath); } if (userInfo.partial) { serializer.attribute(null, ATTR_PARTIAL, "true"); } if (userInfo.guestToRemove) { serializer.attribute(null, ATTR_GUEST_TO_REMOVE, "true"); } if (userInfo.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID) { serializer.attribute(null, ATTR_PROFILE_GROUP_ID, Integer.toString(userInfo.profileGroupId)); } serializer.startTag(null, TAG_NAME); serializer.text(userInfo.name); serializer.endTag(null, TAG_NAME); Bundle restrictions = mUserRestrictions.get(userInfo.id); if (restrictions != null) { writeRestrictionsLocked(serializer, restrictions); } serializer.endTag(null, TAG_USER); serializer.endDocument(); userFile.finishWrite(fos); } catch (Exception ioe) { Slog.e(LOG_TAG, "Error writing user info " + userInfo.id + "\n" + ioe); userFile.failWrite(fos); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeUserLocked 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
writeUserLocked
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
public void omitField(Class definedIn, String fieldName) { if (elementIgnoringMapper == null) { throw new com.thoughtworks.xstream.InitializationException("No " + ElementIgnoringMapper.class.getName() + " available"); } elementIgnoringMapper.omitField(definedIn, fieldName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: omitField File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
omitField
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
@Override protected void startNodeRegistration(Injector injector) { // Register this node. final NodeService nodeService = injector.getInstance(NodeService.class); final ServerStatus serverStatus = injector.getInstance(ServerStatus.class); final ActivityWriter activityWriter = injector.getInstance(ActivityWriter.class); final LeaderElectionService leaderElectionService = injector.getInstance(LeaderElectionService.class); nodeService.registerServer(serverStatus.getNodeId().toString(), leaderElectionService.isLeader(), httpConfiguration.getHttpPublishUri(), Tools.getLocalCanonicalHostname()); serverStatus.setLocalMode(isLocal()); if (leaderElectionService.isLeader() && !nodeService.isOnlyLeader(serverStatus.getNodeId())) { LOG.warn("Detected another leader in the cluster. Retrying in {} seconds to make sure it is not " + "an old stale instance.", TimeUnit.MILLISECONDS.toSeconds(configuration.getStaleLeaderTimeout())); try { Thread.sleep(configuration.getStaleLeaderTimeout()); } catch (InterruptedException e) { /* nope */ } if (!nodeService.isOnlyLeader(serverStatus.getNodeId())) { // All devils here. String what = "Detected other leader node in the cluster! Starting as non-leader! " + "This is a mis-configuration you should fix."; LOG.warn(what); activityWriter.write(new Activity(what, Server.class)); final NotificationService notificationService = injector.getInstance(NotificationService.class); // remove legacy notification, if present //noinspection deprecation notificationService.fixed(notificationService.build().addType(Notification.Type.MULTI_MASTER)); // Write a notification. Notification notification = notificationService.buildNow() .addType(Notification.Type.MULTI_LEADER) .addSeverity(Notification.Severity.URGENT); notificationService.publishIfFirst(notification); configuration.setIsLeader(false); } else { LOG.warn("Stale leader has gone. Starting as leader."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startNodeRegistration File: graylog2-server/src/main/java/org/graylog2/commands/Server.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
startNodeRegistration
graylog2-server/src/main/java/org/graylog2/commands/Server.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
public void setQuietPeriod(Integer seconds) throws IOException { this.quietPeriod = seconds; save(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setQuietPeriod 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
setQuietPeriod
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@Override protected boolean wantOnSelectionChangedNotifications() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: wantOnSelectionChangedNotifications File: src/main/java/org/projectforge/web/task/TaskTreeForm.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
wantOnSelectionChangedNotifications
src/main/java/org/projectforge/web/task/TaskTreeForm.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
@Override public EntityReference getDocumentReference() { return SendMailConfigClassDocumentConfigurationSource.MAILCONFIG_REFERENCE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDocumentReference File: xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-default/src/main/java/org/xwiki/mail/internal/MailConfigMandatoryDocumentInitializer.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-34465
HIGH
8.1
xwiki/xwiki-platform
getDocumentReference
xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-default/src/main/java/org/xwiki/mail/internal/MailConfigMandatoryDocumentInitializer.java
d28d7739089e1ae8961257d9da7135d1a01cb7d4
0
Analyze the following code function for security vulnerabilities
public String pageHtml(int segment, String helpUrl, String title) { if (segment == HTML_START) { String stylesheet = null; if (isPopup() && !useNewStyle()) { stylesheet = "popup.css"; } StringBuffer result = new StringBuffer(pageHtmlStyle(segment, title, stylesheet)); if (getSettings().isViewExplorer()) { result.append("<script type=\"text/javascript\" src=\""); result.append(getSkinUri()); result.append("commons/explorer.js\"></script>\n"); } result.append("<script type=\"text/javascript\">\n"); result.append(dialogScriptSubmit()); if (helpUrl != null) { result.append("if (top.head && top.head.helpUrl) {\n"); result.append("\ttop.head.helpUrl=\""); result.append(helpUrl + "\";\n"); result.append("}\n\n"); } // the variable that may be set as path: if non-null this will be // used as path for the online help window. This is needed because there are pages // e.g. /administration/accounts/users/new that perform a jsp - forward while leaving the // path parameter on the old page: no correct online help possible. result.append("var onlineHelpUriCustom = "); result.append(getOnlineHelpUriCustom()); result.append(";\n"); result.append("</script>\n"); return result.toString(); } else { return super.pageHtml(segment, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pageHtml File: src/org/opencms/workplace/CmsDialog.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
pageHtml
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
private void deleteByPojo(TestContext context, Object pojo) throws FieldException { Async async = context.async(); PostgresClient postgresClient = insertXAndSingleQuotePojo(context, new JsonArray().add(randomUuid()).add(randomUuid())); postgresClient.delete(FOO, pojo, context.asyncAssertSuccess(delete -> { context.assertEquals(1, delete.getUpdated(), "number of records deleted"); postgresClient.selectSingle("SELECT count(*) FROM " + FOO, context.asyncAssertSuccess(select -> { context.assertEquals(1, select.getInteger(0), "remaining records"); async.complete(); })); })); async.await(5000); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteByPojo File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
deleteByPojo
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public String getLiteralSystemId() { return fCurrentEntity != null ? fCurrentEntity.literalSystemId : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLiteralSystemId File: src/org/cyberneko/html/HTMLScanner.java Repository: sparklemotion/nekohtml The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-24839
MEDIUM
5
sparklemotion/nekohtml
getLiteralSystemId
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
public void setDockerExecutable(String dockerExecutable) { this.dockerExecutable = dockerExecutable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDockerExecutable File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-610" ]
CVE-2022-39206
CRITICAL
9.9
theonedev/onedev
setDockerExecutable
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
0052047a5b5095ac6a6b4a73a522d0272fec3a22
0
Analyze the following code function for security vulnerabilities
private void log(String message) { Log.d(SipUtil.LOG_TAG, PREFIX + message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: log File: sip/src/com/android/services/telephony/sip/SipAccountRegistry.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
log
sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
a294ae5342410431a568126183efe86261668b5d
0
Analyze the following code function for security vulnerabilities
@Test public void getInstanceTenant(TestContext context) { PostgresClient c1 = PostgresClient.getInstance(vertx, TENANT); PostgresClient c2 = PostgresClient.getInstance(vertx, TENANT); context.assertEquals(TENANT, c1.getTenantId()); context.assertEquals(TENANT, c2.getTenantId()); context.assertEquals("raml_module_builder", PostgresClient.getModuleName()); context.assertEquals(TENANT + "_raml_module_builder", c1.getSchemaName()); context.assertEquals(TENANT + "_raml_module_builder", c2.getSchemaName()); c1.closeClient(context.asyncAssertSuccess()); c2.closeClient(context.asyncAssertSuccess()); context.assertEquals(c1, c2, "same instance"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInstanceTenant File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
getInstanceTenant
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
void setLastReportedGlobalConfiguration(@NonNull Configuration config) { mLastReportedConfiguration.setGlobalConfiguration(config); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLastReportedGlobalConfiguration 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
setLastReportedGlobalConfiguration
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public String[] listAllTransports() { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "listAllTransports"); String[] list = null; ArrayList<String> known = new ArrayList<String>(); for (Map.Entry<String, IBackupTransport> entry : mTransports.entrySet()) { if (entry.getValue() != null) { known.add(entry.getKey()); } } if (known.size() > 0) { list = new String[known.size()]; known.toArray(list); } return list; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listAllTransports File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
listAllTransports
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
private int getHeartbeatTimeout() { // Permit three missed heartbeats before closing the UI return (int) (getDeploymentConfiguration().getHeartbeatInterval() * (3.1)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHeartbeatTimeout File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
getHeartbeatTimeout
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
protected HttpServletRequest prepareRequest() throws ChangeRequestException { XWikiContext context = this.contextProvider.get(); HttpServletRequest request = context.getRequest(); try { return (HttpServletRequest) this.requestParameterConverter.convert(request, context.getResponse()).get(); } catch (IOException e) { throw new ChangeRequestException("Error while converting request", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareRequest File: application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java Repository: xwiki-contrib/application-changerequest The code follows secure coding practices.
[ "CWE-522" ]
CVE-2023-49280
MEDIUM
6.5
xwiki-contrib/application-changerequest
prepareRequest
application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java
ff0f5368ea04f0e4aa7b33821c707dc68a8c5ca8
0
Analyze the following code function for security vulnerabilities
@Override public void startSystemLockTaskMode(int taskId) throws RemoteException { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "startSystemLockTaskMode"); // This makes inner call to look as if it was initiated by system. long ident = Binder.clearCallingIdentity(); try { synchronized (this) { final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId); // When starting lock task mode the stack must be in front and focused task.getStack().moveToFront("startSystemLockTaskMode"); startLockTaskModeLocked(task, true /* isSystemCaller */); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startSystemLockTaskMode 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
startSystemLockTaskMode
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
void handleWindowMovedIfNeeded() { if (!hasMoved()) { return; } // Frame has moved, containing content frame has also moved, and we're not currently // animating... let's do something. final int left = mWindowFrames.mFrame.left; final int top = mWindowFrames.mFrame.top; if (canPlayMoveAnimation()) { startMoveAnimation(left, top); } if (mWmService.mAccessibilityController.hasCallbacks()) { mWmService.mAccessibilityController.onSomeWindowResizedOrMoved(getDisplayId()); } try { mClient.moved(left, top); } catch (RemoteException e) { } mMovedByResize = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleWindowMovedIfNeeded 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
handleWindowMovedIfNeeded
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public void setProfileEnabled(ComponentName who) { if (!mHasFeature) { logMissingFeatureAction("Cannot enable profile for " + ComponentName.flattenToShortString(who)); return; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); final int userId = caller.getUserId(); Preconditions.checkCallAuthorization( isProfileOwner(caller) || isDefaultDeviceOwner(caller)); Preconditions.checkCallingUser(isManagedProfile(userId)); synchronized (getLockObject()) { // Check if the profile is already enabled. UserInfo managedProfile = getUserInfo(userId); if (managedProfile.isEnabled()) { Slogf.e(LOG_TAG, "setProfileEnabled is called when the profile is already enabled"); return; } mInjector.binderWithCleanCallingIdentity(() -> { mUserManager.setUserEnabled(userId); UserInfo parent = mUserManager.getProfileParent(userId); Intent intent = new Intent(Intent.ACTION_MANAGED_PROFILE_ADDED); intent.putExtra(Intent.EXTRA_USER, new UserHandle(userId)); UserHandle parentHandle = new UserHandle(parent.id); mLocalService.broadcastIntentToManifestReceivers(intent, parentHandle, /* requiresPermission= */ true); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND); mContext.sendBroadcastAsUser(intent, parentHandle); }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProfileEnabled File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
setProfileEnabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private Response replyToPost(Long messageKey, ReplyVO reply, Long authorKey, HttpServletRequest httpRequest, UriInfo uriInfo) { Identity identity = getIdentity(httpRequest); if(identity == null) { return Response.serverError().status(Status.UNAUTHORIZED).build(); } Identity author; if(authorKey == null) { author = identity; } else if(authorKey.equals(identity.getKey())) { author = identity; } else if(isAdminOf(authorKey, httpRequest)) { author = getMessageAuthor(authorKey, httpRequest); } else { return Response.serverError().status(Status.UNAUTHORIZED).build(); } // load message Message mess = fom.loadMessage(messageKey); if(mess == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } if(!forum.equalsByPersistableKey(mess.getForum())) { return Response.serverError().status(Status.CONFLICT).build(); } // creating the thread (a message without a parent message) Message newMessage = fom.createMessage(forum, author, false); newMessage.setTitle(reply.getTitle()); newMessage.setBody(reply.getBody()); fom.replyToMessage(newMessage, mess); if(reply.getAttachments() != null) { for(File64VO attachment:reply.getAttachments()) { byte[] fileAsBytes = Base64.decodeBase64(attachment.getFile()); InputStream in = new ByteArrayInputStream(fileAsBytes); attachToPost(newMessage, attachment.getFilename(), in, httpRequest); } } MessageVO vo = new MessageVO(newMessage); vo.setAttachments(getAttachments(newMessage, uriInfo)); return Response.ok(vo).build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: replyToPost File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
replyToPost
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
public static boolean isDownloadDir(@NonNull String path) { return PATTERN_DOWNLOADS_DIRECTORY.matcher(path).matches(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDownloadDir File: src/com/android/providers/media/util/FileUtils.java Repository: android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35670
HIGH
7.8
android
isDownloadDir
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
public Integer getMaximumSearchResultCountInTransaction() { return myMaximumSearchResultCountInTransaction; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaximumSearchResultCountInTransaction File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getMaximumSearchResultCountInTransaction
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public boolean isAllowInlineMatchUrlReferences() { return myAllowInlineMatchUrlReferences; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAllowInlineMatchUrlReferences File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isAllowInlineMatchUrlReferences
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@Override public List<RootTaskInfo> getAllRootTaskInfosOnDisplay(int displayId) { enforceTaskPermission("getAllRootTaskInfosOnDisplay()"); final long ident = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { return mRootWindowContainer.getAllRootTaskInfos(displayId); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllRootTaskInfosOnDisplay 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
getAllRootTaskInfosOnDisplay
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void unregisterUserSwitchObserver(IUserSwitchObserver observer) { mUserSwitchObservers.unregister(observer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unregisterUserSwitchObserver 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
unregisterUserSwitchObserver
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public List<Procedure> getAllProcedure(OBridgeConfiguration c) { List<Procedure> allProcedures = getAllProcedure(c.getPackagesLike(), ""); allProcedures.addAll(getAllSimpleFunctionAndProcedure()); return allProcedures; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllProcedure File: obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java Repository: karsany/obridge The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-25075
MEDIUM
4
karsany/obridge
getAllProcedure
obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java
52eca4ad05f3c292aed3178b2f58977686ffa376
0
Analyze the following code function for security vulnerabilities
public void adjust() { CmsImageScaler scaler = new CmsImageScaler(getContent(), getRootPath()); if (!scaler.isValid()) { // error calculating image dimensions - this image can't be scaled or resized return; } // check if the image is to big and needs to be rescaled if (scaler.isDownScaleRequired(m_imageDownScaler)) { // image is to big, perform rescale operation CmsImageScaler downScaler = scaler.getDownScaler(m_imageDownScaler); // perform the rescale using the adjusted size m_content = downScaler.scaleImage(m_content, m_rootPath); // image size has been changed, adjust the scaler for later setting of properties scaler.setHeight(downScaler.getHeight()); scaler.setWidth(downScaler.getWidth()); } CmsProperty p = new CmsProperty(CmsPropertyDefinition.PROPERTY_IMAGE_SIZE, null, scaler.toString()); // create the new property list if required (don't modify the original List) List<CmsProperty> result = new ArrayList<CmsProperty>(); if ((m_properties != null) && (m_properties.size() > 0)) { result.addAll(m_properties); result.remove(p); } // add the updated property result.add(p); // store the changed properties m_properties = result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adjust File: src/org/opencms/file/types/CmsResourceTypeImage.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3312
MEDIUM
4
alkacon/opencms-core
adjust
src/org/opencms/file/types/CmsResourceTypeImage.java
92e035423aa6967822d343e54392d4291648c0ee
0
Analyze the following code function for security vulnerabilities
@Sessional @Override public String getAvatarUrl(PersonIdent personIdent) { if (personIdent.getName().equals(User.ONEDEV_NAME)) { return AVATARS_BASE_URL + "onedev.png"; } else { EmailAddress emailAddress = emailAddressManager.findByValue(personIdent.getEmailAddress()); if (emailAddress != null && emailAddress.isVerified()) { return getAvatarUrl(emailAddress.getOwner()); } else if (settingManager.getSystemSetting().isGravatarEnabled() && StringUtils.isNotBlank(personIdent.getEmailAddress())) { return Gravatar.getURL(personIdent.getEmailAddress(), GRAVATAR_SIZE); } else { return generateAvatar(personIdent.getName(), personIdent.getEmailAddress()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAvatarUrl File: server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-552" ]
CVE-2022-39208
HIGH
7.5
theonedev/onedev
getAvatarUrl
server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
0
Analyze the following code function for security vulnerabilities
private boolean verifyPackageUpdateLPr(PackageSetting oldPkg, PackageParser.Package newPkg) { if ((oldPkg.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0) { Slog.w(TAG, "Unable to update from " + oldPkg.name + " to " + newPkg.packageName + ": old package not in system partition"); return false; } else if (mPackages.get(oldPkg.name) != null) { Slog.w(TAG, "Unable to update from " + oldPkg.name + " to " + newPkg.packageName + ": old package still exists"); return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyPackageUpdateLPr File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
verifyPackageUpdateLPr
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private void revertTransferOwnershipIfNecessaryLocked() { if (!mTransferOwnershipMetadataManager.metadataFileExists()) { return; } Slogf.e(LOG_TAG, "Owner transfer metadata file exists! Reverting transfer."); final TransferOwnershipMetadataManager.Metadata metadata = mTransferOwnershipMetadataManager.loadMetadataFile(); // Revert transfer if (metadata.adminType.equals(ADMIN_TYPE_PROFILE_OWNER)) { transferProfileOwnershipLocked(metadata.targetComponent, metadata.sourceComponent, metadata.userId); deleteTransferOwnershipMetadataFileLocked(); deleteTransferOwnershipBundleLocked(metadata.userId); } else if (metadata.adminType.equals(ADMIN_TYPE_DEVICE_OWNER)) { transferDeviceOwnershipLocked(metadata.targetComponent, metadata.sourceComponent, metadata.userId); deleteTransferOwnershipMetadataFileLocked(); deleteTransferOwnershipBundleLocked(metadata.userId); } updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ true); if (!isPolicyEngineForFinanceFlagEnabled()) { pushUserControlDisabledPackagesLocked(metadata.userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: revertTransferOwnershipIfNecessaryLocked 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
revertTransferOwnershipIfNecessaryLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void resetSingleDstBuffer() { singleDstBuffer[0] = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetSingleDstBuffer File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
resetSingleDstBuffer
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0