instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public boolean validateDocument(XWikiDocument doc, XWikiContext context) throws XWikiException { return doc.validate(context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
validateDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private void enablePackage(String packageName, @UserIdInt int userId) { try { final int enabledSetting = mIPackageManager.getApplicationEnabledSetting( packageName, userId); if (enabledSetting != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT && enabledSetting != PackageManager.COMPONENT_ENABLED_STATE_ENABLED) { mIPackageManager.setApplicationEnabledSetting( packageName, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, // Device policy app may have launched ManagedProvisioning, play nice and // don't kill it as a side-effect of this call. PackageManager.DONT_KILL_APP, userId, mContext.getOpPackageName()); } } catch (RemoteException e) { // Shouldn't happen. } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enablePackage 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
enablePackage
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected boolean isCameraFeatureAvailable() { return this.isCameraFeatureAvailable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCameraFeatureAvailable File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
isCameraFeatureAvailable
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
ConnectionInfo getSetting(String name) { return connInfoMap.get(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSetting File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getSetting
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public String[] getNonSystemLocales() { synchronized (this) { ensureValidLocked(); return nativeGetLocales(mObject, true /*excludeSystem*/); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNonSystemLocales 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
getNonSystemLocales
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings({"SameReturnValue", "UnusedParameters"}) public static boolean isFilenameValid(String filename) { // filename = filename.replaceFirst("/+", "/"); // normalize leading // slashes // return filename.startsWith(Environment.getDownloadCacheDirectory() // .toString()) // || filename.startsWith(Environment // .getExternalStorageDirectory().toString()); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFilenameValid File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
isFilenameValid
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
@Override public boolean requestAssistScreenshot(final IAssistScreenshotReceiver receiver) { if (!checkCallingPermission(Manifest.permission.READ_FRAME_BUFFER, "requestAssistScreenshot()")) { throw new SecurityException("Requires READ_FRAME_BUFFER permission"); } FgThread.getHandler().post(new Runnable() { @Override public void run() { Bitmap bm = screenshotApplicationsInner(null, Display.DEFAULT_DISPLAY, -1, -1, true); try { receiver.send(bm); } catch (RemoteException e) { } } }); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestAssistScreenshot File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
requestAssistScreenshot
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public Mode getMode() { return state.mode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMode File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-434" ]
CVE-2021-21245
HIGH
7.5
theonedev/onedev
getMode
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
public long countExecuteTimesByProjectID(String projectId) { Long result = extApiScenarioMapper.countExecuteTimesByProjectID(projectId); if (result == null) { return 0; } else { return result.longValue(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: countExecuteTimesByProjectID 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
countExecuteTimesByProjectID
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
public Builder setAllowPoolingConnection(boolean allowPoolingConnection) { this.allowPoolingConnection = allowPoolingConnection; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowPoolingConnection File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setAllowPoolingConnection
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
@Override protected void dump(FileDescriptor fd, PrintWriter printWriter, String[] args) { if (!DumpUtils.checkDumpPermission(mContext, LOG_TAG, printWriter)) return; try (IndentingPrintWriter pw = new IndentingPrintWriter(printWriter, " ")) { pw.println("Current Device Policy Manager state:"); pw.increaseIndent(); dumpImmutableState(pw); synchronized (getLockObject()) { mOwners.dump(pw); pw.println(); mDeviceAdminServiceController.dump(pw); pw.println(); dumpPerUserData(pw); pw.println(); mConstants.dump(pw); pw.println(); mStatLogger.dump(pw); pw.println(); pw.println("Encryption Status: " + getEncryptionStatusName(getEncryptionStatus())); pw.println("Logout user: " + getLogoutUserIdUnchecked()); pw.println(); if (mPendingUserCreatedCallbackTokens.isEmpty()) { pw.println("no pending user created callback tokens"); } else { int size = mPendingUserCreatedCallbackTokens.size(); pw.printf("%d pending user created callback token%s\n", size, (size == 1 ? "" : "s")); } pw.println(); pw.println("Keep profiles running: " + getUserData(UserHandle.USER_SYSTEM).mEffectiveKeepProfilesRunning); pw.println(); mPolicyCache.dump(pw); pw.println(); mStateCache.dump(pw); pw.println(); } synchronized (mSubscriptionsChangedListenerLock) { pw.println("Subscription changed listener : " + mSubscriptionsChangedListener); } pw.println("DPM global setting ALLOW_WORK_PROFILE_TELEPHONY_FOR_NON_DPM_ROLE_HOLDERS : " + mInjector.settingsGlobalGetString( Global.ALLOW_WORK_PROFILE_TELEPHONY_FOR_NON_DPM_ROLE_HOLDERS)); mHandler.post(() -> handleDump(pw)); dumpResources(pw); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump 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
dump
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void setDestDirectory(final File destDirectory) { this.destDirectory = destDirectory; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDestDirectory 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
setDestDirectory
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
54759839fbdf85caf8442076f001d5fd64e0dcb2
0
Analyze the following code function for security vulnerabilities
void addInstrumentationResultsLocked(ProcessRecord app, Bundle results) { final ActiveInstrumentation instr = app.getActiveInstrumentation(); if (instr == null) { Slog.w(TAG, "finishInstrumentation called on non-instrumented: " + app); return; } if (!instr.mFinished && results != null) { if (instr.mCurResults == null) { instr.mCurResults = new Bundle(results); } else { instr.mCurResults.putAll(results); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addInstrumentationResultsLocked 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
addInstrumentationResultsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public String getLocation() { return location; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLocation File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getLocation
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
void setPositiveButton(Button button) { mPositiveButton = button; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPositiveButton File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
setPositiveButton
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
@Override public void onScreenTurnedOff() { mLockIcon.setScreenOn(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onScreenTurnedOff File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onScreenTurnedOff
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static boolean zip(Set<String> files, File root, File target, VFSItemFilter filter, boolean withMetadata) { // Create a buffer for reading the files if (target.exists()) return false; List<VFSItem> vfsFiles = new ArrayList<>(); LocalFolderImpl vfsRoot = new LocalFolderImpl(root); for (String fileName: files) { VFSItem item = vfsRoot.resolve(fileName); if (item == null) { return false; } vfsFiles.add(item); } return zip(vfsFiles, new LocalFileImpl(target), filter, withMetadata); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: zip File: src/main/java/org/olat/core/util/ZipUtil.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
zip
src/main/java/org/olat/core/util/ZipUtil.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
public BaseClass getTagClass(XWikiContext context) throws XWikiException { return getMandatoryClass(context, new DocumentReference(context.getWikiId(), SYSTEM_SPACE, "TagClass")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTagClass File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getTagClass
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
protected boolean shouldAdjustToContextTimezone(DeserializationContext context) { return (_adjustToContextTZOverride != null) ? _adjustToContextTZOverride : context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldAdjustToContextTimezone File: datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
shouldAdjustToContextTimezone
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
@Override public String[] getLockTaskPackages(ComponentName who) { Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); final int userHandle = caller.getUserId(); synchronized (getLockObject()) { enforceCanCallLockTaskLocked(caller); final List<String> packages = getUserData(userHandle).mLockTaskPackages; return packages.toArray(new String[packages.size()]); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockTaskPackages 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
getLockTaskPackages
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void afterPropertiesSet() { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: afterPropertiesSet File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
afterPropertiesSet
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
@Override public String getSystemId() { return fSystemId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSystemId File: ext/java/nokogiri/XmlSchema.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-26247
MEDIUM
4
sparklemotion/nokogiri
getSystemId
ext/java/nokogiri/XmlSchema.java
9c87439d9afa14a365ff13e73adc809cb2c3d97b
0
Analyze the following code function for security vulnerabilities
@Override public boolean process(byte value) throws Exception { if (currentState == State.SKIP_CONTROL_CHARS) { char c = (char) (value & 0xFF); if (Character.isISOControl(c) || Character.isWhitespace(c)) { increaseCount(); return true; } currentState = State.READ_INITIAL; } return super.process(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: process File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
process
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
@Override @Cacheable(cacheNames=CacheConstant.SYS_USERS_CACHE, key="#username") @SensitiveEncode public LoginUser getEncodeUserInfo(String username){ if(oConvertUtils.isEmpty(username)) { return null; } LoginUser loginUser = new LoginUser(); SysUser sysUser = userMapper.getUserByName(username); if(sysUser==null) { return null; } BeanUtils.copyProperties(sysUser, loginUser); return loginUser; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEncodeUserInfo File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
getEncodeUserInfo
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder a(String name, String value) { return attribute(name, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: a File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
a
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
private String getLockAttributeName() { return getServiceName() + ".lock"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockAttributeName 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
getLockAttributeName
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
private void checkValidCaller(int uid, int userId) { if (UserHandle.getUserId(uid) == userId || uid == Process.SYSTEM_UID || uid == 0) return; throw new SecurityException("Caller uid=" + uid + " is not privileged to communicate with user=" + userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkValidCaller 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
checkValidCaller
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
protected ActivityStackSupervisor createStackSupervisor() { final ActivityStackSupervisor supervisor = new ActivityStackSupervisor(this, mHandler.getLooper()); supervisor.initialize(); return supervisor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStackSupervisor 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
createStackSupervisor
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void lockScreen() { unlockScreen(); try { android.os.PowerManager pm = (android.os.PowerManager) getSystemService(android.content.Context.POWER_SERVICE); wakeLock = pm.newWakeLock(android.os.PowerManager.SCREEN_BRIGHT_WAKE_LOCK | android.os.PowerManager.ACQUIRE_CAUSES_WAKEUP | android.os.PowerManager.ON_AFTER_RELEASE, "Codename One"); } catch (Exception excp) { excp.printStackTrace(); } if (wakeLock != null) { wakeLock.acquire(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lockScreen File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
lockScreen
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void resetSimAuthNetworks(@ResetSimReason int resetReason) { sendMessage(CMD_RESET_SIM_NETWORKS, resetReason); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetSimAuthNetworks File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
resetSimAuthNetworks
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private String getFailedPasswordAttemptWipeMessage() { return getUpdatableString( WORK_PROFILE_DELETED_FAILED_PASSWORD_ATTEMPTS_MESSAGE, R.string.work_profile_deleted_reason_maximum_password_failure); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFailedPasswordAttemptWipeMessage 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
getFailedPasswordAttemptWipeMessage
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private native WebContents nativeGetWebContentsAndroid(long nativeContentViewCoreImpl);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetWebContentsAndroid 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
nativeGetWebContentsAndroid
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
final String getAndRemove(CharSequence name, String defaultValue) { requireNonNull(defaultValue, "defaultValue"); final String value = getAndRemove(name); return value != null ? value : defaultValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAndRemove File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
getAndRemove
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@Nullable public static Icon getPictureIcon(@Nullable Bundle extras) { if (extras == null) return null; // When this style adds a picture, we only add one of the keys. If both were added, // it would most likely be a legacy app trying to override the picture in some way. // Because of that case it's better to give precedence to the legacy field. Bitmap bitmapPicture = extras.getParcelable(EXTRA_PICTURE, Bitmap.class); if (bitmapPicture != null) { return Icon.createWithBitmap(bitmapPicture); } else { return extras.getParcelable(EXTRA_PICTURE_ICON, Icon.class); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPictureIcon File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getPictureIcon
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public Optional<XWikiAttachment> getUploadedAttachment(DocumentReference documentReference, String filename) { TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession(); return temporaryAttachmentSession.getAttachment(documentReference, filename); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUploadedAttachment 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
getUploadedAttachment
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
protected void internalDeleteSubscription(AsyncResponse asyncResponse, String subName, boolean authoritative) { if (topicName.isGlobal()) { try { validateGlobalNamespaceOwnership(namespaceName); } catch (Exception e) { log.error("[{}] Failed to delete subscription {} from topic {}", clientAppId(), subName, topicName, e); resumeAsyncResponseExceptionally(asyncResponse, e); return; } } validateTopicOwnership(topicName, authoritative); // If the topic name is a partition name, no need to get partition topic metadata again if (topicName.isPartitioned()) { internalDeleteSubscriptionForNonPartitionedTopic(asyncResponse, subName, authoritative); } else { getPartitionedTopicMetadataAsync(topicName, authoritative, false).thenAccept(partitionMetadata -> { if (partitionMetadata.partitions > 0) { final List<CompletableFuture<Void>> futures = Lists.newArrayList(); for (int i = 0; i < partitionMetadata.partitions; i++) { TopicName topicNamePartition = topicName.getPartition(i); try { futures.add(pulsar().getAdminClient().topics() .deleteSubscriptionAsync(topicNamePartition.toString(), subName, false)); } catch (Exception e) { log.error("[{}] Failed to delete subscription {} {}", clientAppId(), topicNamePartition, subName, e); asyncResponse.resume(new RestException(e)); return; } } FutureUtil.waitForAll(futures).handle((result, exception) -> { if (exception != null) { Throwable t = exception.getCause(); if (t instanceof NotFoundException) { asyncResponse.resume(new RestException(Status.NOT_FOUND, "Subscription not found")); return null; } else if (t instanceof PreconditionFailedException) { asyncResponse.resume(new RestException(Status.PRECONDITION_FAILED, "Subscription has active connected consumers")); return null; } else { log.error("[{}] Failed to delete subscription {} {}", clientAppId(), topicName, subName, t); asyncResponse.resume(new RestException(t)); return null; } } asyncResponse.resume(Response.noContent().build()); return null; }); } else { internalDeleteSubscriptionForNonPartitionedTopic(asyncResponse, subName, authoritative); } }).exceptionally(ex -> { log.error("[{}] Failed to delete subscription {} from topic {}", clientAppId(), subName, topicName, ex); resumeAsyncResponseExceptionally(asyncResponse, ex); return null; }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalDeleteSubscription File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalDeleteSubscription
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
@Override public void tryCleanup() { debug("JSSEngine: tryCleanup()"); if (is_inbound_closed && is_outbound_closed) { // throw new RuntimeException("Probably shouldn't be here!"); cleanup(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tryCleanup File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
tryCleanup
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
public ApiClient setUserAgent(String userAgent) { userAgent = userAgent; addDefaultHeader("User-Agent", userAgent); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserAgent File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setUserAgent
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public boolean isNotNullOrNotEmptyStr(Object... args) { for (Object arg : args) { if (arg == null || "".equals(arg)) { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isNotNullOrNotEmptyStr File: web/src/main/java/com/zrlog/web/controller/BaseController.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
isNotNullOrNotEmptyStr
web/src/main/java/com/zrlog/web/controller/BaseController.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
private <T> ResponseEntity<T> exchangeGet(Env env, String path, ParameterizedTypeReference<T> reference, Object... uriVariables) { if (path.startsWith("/")) { path = path.substring(1, path.length()); } String uri = uriTemplateHandler.expand(path, uriVariables).getPath(); Transaction ct = Tracer.newTransaction("AdminAPI", uri); ct.addData("Env", env); List<ServiceDTO> services = getAdminServices(env, ct); for (ServiceDTO serviceDTO : services) { try { ResponseEntity<T> result = restTemplate.exchange(parseHost(serviceDTO) + path, HttpMethod.GET, null, reference, uriVariables); ct.setStatus(Transaction.SUCCESS); ct.complete(); return result; } catch (Throwable t) { logger.error("Http request failed, uri: {}, method: {}", uri, HttpMethod.GET, t); Tracer.logError(t); if (canRetry(t, HttpMethod.GET)) { Tracer.logEvent(TracerEventType.API_RETRY, uri); } else {// biz exception rethrow ct.setStatus(t); ct.complete(); throw t; } } } //all admin server down ServiceException e = new ServiceException(String.format("Admin servers are unresponsive. meta server address: %s, admin servers: %s", portalMetaDomainService.getDomain(env), services)); ct.setStatus(e); ct.complete(); throw e; }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2020-15170 - Severity: MEDIUM - CVSS Score: 6.8 Description: add access control support for admin service Function: exchangeGet File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java Repository: apolloconfig/apollo Fixed Code: private <T> ResponseEntity<T> exchangeGet(Env env, String path, ParameterizedTypeReference<T> reference, Object... uriVariables) { if (path.startsWith("/")) { path = path.substring(1, path.length()); } String uri = uriTemplateHandler.expand(path, uriVariables).getPath(); Transaction ct = Tracer.newTransaction("AdminAPI", uri); ct.addData("Env", env); List<ServiceDTO> services = getAdminServices(env, ct); HttpEntity<Void> entity = new HttpEntity<>(assembleExtraHeaders(env)); for (ServiceDTO serviceDTO : services) { try { ResponseEntity<T> result = restTemplate.exchange(parseHost(serviceDTO) + path, HttpMethod.GET, entity, reference, uriVariables); ct.setStatus(Transaction.SUCCESS); ct.complete(); return result; } catch (Throwable t) { logger.error("Http request failed, uri: {}, method: {}", uri, HttpMethod.GET, t); Tracer.logError(t); if (canRetry(t, HttpMethod.GET)) { Tracer.logEvent(TracerEventType.API_RETRY, uri); } else {// biz exception rethrow ct.setStatus(t); ct.complete(); throw t; } } } //all admin server down ServiceException e = new ServiceException(String.format("Admin servers are unresponsive. meta server address: %s, admin servers: %s", portalMetaDomainService.getDomain(env), services)); ct.setStatus(e); ct.complete(); throw e; }
[ "CWE-20" ]
CVE-2020-15170
MEDIUM
6.8
apolloconfig/apollo
exchangeGet
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
1
Analyze the following code function for security vulnerabilities
@Override public byte[] backupAccountAccessPermissions(int userId) { synchronized (mLock) { if (mBackupHelper == null) { mBackupHelper = new AccountManagerBackupHelper( AccountManagerService.this, this); } return mBackupHelper.backupAccountAccessPermissions(userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: backupAccountAccessPermissions File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
backupAccountAccessPermissions
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
private void initialize() throws SQLException { if (initialized) { throw new PSQLException( GT.tr( "This SQLXML object has already been initialized, so you cannot manipulate it further."), PSQLState.OBJECT_NOT_IN_STATE); } initialized = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-13692
MEDIUM
6.8
pgjdbc
initialize
pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java
14b62aca4764d496813f55a43d050b017e01eb65
0
Analyze the following code function for security vulnerabilities
public static long getLong(long address) { return PlatformDependent0.getLong(address); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLong File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
getLong
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Override public void initialize(LongPositiveConstraint constraintAnnotation) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/LongPositiveConstraint.java Repository: browserup/browserup-proxy The code follows secure coding practices.
[ "CWE-74" ]
CVE-2020-26282
HIGH
7.5
browserup/browserup-proxy
initialize
browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/LongPositiveConstraint.java
4b38e7a3e20917e5c3329d0d4e9590bed9d578ab
0
Analyze the following code function for security vulnerabilities
void removeReceiverLocked(ReceiverList rl) { mRegisteredReceivers.remove(rl.receiver.asBinder()); for (int i = rl.size() - 1; i >= 0; i--) { mReceiverResolver.removeFilter(rl.get(i)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeReceiverLocked 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
removeReceiverLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public Registration addBeforeEnterListener(BeforeEnterListener listener) { return addListener(BeforeEnterHandler.class, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addBeforeEnterListener File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
addBeforeEnterListener
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Override public void initializeKey(byte[] key, int offset) { ChaChaCore.initKey256(input, key, offset); n = 0; haskey = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeKey File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java Repository: rweather/noise-java The code follows secure coding practices.
[ "CWE-125", "CWE-787" ]
CVE-2020-25021
HIGH
7.5
rweather/noise-java
initializeKey
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
18e86b6f8bea7326934109aa9ffa705ebf4bde90
0
Analyze the following code function for security vulnerabilities
private void addConnectionServiceAdapter(IConnectionServiceAdapter adapter) { if (isServiceValid("addConnectionServiceAdapter")) { try { logOutgoing("addConnectionServiceAdapter %s", adapter); mServiceInterface.addConnectionServiceAdapter(adapter, Log.getExternalSession()); } catch (RemoteException e) { } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addConnectionServiceAdapter 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
addConnectionServiceAdapter
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public List<RecordingMetadata> getRecordingsMetadata(List<String> recordIDs, List<String> states) { List<RecordingMetadata> recs = new ArrayList<>(); Map<String, List<File>> allDirectories = getAllDirectories(states); if (recordIDs.isEmpty()) { for (Map.Entry<String, List<File>> entry : allDirectories.entrySet()) { recordIDs.addAll(getAllRecordingIds(entry.getValue())); } } for (String recordID : recordIDs) { for (Map.Entry<String, List<File>> entry : allDirectories.entrySet()) { List<File> _recs = getRecordingsForPath(recordID, entry.getValue()); for (File _rec : _recs) { RecordingMetadata r = getRecordingMetadata(_rec); if (r != null) { recs.add(r); } } } } return recs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRecordingsMetadata File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java Repository: bigbluebutton The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-12443
HIGH
7.5
bigbluebutton
getRecordingsMetadata
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
b21ca8355a57286a1e6df96984b3a4c57679a463
0
Analyze the following code function for security vulnerabilities
public String dialog(int segment, String attributes) { if (segment == HTML_START) { StringBuffer html = new StringBuffer(512); if (useNewStyle()) { html.append(dialogTitle()); } html.append("<table class=\"dialog\" cellpadding=\"0\" cellspacing=\"0\""); if (attributes != null) { html.append(" "); html.append(attributes); } html.append("><tr><td>\n<table class=\"dialogbox\" cellpadding=\"0\" cellspacing=\"0\">\n"); html.append("<tr><td>\n"); if (useNewStyle() && getToolManager().hasToolPathForUrl(getJsp().getRequestContext().getUri())) { html.append(getAdminTool().groupHtml(this)); } return html.toString(); } else { return "</td></tr></table>\n</td></tr></table>\n<p>&nbsp;</p>\n"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dialog 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
dialog
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@Override protected void onPause() { if (mOperationsServiceBinder != null) { mOperationsServiceBinder.removeOperationListener(this); } super.onPause(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPause File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-248" ]
CVE-2021-32694
MEDIUM
4.3
nextcloud/android
onPause
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
9343bdd85d70625a90e0c952897957a102c2421b
0
Analyze the following code function for security vulnerabilities
private void simulatePreferenceClick(Preference preference) { // Go through settings until we find our setting // and then simulate a click on it to bring up the dialog final ListAdapter adapter = getPreferenceScreen().getRootAdapter(); for (int idx = 0; idx < adapter.getCount(); idx++) { if (adapter.getItem(idx) == preference) { getPreferenceScreen().onItemClick(this.getListView(), null, idx, adapter.getItemId(idx)); break; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: simulatePreferenceClick File: src/com/android/phone/settings/VoicemailSettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
simulatePreferenceClick
src/com/android/phone/settings/VoicemailSettingsActivity.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
@Override public void putAll(Map<? extends DocumentReference, ? extends List<BaseObject>> m) { m.forEach(this::put); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putAll 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
putAll
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
public int getDeferIndexingForCodesystemsOfSize() { return myDeferIndexingForCodesystemsOfSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeferIndexingForCodesystemsOfSize 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
getDeferIndexingForCodesystemsOfSize
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
protected void handleSpringAware() { BeanDefinitionBuilder managedContextBeanBuilder = createBeanBuilder(SpringManagedContext.class); configBuilder.addPropertyValue("managedContext", managedContextBeanBuilder.getBeanDefinition()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleSpringAware File: hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
handleSpringAware
hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
protected String[] getLockIdFromIfHeader( RequestContext requestContext ) { HttpServletRequest req = requestContext.getHttpServletRequest(); String[] ids = new String[2]; String id = req.getHeader("If"); if (id != null && !id.equals("")) { if (id.indexOf(">)") == id.lastIndexOf(">)")) { id = id.substring(id.indexOf("(<"), id.indexOf(">)")); if (id.indexOf("locktoken:") != -1) { id = id.substring(id.indexOf(':') + 1); } ids[0] = id; } else { String firstId = id.substring(id.indexOf("(<"), id.indexOf(">)")); if (firstId.indexOf("locktoken:") != -1) { firstId = firstId.substring(firstId.indexOf(':') + 1); } ids[0] = firstId; String secondId = id.substring(id.lastIndexOf("(<"), id .lastIndexOf(">)")); if (secondId.indexOf("locktoken:") != -1) { secondId = secondId.substring(secondId.indexOf(':') + 1); } ids[1] = secondId; } } else { ids = null; } return ids; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockIdFromIfHeader File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java Repository: opencrx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-46502
CRITICAL
9.8
opencrx
getLockIdFromIfHeader
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
ce7a71db0bb34ecbcb0e822d40598e410a48b399
0
Analyze the following code function for security vulnerabilities
@NonNull public static ActivityOptions makeLaunchIntoPip( @NonNull PictureInPictureParams pictureInPictureParams) { final ActivityOptions opts = new ActivityOptions(); opts.mLaunchIntoPipParams = new PictureInPictureParams.Builder(pictureInPictureParams) .setIsLaunchIntoPip(true) .build(); opts.mLaunchBounds = new Rect(pictureInPictureParams.getSourceRectHint()); return opts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeLaunchIntoPip File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
makeLaunchIntoPip
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public boolean onTabPressed(boolean repeated) { if (conversation == null || conversation.getMode() == Conversation.MODE_SINGLE) { return false; } if (repeated) { completionIndex++; } else { lastCompletionLength = 0; completionIndex = 0; final String content = this.binding.textinput.getText().toString(); lastCompletionCursor = this.binding.textinput.getSelectionEnd(); int start = lastCompletionCursor > 0 ? content.lastIndexOf(" ", lastCompletionCursor - 1) + 1 : 0; firstWord = start == 0; incomplete = content.substring(start, lastCompletionCursor); } List<String> completions = new ArrayList<>(); for (MucOptions.User user : conversation.getMucOptions().getUsers()) { String name = user.getName(); if (name != null && name.startsWith(incomplete)) { completions.add(name + (firstWord ? ": " : " ")); } } Collections.sort(completions); if (completions.size() > completionIndex) { String completion = completions.get(completionIndex).substring(incomplete.length()); this.binding.textinput.getEditableText().delete(lastCompletionCursor, lastCompletionCursor + lastCompletionLength); this.binding.textinput.getEditableText().insert(lastCompletionCursor, completion); lastCompletionLength = completion.length(); } else { completionIndex = -1; this.binding.textinput.getEditableText().delete(lastCompletionCursor, lastCompletionCursor + lastCompletionLength); lastCompletionLength = 0; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTabPressed 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
onTabPressed
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public void reportSeparateProfileChallengeChanged(@UserIdInt int userId) { mInjector.binderWithCleanCallingIdentity(() -> { synchronized (getLockObject()) { updateMaximumTimeToLockLocked(userId); updatePasswordQualityCacheForUserGroup(userId); } }); DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SEPARATE_PROFILE_CHALLENGE_CHANGED) .setBoolean(isSeparateProfileChallengeEnabled(userId)) .write(); invalidateBinderCaches(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reportSeparateProfileChallengeChanged 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
reportSeparateProfileChallengeChanged
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting protected void setAccount(Account account) { if (account == null) { return; } if (!account.equals(mAccount)) { mAccount = account; mCachedSettings = mAccount.settings; appendSignature(); } if (mAccount != null) { MailActivity.setNfcMessage(mAccount.getEmailAddress()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAccount File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
setAccount
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
void populateExternalColumns(Map<String, Method> externalColumnSettters, Object o, JsonObject row) { for (Map.Entry<String, Method> entry : externalColumnSettters.entrySet()) { String columnName = entry.getKey(); Method method = entry.getValue(); try { Object value = row.getValue(columnName); if (value instanceof JsonArray) { method.invoke(o, Json.decodeValue(((JsonArray) value).encode(), method.getParameterTypes()[0])); } else { method.invoke(o, value); } } catch (Exception e) { log.warn("Unable to populate field " + columnName + " for object of type " + o.getClass().getName()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: populateExternalColumns 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
populateExternalColumns
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void refresh(boolean notifyConversationRead) { synchronized (this.messageList) { if (this.conversation != null) { conversation.populateWithMessages(this.messageList); updateSnackBar(conversation); updateStatusMessages(); if (conversation.getReceivedMessagesCountSinceUuid(lastMessageUuid) != 0) { binding.unreadCountCustomView.setVisibility(View.VISIBLE); binding.unreadCountCustomView.setUnreadCount(conversation.getReceivedMessagesCountSinceUuid(lastMessageUuid)); } this.messageListAdapter.notifyDataSetChanged(); updateChatMsgHint(); if (notifyConversationRead && activity != null) { binding.messagesView.post(this::fireReadEvent); } updateSendButton(); updateEditablity(); activity.invalidateOptionsMenu(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: refresh 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
refresh
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
private static String computeTableForSetting(Uri uri, String name) { String table = getValidTableOrThrow(uri); if (name != null) { if (sSystemMovedToSecureSettings.contains(name)) { table = TABLE_SECURE; } if (sSystemMovedToGlobalSettings.contains(name)) { table = TABLE_GLOBAL; } if (sSecureMovedToGlobalSettings.contains(name)) { table = TABLE_GLOBAL; } if (sGlobalMovedToSecureSettings.contains(name)) { table = TABLE_SECURE; } if (sGlobalMovedToSystemSettings.contains(name)) { table = TABLE_SYSTEM; } } return table; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computeTableForSetting 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
computeTableForSetting
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
@Override public String getFieldName() throws TreeReaderException { try { return parser.getLocalName(); } catch (IllegalStateException e) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFieldName File: main/src/com/google/refine/importers/XmlImporter.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20157
MEDIUM
5
OpenRefine
getFieldName
main/src/com/google/refine/importers/XmlImporter.java
6a0d7d56e4ffb420316ce7849fde881344fbf881
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = MANAGE_DEVICE_POLICY_WIFI, conditional = true) public boolean hasLockdownAdminConfiguredNetworks(@Nullable ComponentName admin) { throwIfParentInstance("hasLockdownAdminConfiguredNetworks"); if (mService != null) { try { return mService.hasLockdownAdminConfiguredNetworks(admin); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasLockdownAdminConfiguredNetworks File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
hasLockdownAdminConfiguredNetworks
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public IWindowSession openSession(IWindowSessionCallback callback, IInputMethodClient client, IInputContext inputContext) { if (client == null) throw new IllegalArgumentException("null client"); if (inputContext == null) throw new IllegalArgumentException("null inputContext"); Session session = new Session(this, callback, client, inputContext); return session; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openSession File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
openSession
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private static void printHeadingRow(int dateColWidth, int versionColWidth, int nameColWidth, int descColWidth, int minDescColWidth, int authorsColWidth) { printInCLI("|NAME", nameColWidth); if (descColWidth >= minDescColWidth) { printInCLI("DESCRIPTION", descColWidth - authorsColWidth); printInCLI("AUTHOR", authorsColWidth); } else { printInCLI("DESCRIPTION", descColWidth); } printInCLI("DATE", dateColWidth); printInCLI("VERSION", versionColWidth); outStream.println(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: printHeadingRow File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java Repository: ballerina-platform/ballerina-lang The code follows secure coding practices.
[ "CWE-306" ]
CVE-2021-32700
MEDIUM
5.8
ballerina-platform/ballerina-lang
printHeadingRow
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
4609ffee1744ecd16aac09303b1783bf0a525816
0
Analyze the following code function for security vulnerabilities
public void appendCommonAnnotations(StringBuffer buffer, int index) { if (description != null) { buffer.append(" @Editable(name=\"" + escape(name) + "\", description=\"" + escape(description) + "\", order=" + index + ")\n"); } else { buffer.append(" @Editable(name=\"" + escape(name) + "\", order=" + index + ")\n"); } if (showCondition != null) buffer.append(" @ShowCondition(\"isInput" + index + "Visible\")\n"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendCommonAnnotations File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-94" ]
CVE-2021-21248
MEDIUM
6.5
theonedev/onedev
appendCommonAnnotations
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
39d95ab8122c5d9ed18e69dc024870cae08d2d60
0
Analyze the following code function for security vulnerabilities
public void clearNotificationEffects() { mStatusBar.clearNotificationEffects(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearNotificationEffects 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
clearNotificationEffects
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // File.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return File.createTempFile(prefix, suffix); else return File.createTempFile(prefix, suffix, new File(tempFolderPath)); }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2021-21430 - Severity: LOW - CVSS Score: 2.1 Description: use Files.createTempFile Function: prepareDownloadFile File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator Fixed Code: public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); }
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
prepareDownloadFile
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
1
Analyze the following code function for security vulnerabilities
void clearWillReplaceWindow() { mWillReplaceWindow = false; mReplacementWindow = null; mAnimateReplacingWindow = false; for (int i = mChildren.size() - 1; i >= 0; i--) { final WindowState c = mChildren.get(i); c.clearWillReplaceWindow(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearWillReplaceWindow 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
clearWillReplaceWindow
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public Object get(String key) throws JSONException { if (key == null) { throw new JSONException("Null key."); } Object object = this.opt(key); if (object == null) { throw new JSONException("JSONObject[" + quote(key) + "] not found."); } return object; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
get
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
boolean checkAppInLaunchingProvidersLocked(ProcessRecord app) { for (int i = mLaunchingProviders.size() - 1; i >= 0; i--) { ContentProviderRecord cpr = mLaunchingProviders.get(i); if (cpr.launchingApp == app) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkAppInLaunchingProvidersLocked 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
checkAppInLaunchingProvidersLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting public void onTrackedByNonUiService(Call activeCall, boolean isTracked) { final String callId = mCallIdMapper.getCallId(activeCall); if (callId != null && isServiceValid("onTrackedByNonUiService")) { try { logOutgoing("onTrackedByNonUiService %s", isTracked); mServiceInterface.onTrackedByNonUiService(callId, isTracked, Log.getExternalSession(TELECOM_ABBREVIATION)); } catch (RemoteException e) { } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTrackedByNonUiService 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
onTrackedByNonUiService
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@SystemApi @RequiresPermission(INTERACT_ACROSS_USERS_FULL) public boolean packageHasActiveAdmins(String packageName) { return packageHasActiveAdmins(packageName, myUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: packageHasActiveAdmins File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
packageHasActiveAdmins
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private static Element getPolicy(String href, URL baseUrl) throws PolicyException { try { InputSource source = null; // Can't resolve public id, but might be able to resolve relative // system id, since we have a base URI. if (href != null && baseUrl != null) { URL url; try { url = new URL(baseUrl, href); source = new InputSource(url.openStream()); source.setSystemId(href); } catch (MalformedURLException except) { try { String absURL = URIUtils.resolveAsString(href, baseUrl.toString()); url = new URL(absURL); source = new InputSource(url.openStream()); source.setSystemId(href); } catch (MalformedURLException ex2) { // nothing to do } } catch (java.io.FileNotFoundException fnfe) { try { String absURL = URIUtils.resolveAsString(href, baseUrl.toString()); url = new URL(absURL); source = new InputSource(url.openStream()); source.setSystemId(href); } catch (MalformedURLException ex2) { // nothing to do } } } DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); /** * Disable external entities, etc. */ dbf.setFeature(EXTERNAL_GENERAL_ENTITIES, false); dbf.setFeature(EXTERNAL_PARAM_ENTITIES, false); dbf.setFeature(DISALLOW_DOCTYPE_DECL, true); dbf.setFeature(LOAD_EXTERNAL_DTD, false); DocumentBuilder db = dbf.newDocumentBuilder(); Document dom; /** * Load and parse the file. */ if (source != null) { dom = db.parse(source); /** * Get the policy information out of it! */ return dom.getDocumentElement(); } return null; } catch (SAXException e) { throw new PolicyException(e); } catch (ParserConfigurationException e) { throw new PolicyException(e); } catch (IOException e) { throw new PolicyException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPolicy File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
getPolicy
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
@Override @CacheEvict(value= {CacheConstant.SYS_USERS_CACHE}, key="#username") public void updateUserDepart(String username,String orgCode) { baseMapper.updateUserDepart(username, orgCode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUserDepart File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
updateUserDepart
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
protected PostMethod executePost(String uri, InputStream content, String mediaType, boolean release, int... expectedCodes) throws Exception { return assertStatusCodes(executePost(uri, content, mediaType), false, expectedCodes); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executePost File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
executePost
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private static List<Archive> getConvertedArchives(String suffix, String baseUrl, Map<String, Long> archiveMap) { List<Archive> archives = new ArrayList<>(); for (Map.Entry<String, Long> entry : archiveMap.entrySet()) { Archive archive = new Archive(); archive.setCount(entry.getValue()); archive.setText(entry.getKey()); String tagUri = baseUrl + Constants.getArticleUri() + "record/" + entry.getKey() + suffix; archive.setUrl(tagUri); archives.add(archive); } return archives; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConvertedArchives File: web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
getConvertedArchives
web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
@Override public String getAttributeValue(int index){ return parser.getAttributeValue(index); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttributeValue File: main/src/com/google/refine/importers/XmlImporter.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20157
MEDIUM
5
OpenRefine
getAttributeValue
main/src/com/google/refine/importers/XmlImporter.java
6a0d7d56e4ffb420316ce7849fde881344fbf881
0
Analyze the following code function for security vulnerabilities
private static RMQMessage convertAmqpMessage(RMQSession session, RMQDestination dest, GetResponse response, ReceivingContextConsumer receivingContextConsumer) throws JMSException { try { BasicProperties props = response.getProps(); RMQMessage message = RMQMessage.isAmqpTextMessage(props.getHeaders()) ? new RMQTextMessage() : new RMQBytesMessage(); message = RMQMessage.fromAmqpMessage(response.getBody(), message); // Deserialize the message payload from the byte[] body message.setSession(session); // Insert session in received message for Message.acknowledge message.setJMSRedelivered(response.getEnvelope().isRedeliver()); // Set the redelivered flag message.setRabbitDeliveryTag(response.getEnvelope().getDeliveryTag()); // Insert delivery tag in received message for Message.acknowledge message.setJMSDestination(dest); // We cannot know the original destination, so set local one message.setJMSPropertiesFromAmqpProperties(props); message.setReadonly(true); // Set readOnly - mandatory for received messages maybeSetupDirectReplyTo(message, response.getProps().getReplyTo()); receivingContextConsumer.accept(new ReceivingContext(message)); return message; } catch (IOException x) { throw new RMQJMSException(x); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertAmqpMessage 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
convertAmqpMessage
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Override public TaskSnapshot takeTaskSnapshot(int taskId) { mAmInternal.enforceCallingPermission(READ_FRAME_BUFFER, "takeTaskSnapshot()"); final long ident = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { final Task task = mRootWindowContainer.anyTaskForId(taskId, MATCH_ATTACHED_TASK_OR_RECENT_TASKS); if (task == null || !task.isVisible()) { Slog.w(TAG, "takeTaskSnapshot: taskId=" + taskId + " not found or not visible"); return null; } return mWindowManager.mTaskSnapshotController.captureTaskSnapshot( task, false /* snapshotHome */); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: takeTaskSnapshot 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
takeTaskSnapshot
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public @PersonalAppsSuspensionReason int getPersonalAppsSuspendedReasons( @NonNull ComponentName admin) { throwIfParentInstance("getPersonalAppsSuspendedReasons"); if (mService != null) { try { return mService.getPersonalAppsSuspendedReasons(admin); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPersonalAppsSuspendedReasons File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getPersonalAppsSuspendedReasons
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public WindowList getWindowListLocked(final int displayId) { final DisplayContent displayContent = getDisplayContentLocked(displayId); return displayContent != null ? displayContent.getWindowList() : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWindowListLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
getWindowListLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private SecurityDesc consultResult(URL codebaseHost){ if (!runInSandbox && classLoader.getSigning()) { return classLoader.file.getSecurity(); } else { return new SecurityDesc(classLoader.file, AppletPermissionLevel.NONE, SecurityDesc.SANDBOX_PERMISSIONS, codebaseHost); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: consultResult File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
consultResult
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Override public OnGoingComparableCondition<Integer> size() { selector = new SizeSelector(selector); return (OnGoingComparableCondition<Integer>) this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: size File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java Repository: xjodoin/torpedoquery The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2019-11343
HIGH
7.5
xjodoin/torpedoquery
size
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
3c20b874fba9cc2a78b9ace10208de1602b56c3f
0
Analyze the following code function for security vulnerabilities
private void readBoolean(XmlPullParser parser, Bundle restrictions, String restrictionKey) { String value = parser.getAttributeValue(null, restrictionKey); if (value != null) { restrictions.putBoolean(restrictionKey, Boolean.parseBoolean(value)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readBoolean 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
readBoolean
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
private String getCurrentEncoding() { if (this.explicitEncoding != null) { return this.explicitEncoding; } else if (this.implicitEncoding != null) { return this.implicitEncoding; } else if ((this.req != null) && (this.req.getCharacterEncoding() != null)) { try { "0".getBytes(this.req.getCharacterEncoding()); return this.req.getCharacterEncoding(); } catch (UnsupportedEncodingException err) { return null; } } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentEncoding 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
getCurrentEncoding
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
void setSaturation(@Size(9) float[] matrix, @Size(3) float[] translation) { System.arraycopy(matrix, 0, mMatrix, 0, mMatrix.length); System.arraycopy(translation, 0, mTranslation, 0, mTranslation.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSaturation 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
setSaturation
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void playSound(int sound) { synchronized (this) { if (mSoundPool == null) { Log.w(TAG, "Not playing sound when NFC is disabled"); return; } switch (sound) { case SOUND_START: mSoundPool.play(mStartSound, 1.0f, 1.0f, 0, 0, 1.0f); break; case SOUND_END: mSoundPool.play(mEndSound, 1.0f, 1.0f, 0, 0, 1.0f); break; case SOUND_ERROR: mSoundPool.play(mErrorSound, 1.0f, 1.0f, 0, 0, 1.0f); break; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: playSound File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
playSound
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
static String getFontName(PdfDictionary dic) { if (dic == null) return null; PdfObject type = getPdfObjectRelease(dic.get(PdfName.BASEFONT)); if (type == null || !type.isName()) return null; return PdfName.decodeName(type.toString()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFontName File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
getFontName
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override protected Integer exec() throws Exception { final JSONArray data = (JSONArray) RBStore.fetchClassification(fileUrl); this.setTotal(data.size()); for (Object o : data) { addNItem((JSONObject) o, null, LEVEL_BEGIN); this.addCompleted(); } return getSucceeded(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: exec File: src/main/java/com/rebuild/core/rbstore/ClassificationImporter.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
exec
src/main/java/com/rebuild/core/rbstore/ClassificationImporter.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ModuleUtils.getInstance().selectModule(request, getServletContext()); ModuleConfig config = getModuleConfig(request); RequestProcessor processor = getProcessorForModule(config); if (processor == null) { processor = getRequestProcessor(config); } processor.process(request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: process File: src/share/org/apache/struts/action/ActionServlet.java Repository: kawasima/struts1-forever The code follows secure coding practices.
[ "CWE-Other", "CWE-20" ]
CVE-2016-1181
MEDIUM
6.8
kawasima/struts1-forever
process
src/share/org/apache/struts/action/ActionServlet.java
eda3a79907ed8fcb0387a0496d0cb14332f250e8
0
Analyze the following code function for security vulnerabilities
public ApiClient setOauthPasswordFlow(String username, String password) { for (Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).usePasswordFlow(username, password); return this; } } throw new RuntimeException("No OAuth2 authentication configured!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOauthPasswordFlow File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setOauthPasswordFlow
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public AsyncHttpClientConfigBean setAllowSslConnectionPool(boolean allowSslConnectionPool) { this.allowSslConnectionPool = allowSslConnectionPool; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAllowSslConnectionPool File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setAllowSslConnectionPool
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
@Override public boolean supportsInlineMode() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: supportsInlineMode File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-26471
HIGH
8.8
xwiki/xwiki-platform
supportsInlineMode
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java
00532d9f1404287cf3ec3a05056640d809516006
0
Analyze the following code function for security vulnerabilities
final ProcessRecord addAppLocked(ApplicationInfo info, String customProcess, boolean isolated, boolean disableHiddenApiChecks, String abiOverride) { ProcessRecord app; if (!isolated) { app = getProcessRecordLocked(customProcess != null ? customProcess : info.processName, info.uid, true); } else { app = null; } if (app == null) { app = newProcessRecordLocked(info, customProcess, isolated, 0); updateLruProcessLocked(app, false, null); updateOomAdjLocked(); } // This package really, really can not be stopped. try { AppGlobals.getPackageManager().setPackageStoppedState( info.packageName, false, UserHandle.getUserId(app.uid)); } catch (RemoteException e) { } catch (IllegalArgumentException e) { Slog.w(TAG, "Failed trying to unstop package " + info.packageName + ": " + e); } if ((info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) { app.persistent = true; app.maxAdj = ProcessList.PERSISTENT_PROC_ADJ; } if (app.thread == null && mPersistentStartingProcesses.indexOf(app) < 0) { mPersistentStartingProcesses.add(app); startProcessLocked(app, "added application", customProcess != null ? customProcess : app.processName, disableHiddenApiChecks, abiOverride); } return app; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAppLocked 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
addAppLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public static int checkPermission(@Nullable String permission, int pid, int uid) { return sPermissionCache.query(new PermissionQuery(permission, pid, uid)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPermission File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
checkPermission
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
public String[] getRecentRevisions(int nb) throws XWikiException { return this.doc.getRecentRevisions(nb, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRecentRevisions File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getRecentRevisions
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "14.0RC1") public void setAuthorReference(DocumentReference authorReference) { if (authorReference == null) { this.authors.setEffectiveMetadataAuthor(GuestUserReference.INSTANCE); } else { if (authorReference.getName().equals(XWikiRightService.GUEST_USER)) { LOGGER.warn("A reference to XWikiGuest user has been set instead of null. This is probably a mistake.", new Exception("See stack trace")); } UserReference user = this.getUserReferenceDocumentReferenceResolver().resolve(authorReference); this.authors.setEffectiveMetadataAuthor(user); // We also set the original metadata author for backward compatibility. this.authors.setOriginalMetadataAuthor(user); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAuthorReference 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
setAuthorReference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0