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 List<String> getHtmlFormWarnings() { return htmlFormWarnings; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHtmlFormWarnings File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormValidator.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-24621
MEDIUM
6.5
openmrs/openmrs-module-htmlformentry
getHtmlFormWarnings
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormValidator.java
458597984050461f1c88e4e3a403bf2b060f0844
0
Analyze the following code function for security vulnerabilities
@GuardedBy({"mPm.mInstallLock", "mPm.mLock"}) private ScanResult scanPackageNewLI(@NonNull ParsedPackage parsedPackage, final @ParsingPackageUtils.ParseFlags int parseFlags, @PackageManagerService.ScanFlags int scanFlags, long currentTime, @Nullable UserHandle user, String cpuAbiOverride) throws PackageManagerException { final ScanRequest initialScanRequest = prepareInitialScanRequest(parsedPackage, parseFlags, scanFlags, user, cpuAbiOverride); final PackageSetting installedPkgSetting = initialScanRequest.mPkgSetting; final PackageSetting disabledPkgSetting = initialScanRequest.mDisabledPkgSetting; boolean isUpdatedSystemApp; if (installedPkgSetting != null) { isUpdatedSystemApp = installedPkgSetting.getPkgState().isUpdatedSystemApp(); } else { isUpdatedSystemApp = disabledPkgSetting != null; } final int newScanFlags = adjustScanFlags(scanFlags, installedPkgSetting, disabledPkgSetting, user, parsedPackage); ScanPackageUtils.applyPolicy(parsedPackage, newScanFlags, mPm.getPlatformPackage(), isUpdatedSystemApp); synchronized (mPm.mLock) { assertPackageIsValid(parsedPackage, parseFlags, newScanFlags); final ScanRequest request = new ScanRequest(parsedPackage, initialScanRequest.mOldSharedUserSetting, initialScanRequest.mOldPkg, installedPkgSetting, initialScanRequest.mSharedUserSetting, disabledPkgSetting, initialScanRequest.mOriginalPkgSetting, initialScanRequest.mRealPkgName, parseFlags, scanFlags, initialScanRequest.mIsPlatformPackage, user, cpuAbiOverride); return ScanPackageUtils.scanPackageOnlyLI(request, mPm.mInjector, mPm.mFactoryTest, currentTime); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: scanPackageNewLI File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
scanPackageNewLI
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
private void startCapture() { if (captureBuffer==null) captureBuffer=new StringBuilder(); capture=true; captureBuffer.append((char)current); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startCapture File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
startCapture
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
0
Analyze the following code function for security vulnerabilities
private void receivedSignalingMessages(@Nullable List<Signaling> signalingList) { if (signalingList != null) { for (Signaling signaling : signalingList) { try { receivedSignalingMessage(signaling); } catch (IOException e) { Log.e(TAG, "Failed to process received signaling message", e); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: receivedSignalingMessages File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
receivedSignalingMessages
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private CallerIdentity getCallerIdentity(@Nullable String callerPackage) { return getCallerIdentity(null, callerPackage); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCallerIdentity 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
getCallerIdentity
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void beginTransactionNonExclusive() { beginTransaction(null /* transactionStatusCallback */, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginTransactionNonExclusive File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
beginTransactionNonExclusive
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
private static boolean isCompatible(DurationConfig c1, DurationConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getDurationAmount(), c2.getDurationAmount()) && nullSafeEqual(c1.getTimeUnit(), c2.getTimeUnit()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCompatible File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
isCompatible
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@CLIMethod(name="enable-job") @RequirePOST public HttpResponse doEnable() throws IOException, ServletException { checkPermission(CONFIGURE); makeDisabled(false); return new HttpRedirect("."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doEnable 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
doEnable
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
private String toJavaCipherSuite(String openSslCipherSuite) { if (openSslCipherSuite == null) { return null; } String prefix = toJavaCipherSuitePrefix(SSL.getVersion(ssl)); return CipherSuiteConverter.toJava(openSslCipherSuite, prefix); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toJavaCipherSuite 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
toJavaCipherSuite
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
@Override public void setStatus(int i) { this.response.setStatus(i); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStatus File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
setStatus
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
public List<SubTask> getSubTasks() { List<SubTask> r = new ArrayList<SubTask>(); r.add(this); for (SubTaskContributor euc : SubTaskContributor.all()) r.addAll(euc.forProject(this)); for (JobProperty<? super P> p : properties) r.addAll(p.getSubTasks()); return r; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSubTasks 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
getSubTasks
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
@TestApi public boolean isFactoryResetProtectionPolicySupported() { try { return mService.isFactoryResetProtectionPolicySupported(); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFactoryResetProtectionPolicySupported 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
isFactoryResetProtectionPolicySupported
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void onHelp() { final PrintWriter pw = getOutPrintWriter(); pw.println("Usage: cmd shortcut COMMAND [options ...]"); pw.println(); pw.println("cmd shortcut reset-throttling [--user USER_ID]"); pw.println(" Reset throttling for all packages and users"); pw.println(); pw.println("cmd shortcut reset-all-throttling"); pw.println(" Reset the throttling state for all users"); pw.println(); pw.println("cmd shortcut override-config CONFIG"); pw.println(" Override the configuration for testing (will last until reboot)"); pw.println(); pw.println("cmd shortcut reset-config"); pw.println(" Reset the configuration set with \"update-config\""); pw.println(); pw.println("[Deprecated] cmd shortcut get-default-launcher [--user USER_ID]"); pw.println(" Show the default launcher"); pw.println(" Note: This command is deprecated. Callers should query the default" + " launcher from RoleManager instead."); pw.println(); pw.println("cmd shortcut unload-user [--user USER_ID]"); pw.println(" Unload a user from the memory"); pw.println(" (This should not affect any observable behavior)"); pw.println(); pw.println("cmd shortcut clear-shortcuts [--user USER_ID] PACKAGE"); pw.println(" Remove all shortcuts from a package, including pinned shortcuts"); pw.println(); pw.println("cmd shortcut get-shortcuts [--user USER_ID] [--flags FLAGS] PACKAGE"); pw.println(" Show the shortcuts for a package that match the given flags"); pw.println(); pw.println("cmd shortcut has-shortcut-access [--user USER_ID] PACKAGE"); pw.println(" Prints \"true\" if the package can access shortcuts," + " \"false\" otherwise"); pw.println(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onHelp 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
onHelp
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public void mergeMessage( CodedInputStream input, ExtensionRegistryLite extensionRegistry, Descriptors.FieldDescriptor field, Message defaultInstance) throws IOException { if (!field.isRepeated()) { if (hasField(field)) { input.readMessage(builder.getFieldBuilder(field), extensionRegistry); return; } Message.Builder subBuilder = newMessageFieldInstance(field, defaultInstance); input.readMessage(subBuilder, extensionRegistry); Object unused = setField(field, subBuilder.buildPartial()); } else { Message.Builder subBuilder = newMessageFieldInstance(field, defaultInstance); input.readMessage(subBuilder, extensionRegistry); Object unused = addRepeatedField(field, subBuilder.buildPartial()); } }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2022-3509 - Severity: HIGH - CVSS Score: 7.5 Description: Clean up TextFormat parser (#10673) * Fix TextFormat parser Function: mergeMessage File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf Fixed Code: @Override public void mergeMessage( CodedInputStream input, ExtensionRegistryLite extensionRegistry, Descriptors.FieldDescriptor field, Message defaultInstance) throws IOException { if (!field.isRepeated()) { Message.Builder subBuilder; if (hasField(field)) { subBuilder = getFieldBuilder(field); if (subBuilder != null) { input.readMessage(subBuilder, extensionRegistry); return; } else { subBuilder = newMessageFieldInstance(field, defaultInstance); subBuilder.mergeFrom((Message) getField(field)); } } else { subBuilder = newMessageFieldInstance(field, defaultInstance); } input.readMessage(subBuilder, extensionRegistry); Object unused = setField(field, subBuilder.buildPartial()); } else { Message.Builder subBuilder = newMessageFieldInstance(field, defaultInstance); input.readMessage(subBuilder, extensionRegistry); Object unused = addRepeatedField(field, subBuilder.buildPartial()); } }
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
mergeMessage
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
1
Analyze the following code function for security vulnerabilities
public void setSubscriptionType(String subscriptionType) { mSubscriptionType = subscriptionType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSubscriptionType File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
setSubscriptionType
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public SecurityRoles filter(Set<String> keep) { final SecurityRoles retVal = new SecurityRoles(roles.size()); for (SecurityRole sr : roles) { if (keep.contains(sr.getName())) { retVal.addSecurityRole(sr); } } return retVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filter File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
filter
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0
Analyze the following code function for security vulnerabilities
public ViewPage createPageWithAttachment(String space, String page, String content, String title, String attachmentName, InputStream attachmentData, UsernamePasswordCredentials credentials) throws Exception { ViewPage vp = createPage(space, page, content, title); attachFile(space, page, attachmentName, attachmentData, false, credentials); return vp; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createPageWithAttachment 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
createPageWithAttachment
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 PeerConnectionWrapper getPeerConnectionWrapperForSessionIdAndType(String sessionId, String type) { for (int i = 0; i < peerConnectionWrapperList.size(); i++) { if (peerConnectionWrapperList.get(i).getSessionId().equals(sessionId) && peerConnectionWrapperList.get(i).getVideoStreamType().equals(type)) { return peerConnectionWrapperList.get(i); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPeerConnectionWrapperForSessionIdAndType File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
getPeerConnectionWrapperForSessionIdAndType
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
public int getNativeScrollXForTest() { return mRenderCoordinates.getScrollXPixInt(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNativeScrollXForTest 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
getNativeScrollXForTest
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public String getNotExprConditionSQL(Condition condition) { String conditionSQL = getConditionSQL(condition); return "NOT(" + conditionSQL + ")"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotExprConditionSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getNotExprConditionSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
private static byte[] init__puma_parser_single_lengths_0() { return new byte [] { 0, 2, 3, 4, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 4, 1, 4, 2, 1, 4, 4, 2, 6, 7, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0 }; }
Vulnerability Classification: - CWE: CWE-444 - CVE: CVE-2021-41136 - Severity: LOW - CVSS Score: 3.6 Description: Merge pull request from GHSA-48w2-rm65-62xx * Fix HTTP request smuggling vulnerability See GHSA-48w2-rm65-62xx or CVE-2021-41136 for more info. * 4.3.9 release note * 5.5.1 release note * 5.5.1 Function: init__puma_parser_single_lengths_0 File: ext/puma_http11/org/jruby/puma/Http11Parser.java Repository: puma Fixed Code: private static byte[] init__puma_parser_single_lengths_0() { return new byte [] { 0, 2, 3, 4, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 4, 1, 4, 3, 2, 4, 4, 2, 6, 7, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0 }; }
[ "CWE-444" ]
CVE-2021-41136
LOW
3.6
puma
init__puma_parser_single_lengths_0
ext/puma_http11/org/jruby/puma/Http11Parser.java
acdc3ae571dfae0e045cf09a295280127db65c7f
1
Analyze the following code function for security vulnerabilities
public static boolean appGetsFullBackup(PackageInfo pkg) { if (pkg.applicationInfo.backupAgentName != null) { // If it has an agent, it gets full backups only if it says so return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_FULL_BACKUP_ONLY) != 0; } // No agent or fullBackupOnly="true" means we do indeed perform full-data backups for it return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appGetsFullBackup 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
appGetsFullBackup
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public static String padLeft(String input, int size) { return (new PrintfFormat("%" + size + "s")).sprintf(input); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: padLeft File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
padLeft
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public void connectToBackend() { Intent intent = new Intent(this, XmppConnectionService.class); intent.setAction("ui"); startService(intent); bindService(intent, mConnection, Context.BIND_AUTO_CREATE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connectToBackend 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
connectToBackend
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public void startActivityForResult(Intent intent, int requestCode) { mEditUserInfoController.startingActivityForResult(); super.startActivityForResult(intent, requestCode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityForResult File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
startActivityForResult
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
void onImeWindowSetOnDisplayArea(final int pid, @NonNull final DisplayArea imeContainer) { if (pid == MY_PID || pid < 0) { ProtoLog.w(WM_DEBUG_CONFIGURATION, "Trying to update display configuration for system/invalid process."); return; } final WindowProcessController process = mProcessMap.getProcess(pid); if (process == null) { ProtoLog.w(WM_DEBUG_CONFIGURATION, "Trying to update display " + "configuration for invalid process, pid=%d", pid); return; } process.registerDisplayAreaConfigurationListener(imeContainer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onImeWindowSetOnDisplayArea 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
onImeWindowSetOnDisplayArea
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private List<VFSItem> getSanityCheckedSourceItems(VFSContainer target, UserRequest ureq) { // collect all source files first List<VFSItem> sources = new ArrayList<>(); for (String sourceRelPath:fileSelection.getFiles()) { VFSItem vfsSource = folderComponent.getCurrentContainer().resolve(sourceRelPath); if (vfsSource == null) { abortFailed(ureq, "FileDoesNotExist"); return null; } if (vfsSource instanceof VFSContainer) { // if a folder... check if they are overlapping if (VFSManager.isContainerDescendantOrSelf(target, (VFSContainer)vfsSource)) { abortFailed(ureq, "OverlappingTarget"); return null; } } if (vfsLockManager.isLockedForMe(vfsSource, ureq.getIdentity(), VFSLockApplicationType.vfs, null)) { abortFailed(ureq, "lock.title"); return null; } // check for existence... this will also prevent to copy item over itself VFSItem item = target.resolve(vfsSource.getName()); if (item != null) { abortFailed(ureq, "TargetNameAlreadyUsed"); return null; } if (vfsSource.canCopy() != VFSConstants.YES) { getWindowControl().setError(translator.translate("FileMoveCopyFailed", new String[] {vfsSource.getName()})); status = FolderCommandStatus.STATUS_FAILED; fireEvent(ureq, FOLDERCOMMAND_FINISHED); return null; } sources.add(vfsSource); } return sources; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSanityCheckedSourceItems File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
getSanityCheckedSourceItems
src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
private void parseRelationInitialize(final List<Element> relations) throws GameParseException { if (relations.size() > 0) { final RelationshipTracker tracker = data.getRelationshipTracker(); for (final Element current : relations) { final PlayerId p1 = getPlayerId(current, "player1", true); final PlayerId p2 = getPlayerId(current, "player2", true); final RelationshipType r = getRelationshipType(current, "type", true); final int roundValue = Integer.valueOf(current.getAttribute("roundValue")); tracker.setRelationship(p1, p2, r, roundValue); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseRelationInitialize File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
parseRelationInitialize
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
private static Object mapColumnValue( Connection conn, String dbObject, String columnName, Object columnValue, List<String> valuePatterns, List<String> valueReplacements ) throws ServiceException, SQLException { String databaseProductName = conn.getMetaData().getDatabaseProductName(); if(BOOLEAN_COLUMNS.contains(columnName.toUpperCase())) { if("PostgreSQL".equals(databaseProductName)) { return columnValue; } else if("MySQL".equals(databaseProductName)) { return columnValue; } else if("Microsoft SQL Server".equals(databaseProductName)) { return columnValue; } else if(databaseProductName.startsWith("DB2/")) { return Boolean.valueOf("Y".equals(columnValue)); } else if("HSQL Database Engine".equals(databaseProductName)) { return columnValue; } else if("Oracle".equals(databaseProductName)) { return Boolean.valueOf(((Number) columnValue).intValue() == 1); } else { throw new ServiceException(BasicException.Code.DEFAULT_DOMAIN, BasicException.Code.NOT_SUPPORTED, "Database not supported", new BasicException.Parameter("database product name", databaseProductName)); } } else { if(columnValue instanceof String) { String targetValue = (String)columnValue; for(int i = 0; i < valuePatterns.size(); i++) { String valuePattern = valuePatterns.get(i); String valueReplacment = valueReplacements.get(i); if(valuePattern != null & valuePattern.length() > 0) { targetValue = targetValue.replaceAll(valuePattern, valueReplacment); } } return targetValue; } else { return columnValue; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mapColumnValue File: core/src/main/java/org/opencrx/kernel/tools/CopyDb.java Repository: opencrx The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-25959
MEDIUM
4.3
opencrx
mapColumnValue
core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
14e75f95e5f56fbe7ee897bdf5d858788072e818
0
Analyze the following code function for security vulnerabilities
@Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { UserFactory.init(); } catch (Throwable e) { throw new ServletException("AddNewUserServlet: Error initialising user factory." + e); } UserManager userFactory = UserFactory.getInstance(); String userID = request.getParameter("userID"); String password = request.getParameter("pass1"); boolean hasUser = false; try { hasUser = userFactory.hasUser(userID); } catch (Throwable e) { throw new ServletException("can't determine if user " + userID + " already exists in users.xml.", e); } if (hasUser) { RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher("/admin/userGroupView/users/newUser.jsp?action=redo"); dispatcher.forward(request, response); } else { final Password pass = new Password(); pass.setEncryptedPassword(UserFactory.getInstance().encryptedPassword(password, true)); pass.setSalt(true); final User newUser = new User(); newUser.setUserId(userID); newUser.setPassword(pass); final HttpSession userSession = request.getSession(false); userSession.setAttribute("user.modifyUser.jsp", newUser); // forward the request for proper display RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher("/admin/userGroupView/users/modifyUser.jsp"); dispatcher.forward(request, response); } }
Vulnerability Classification: - CWE: CWE-352, CWE-79 - CVE: CVE-2021-25929 - Severity: LOW - CVSS Score: 3.5 Description: NMS-13231: Backport Security Issues from Last Month Function: doPost File: opennms-webapp/src/main/java/org/opennms/web/admin/users/AddNewUserServlet.java Repository: OpenNMS/opennms Fixed Code: @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { UserFactory.init(); } catch (Throwable e) { throw new ServletException("AddNewUserServlet: Error initialising user factory." + e); } UserManager userFactory = UserFactory.getInstance(); String userID = request.getParameter("userID"); if (userID != null && userID.matches(".*[&<>\"`']+.*")) { throw new ServletException("User ID must not contain any HTML markup."); } String password = request.getParameter("pass1"); boolean hasUser = false; try { hasUser = userFactory.hasUser(userID); } catch (Throwable e) { throw new ServletException("can't determine if user " + userID + " already exists in users.xml.", e); } if (hasUser) { RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher("/admin/userGroupView/users/newUser.jsp?action=redo"); dispatcher.forward(request, response); } else { final Password pass = new Password(); pass.setEncryptedPassword(UserFactory.getInstance().encryptedPassword(password, true)); pass.setSalt(true); final User newUser = new User(); newUser.setUserId(userID); newUser.setPassword(pass); final HttpSession userSession = request.getSession(false); userSession.setAttribute("user.modifyUser.jsp", newUser); // forward the request for proper display RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher("/admin/userGroupView/users/modifyUser.jsp"); dispatcher.forward(request, response); } }
[ "CWE-352", "CWE-79" ]
CVE-2021-25929
LOW
3.5
OpenNMS/opennms
doPost
opennms-webapp/src/main/java/org/opennms/web/admin/users/AddNewUserServlet.java
eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c
1
Analyze the following code function for security vulnerabilities
private void writeRow(Element container, T item, DesignContext context) { Element tableRow = container.appendElement("tr"); tableRow.attr("item", serializeDeclarativeRepresentation(item)); if (getSelectionModel().isSelected(item)) { tableRow.attr("selected", true); } for (Column<T, ?> column : getColumns()) { Object value = column.valueProvider.apply(item); tableRow.appendElement("td") .append(Optional.ofNullable(value).map(Object::toString) .map(DesignFormatter::encodeForTextNode) .orElse("")); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeRow File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
writeRow
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private void fixDuplicateExtras() { if (extras != null) { fixDuplicateExtra(mLargeIcon, EXTRA_LARGE_ICON); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fixDuplicateExtras File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
fixDuplicateExtras
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String getParentURL() throws XWikiException { return this.doc.getParentURL(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParentURL 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
getParentURL
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public int broadcastIntent(IApplicationThread caller, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle map, String[] requiredPermissions, int appOp, Bundle options, boolean serialized, boolean sticky, int userId) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastIntent File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
broadcastIntent
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public boolean shuttingDown(boolean booted, int timeout) { synchronized (mGlobalLock) { mShuttingDown = true; mRootWindowContainer.prepareForShutdown(); updateEventDispatchingLocked(booted); notifyTaskPersisterLocked(null, true); return mTaskSupervisor.shutdownLocked(timeout); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shuttingDown 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
shuttingDown
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public void onLockoutReset() { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onLockoutReset File: core/java/android/hardware/fingerprint/FingerprintManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
onLockoutReset
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsInt03() throws Exception { Duration value = READER.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS) .readValue("13498"); assertNotNull("The value should not be null.", value); assertEquals("The value is not correct.", Duration.ofSeconds(13498L, 0), value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationAsInt03 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsInt03
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
void preloadRecents() { // Preload only the raw task list into a new load plan (which will be consumed by the // RecentsActivity) RecentsTaskLoader loader = RecentsTaskLoader.getInstance(); sInstanceLoadPlan = loader.createLoadPlan(mContext); sInstanceLoadPlan.preloadRawTasks(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: preloadRecents File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0813
MEDIUM
6.6
android
preloadRecents
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
0
Analyze the following code function for security vulnerabilities
@Override public long getUserCreationTime(int userHandle) { int callingUserId = UserHandle.getCallingUserId(); UserInfo userInfo = null; synchronized (mPackagesLock) { if (callingUserId == userHandle) { userInfo = getUserInfoLocked(userHandle); } else { UserInfo parent = getProfileParentLocked(userHandle); if (parent != null && parent.id == callingUserId) { userInfo = getUserInfoLocked(userHandle); } } } if (userInfo == null) { throw new SecurityException("userHandle can only be the calling user or a managed " + "profile associated with this user"); } return userInfo.creationTime; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserCreationTime 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
getUserCreationTime
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
public boolean isCreator(DocumentReference username) { if (username == null) { return false; } return username.equals(getCreatorReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCreator 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
isCreator
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
public boolean copyDocument(String docname, String targetdocname) throws XWikiException { return this.copyDocument(docname, targetdocname, null, null, null, false, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-37911
MEDIUM
6.5
xwiki/xwiki-platform
copyDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
0
Analyze the following code function for security vulnerabilities
@Override public int getRequiredPasswordComplexity(boolean calledOnParent) { if (!mHasFeature) { return PASSWORD_COMPLEXITY_NONE; } final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); Preconditions.checkArgument(!calledOnParent || isProfileOwner(caller)); synchronized (getLockObject()) { final ActiveAdmin requiredAdmin = getParentOfAdminIfRequired( getDeviceOrProfileOwnerAdminLocked(caller.getUserId()), calledOnParent); return requiredAdmin.mPasswordComplexity; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequiredPasswordComplexity 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
getRequiredPasswordComplexity
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public boolean isTopOfTask(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); mRemote.transact(IS_TOP_OF_TASK_TRANSACTION, data, reply, 0); reply.readException(); boolean res = reply.readInt() == 1; data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isTopOfTask File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
isTopOfTask
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void populateModelForResource(HttpServletRequest theServletRequest, HomeRequest theRequest, ModelMap theModel) { IBaseResource conformance = addCommonParams(theServletRequest, theRequest, theModel); String resourceName = theRequest.getResource(); TreeSet<String> includes = new TreeSet<>(); TreeSet<String> revIncludes = new TreeSet<>(); TreeSet<String> sortParams = new TreeSet<>(); boolean haveSearchParams = false; List<List<String>> queryIncludes = new ArrayList<>(); switch (theRequest.getFhirVersion(myConfig)) { case DSTU2: haveSearchParams = extractSearchParamsDstu2(conformance, resourceName, includes, revIncludes, sortParams, haveSearchParams, queryIncludes); break; case DSTU3: haveSearchParams = extractSearchParamsDstu3CapabilityStatement(conformance, resourceName, includes, revIncludes, sortParams, haveSearchParams, queryIncludes); break; case R4: haveSearchParams = extractSearchParamsR4CapabilityStatement(conformance, resourceName, includes, revIncludes, sortParams, haveSearchParams, queryIncludes); break; case R5: haveSearchParams = extractSearchParamsR5CapabilityStatement(conformance, resourceName, includes, revIncludes, sortParams, haveSearchParams, queryIncludes); break; default: throw new IllegalStateException("Unknown FHIR version: " + theRequest.getFhirVersion(myConfig)); } theModel.put("includes", includes); theModel.put("revincludes", revIncludes); theModel.put("queries", Collections.emptyList()); // TODO: remove this, it does nothing theModel.put("haveSearchParams", haveSearchParams); theModel.put("queryIncludes", queryIncludes); theModel.put("sortParams", sortParams); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: populateModelForResource File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-24301
MEDIUM
4.3
hapifhir/hapi-fhir
populateModelForResource
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
0
Analyze the following code function for security vulnerabilities
private byte getTType(byte type) throws TProtocolException { switch ((byte) (type & 0x0f)) { case TType.STOP: return TType.STOP; case Types.BOOLEAN_FALSE: case Types.BOOLEAN_TRUE: return TType.BOOL; case Types.BYTE: return TType.BYTE; case Types.I16: return TType.I16; case Types.I32: return TType.I32; case Types.I64: return TType.I64; case Types.DOUBLE: return TType.DOUBLE; case Types.FLOAT: return TType.FLOAT; case Types.BINARY: return TType.STRING; case Types.LIST: return TType.LIST; case Types.SET: return TType.SET; case Types.MAP: return TType.MAP; case Types.STRUCT: return TType.STRUCT; default: throw new TProtocolException("don't know what type: " + (byte) (type & 0x0f)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTType 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
getTType
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
public static boolean contains(String dirPath, String filePath) { if (dirPath.equals(filePath)) { return true; } if (!dirPath.endsWith("/")) { dirPath += "/"; } return filePath.startsWith(dirPath); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: contains 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
contains
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-7171 - Severity: LOW - CVSS Score: 3.3 Description: fix(novel-admin): 友情链接URL格式校验 Function: setUpdateTime File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java Repository: 201206030/novel-plus Fixed Code: public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
[ "CWE-79" ]
CVE-2023-7171
LOW
3.3
201206030/novel-plus
setUpdateTime
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
d6093d8182362422370d7eaf6c53afde9ee45215
1
Analyze the following code function for security vulnerabilities
public static final native int getProcessGroup(int pid) throws IllegalArgumentException, SecurityException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProcessGroup File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
getProcessGroup
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
private native void nativeSingleTap( long nativeContentViewCoreImpl, long timeMs, float x, float y);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeSingleTap 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
nativeSingleTap
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void addUserKeyAuth(int userId, byte[] token, byte[] secret) throws RemoteException { final UserInfo userInfo = UserManager.get(mContext).getUserInfo(userId); final IMountService mountService = getMountService(); final long callingId = Binder.clearCallingIdentity(); try { mountService.addUserKeyAuth(userId, userInfo.serialNumber, token, secret); } finally { Binder.restoreCallingIdentity(callingId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addUserKeyAuth File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
addUserKeyAuth
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
private String getPrettyName(DocumentReference documentReference) { EntityReferenceProvider defaultEntityReferenceProvider = Utils.getComponent(EntityReferenceProvider.class); if (defaultEntityReferenceProvider.getDefaultReference(documentReference.getType()).getName() .equals(documentReference.getName())) { return documentReference.getLastSpaceReference().getName(); } return documentReference.getName(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrettyName 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
getPrettyName
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
@Override public InputStream getInputStream() throws IOException { InputStream is; if (this.clazz != null) { is = this.clazz.getResourceAsStream(this.path); } else { is = this.classLoader.getResourceAsStream(this.path); } if (is == null) { throw new FileNotFoundException(getDescription() + " cannot be opened because it does not exist"); } return is; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getInputStream File: src/main/java/spark/resource/ClassPathResource.java Repository: perwendel/spark The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-9159
MEDIUM
5
perwendel/spark
getInputStream
src/main/java/spark/resource/ClassPathResource.java
a221a864db28eb736d36041df2fa6eb8839fc5cd
0
Analyze the following code function for security vulnerabilities
public void loadLogFileStream(LogFile logFile, OutputStream outputStream) throws IOException { if (logFile.id().equals(IN_MEMORY_LOGFILE_ID)) { final LoggerContext context = (LoggerContext) LogManager.getContext(false); final Configuration config = context.getConfiguration(); final Optional<MemoryAppender> memAppender = getMemoryAppender(config); if (memAppender.isEmpty()) { throw new NotFoundException(); } memAppender.get().streamFormattedLogMessages(outputStream, 0); } else { Files.copy(Path.of(logFile.name()), outputStream); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadLogFileStream File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-41044
LOW
3.8
Graylog2/graylog2-server
loadLogFileStream
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
0
Analyze the following code function for security vulnerabilities
@Override protected boolean checkDBType(Map<String, ?> params) { return delegate.checkDBType(params); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkDBType File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
checkDBType
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
private void handleSAMLMessage(Request request, Response response) throws IOException, ServletException { if (isUnsolicitedResponse(request)) { String samlVersion = request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_SAML_VERSION.get()); if (samlVersion != null && JBossSAMLConstants.VERSION_2_0.get().equals(samlVersion)) { // We have SAML 2 IDP-Initiated SSO/Unsolicited Response. Now we need to create a SAMLResponse and send back // to SP as per target handleSAML2UnsolicitedResponse(request, response); } else { // We have SAML 1.1 IDP first scenario. Now we need to create a SAMLResponse and send back // to SP as per target handleSAML11UnsolicitedResponse(request, response); } } else { Session session = request.getSessionInternal(); String samlRequestMessage = (String) session.getNote(GeneralConstants.SAML_REQUEST_KEY); String samlResponseMessage = (String) session.getNote(GeneralConstants.SAML_RESPONSE_KEY); /** * Since the container has finished the authentication, we can retrieve the original saml message as well as any * relay state from the SP */ String relayState = (String) session.getNote(GeneralConstants.RELAY_STATE); String signature = (String) session.getNote(GeneralConstants.SAML_SIGNATURE_REQUEST_KEY); String sigAlg = (String) session.getNote(GeneralConstants.SAML_SIG_ALG_REQUEST_KEY); if (logger.isTraceEnabled()) { StringBuilder builder = new StringBuilder(); builder.append("Retrieved saml messages and relay state from session"); builder.append("saml Request message=").append(samlRequestMessage); builder.append("::").append("SAMLResponseMessage="); builder.append(samlResponseMessage).append(":").append("relay state=").append(relayState); builder.append("Signature=").append(signature).append("::sigAlg=").append(sigAlg); logger.trace(builder.toString()); } if (isNotNull(samlRequestMessage)) { processSAMLRequestMessage(request, response, null, isGlobalLogout(request)); } else if (isNotNull(samlResponseMessage)) { processSAMLResponseMessage(request, response); } else if (request.getRequestURI().equals(request.getContextPath() + "/")) { // no SAML processing and the request is asking for /. forwardHosted(request, response); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleSAMLMessage File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
handleSAMLMessage
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
@Override protected void extend(AbstractClientConnector target) { super.extend(target); if (this instanceof DataGenerator) { getParentGrid().datasourceExtension .addDataGenerator((DataGenerator) this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extend File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
extend
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
@Override public void setMaximumFailedPasswordsForWipe( ComponentName who, String callerPackageName, int num, boolean parent) { if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) { return; } if (!isPermissionCheckFlagEnabled()) { Objects.requireNonNull(who, "ComponentName is null"); } int userId = mInjector.userHandleGetCallingUserId(); int affectedUserId = parent ? getProfileParentId(userId) : userId; synchronized (getLockObject()) { ActiveAdmin ap; if (isPermissionCheckFlagEnabled()) { CallerIdentity caller = getCallerIdentity(who, callerPackageName); ap = enforcePermissionAndGetEnforcingAdmin( who, /*permission=*/ MANAGE_DEVICE_POLICY_WIPE_DATA, /* adminPolicy=*/ DeviceAdminInfo.USES_POLICY_WIPE_DATA, caller.getPackageName(), affectedUserId).getActiveAdmin(); } else { // This API can only be called by an active device admin, // so try to retrieve it to check that the caller is one. getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_WIPE_DATA, parent); ap = getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent); } if (ap.maximumFailedPasswordsForWipe != num) { ap.maximumFailedPasswordsForWipe = num; saveSettingsLocked(userId); } } if (SecurityLog.isLoggingEnabled()) { SecurityLog.writeEvent(SecurityLog.TAG_MAX_PASSWORD_ATTEMPTS_SET, callerPackageName, userId, affectedUserId, num); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMaximumFailedPasswordsForWipe 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
setMaximumFailedPasswordsForWipe
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
protected void throwAlreadyConnectedExceptionIfAppropriate() throws AlreadyConnectedException { if (isConnected()) { throw new AlreadyConnectedException(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: throwAlreadyConnectedExceptionIfAppropriate File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
throwAlreadyConnectedExceptionIfAppropriate
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
int write(byte[] b, int offset, int length) throws IOException { if (mSocketOS == null) throw new IOException("write is called on null OutputStream"); if (VDBG) Log.d(TAG, "write: " + mSocketOS + " length: " + length); mSocketOS.write(b, offset, length); // There is no good way to confirm since the entire process is asynchronous anyway if (VDBG) Log.d(TAG, "write out: " + mSocketOS + " length: " + length); return length; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: core/java/android/bluetooth/BluetoothSocket.java Repository: Genymobile/f2ut_platform_frameworks_base The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2014-9908
LOW
3.3
Genymobile/f2ut_platform_frameworks_base
write
core/java/android/bluetooth/BluetoothSocket.java
f24cec326f5f65c693544fb0b92c37f633bacda2
0
Analyze the following code function for security vulnerabilities
public AsyncHttpClientConfigBean setRealm(Realm realm) { this.realm = realm; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRealm 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
setRealm
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
public ActivityManager.TaskThumbnail getTaskThumbnail(int taskId) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTaskThumbnail File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getTaskThumbnail
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Test public void getByIdsPojo(TestContext context) { Async async = context.async(); String id1 = randomUuid(); String id2 = randomUuid(); JsonArray ids = new JsonArray().add(id1).add(id2); insertXAndSingleQuotePojo(context, ids).getById(FOO, ids, StringPojo.class, get -> { assertSuccess(context, get); context.assertEquals(2, get.result().size()); context.assertEquals("x", get.result().get(id1).key); context.assertEquals("'", get.result().get(id2).key); async.complete(); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getByIdsPojo 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
getByIdsPojo
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void setOauthBasePath(String basePath) { for(Authentication auth : authentications.values()) { if (auth instanceof OAuth) { ((OAuth) auth).setBasePath(basePath); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOauthBasePath File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/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
setOauthBasePath
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void handleRightButton() { if (mUiStage.rightMode == RightButtonMode.Continue) { if (mUiStage != Stage.FirstChoiceValid) { throw new IllegalStateException("expected ui stage " + Stage.FirstChoiceValid + " when button is " + RightButtonMode.Continue); } updateStage(Stage.NeedToConfirm); } else if (mUiStage.rightMode == RightButtonMode.Confirm) { if (mUiStage != Stage.ChoiceConfirmed) { throw new IllegalStateException("expected ui stage " + Stage.ChoiceConfirmed + " when button is " + RightButtonMode.Confirm); } startSaveAndFinish(); } else if (mUiStage.rightMode == RightButtonMode.Ok) { if (mUiStage != Stage.HelpScreen) { throw new IllegalStateException("Help screen is only mode with ok button, " + "but stage is " + mUiStage); } mLockPatternView.clearPattern(); mLockPatternView.setDisplayMode(DisplayMode.Correct); updateStage(Stage.Introduction); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleRightButton File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
handleRightButton
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
private DatasourceConfiguration updateDatasourceConfigurationForPagination(ActionConfiguration actionConfiguration, DatasourceConfiguration datasourceConfiguration, PaginationField paginationField) { if (PaginationField.NEXT.equals(paginationField)) { if (actionConfiguration.getNext() == null) { datasourceConfiguration.setUrl(null); } else { datasourceConfiguration.setUrl(URLDecoder.decode(actionConfiguration.getNext(), StandardCharsets.UTF_8)); } } else if (PaginationField.PREV.equals(paginationField)) { datasourceConfiguration.setUrl(actionConfiguration.getPrev()); } return datasourceConfiguration; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateDatasourceConfigurationForPagination File: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java Repository: appsmithorg/appsmith The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-38298
HIGH
8.8
appsmithorg/appsmith
updateDatasourceConfigurationForPagination
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
c59351ef94f9780c2a1ffc991e29b9272ab9fe64
0
Analyze the following code function for security vulnerabilities
@Override public final String toString() { EntityFullJid localEndpoint = getUser(); String localEndpointString = (localEndpoint == null ? "not-authenticated" : localEndpoint.toString()); return getClass().getSimpleName() + '[' + localEndpointString + "] (" + getConnectionCounter() + ')'; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
toString
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public int getIsSyncable(Account account, int userId, String providerName) { synchronized (mAuthorities) { if (account != null) { AuthorityInfo authority = getAuthorityLocked( new EndPoint(account, providerName, userId), "get authority syncable"); if (authority == null) { return -1; } return authority.syncable; } int i = mAuthorities.size(); while (i > 0) { i--; AuthorityInfo authorityInfo = mAuthorities.valueAt(i); if (authorityInfo.target != null && authorityInfo.target.provider.equals(providerName)) { return authorityInfo.syncable; } } return -1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIsSyncable File: services/core/java/com/android/server/content/SyncStorageEngine.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-2424
HIGH
7.1
android
getIsSyncable
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
private boolean isDeviceProvisionedInSettingsDb() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 0) != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceProvisionedInSettingsDb File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
isDeviceProvisionedInSettingsDb
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
public List<Integer> indexes() { if (form == null) { return Collections.emptyList(); } final Function<String, Pattern> indexPattern = key -> Pattern.compile("^" + Pattern.quote(key) + "\\[(\\d+)\\].*$"); return Collections.unmodifiableList( form.value() .map( (Function<Object, List<Integer>>) value -> { String objectKey = name; if (form.name() != null && name.startsWith(form.name() + ".")) { objectKey = name.substring(form.name().length() + 1); } if (value instanceof DynamicForm.Dynamic) { Set<Integer> result = new TreeSet<>(); DynamicForm.Dynamic dynamic = (DynamicForm.Dynamic) value; Pattern pattern = indexPattern.apply(objectKey); for (String key : dynamic.getData().keySet()) { Matcher matcher = pattern.matcher(key); if (matcher.matches()) { result.add(Integer.parseInt(matcher.group(1))); } } List<Integer> sortedResult = new ArrayList<>(result); Collections.sort(sortedResult); return sortedResult; } else { List<Integer> result = new ArrayList<>(); ConfigurablePropertyAccessor propertyAccessor = form.propertyAccessor(value); propertyAccessor.setAutoGrowNestedPaths(true); if (propertyAccessor.isReadableProperty(objectKey)) { Object value1 = propertyAccessor.getPropertyValue(objectKey); if (value1 instanceof Collection) { for (int i = 0; i < ((Collection<?>) value1).size(); i++) { result.add(i); } } } return result; } }) .orElseGet( () -> { Set<Integer> result = new TreeSet<>(); Pattern pattern = indexPattern.apply(name); final Set<String> mergedSet = new LinkedHashSet<>(form.rawData().keySet()); mergedSet.addAll(form.files().keySet()); for (String key : mergedSet) { Matcher matcher = pattern.matcher(key); if (matcher.matches()) { result.add(Integer.parseInt(matcher.group(1))); } } List<Integer> sortedResult = new ArrayList<>(result); Collections.sort(sortedResult); return sortedResult; })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: indexes File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
indexes
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
List<SysUserSysDepartModel> getUserByOrgCode(IPage page, @Param("orgCode") String orgCode, @Param("userParams") SysUser userParams);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserByOrgCode File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
getUserByOrgCode
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
private boolean convertNamedDestination(PdfObject obj, HashMap names) { obj = getPdfObject(obj); int objIdx = lastXrefPartial; releaseLastXrefPartial(); if (obj != null && obj.isDictionary()) { PdfObject ob2 = getPdfObject(((PdfDictionary)obj).get(PdfName.A)); if (ob2 != null) { int obj2Idx = lastXrefPartial; releaseLastXrefPartial(); PdfDictionary dic = (PdfDictionary)ob2; PdfName type = (PdfName)getPdfObjectRelease(dic.get(PdfName.S)); if (PdfName.GOTOR.equals(type)) { PdfObject ob3 = getPdfObjectRelease(dic.get(PdfName.D)); Object name = null; if (ob3 != null) { if (ob3.isName()) name = ob3; else if (ob3.isString()) name = ob3.toString(); PdfArray dest = (PdfArray)names.get(name); if (dest != null) { dic.remove(PdfName.F); dic.remove(PdfName.NEWWINDOW); dic.put(PdfName.S, PdfName.GOTO); setXrefPartialObject(obj2Idx, ob2); setXrefPartialObject(objIdx, obj); return true; } } } } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertNamedDestination 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
convertNamedDestination
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public void setHeadsUpAnimatingAway(boolean headsUpAnimatingAway) { mHeadsUpAnimatingAway = headsUpAnimatingAway; mNotificationStackScroller.setHeadsUpAnimatingAway(headsUpAnimatingAway); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHeadsUpAnimatingAway 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
setHeadsUpAnimatingAway
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public Buffer request(String request, Buffer buffer, long maxWaitMillis) throws IOException { ValidateUtils.checkTrue(maxWaitMillis > 0, "Requested timeout for " + request + " is not strictly greater than zero: " + maxWaitMillis); boolean debugEnabled = log.isDebugEnabled(); boolean withReply = wantReply(buffer); GlobalRequestFuture future = request(buffer, request, null); Object result; boolean done = false; try { if (debugEnabled) { log.debug("request({}) request={}, timeout={}ms", this, request, maxWaitMillis); } done = future.await(maxWaitMillis); result = future.getValue(); } catch (InterruptedIOException e) { throw (InterruptedIOException) new InterruptedIOException( "Interrupted while waiting for request=" + request + " result").initCause(e); } if (!isOpen()) { throw new IOException("Session was closed or closing while awaiting reply for request=" + request); } if (withReply) { if (debugEnabled) { log.debug("request({}) request={}, timeout={}ms, requestSeqNo={}, done {}, result received={}", this, request, maxWaitMillis, future.getSequenceNumber(), done, result instanceof Buffer); } if (!done || result == null) { throw new SocketTimeoutException("No response received after " + maxWaitMillis + "ms for request=" + request); } // The operation is specified to return null if the request could be made, but got an error reply. // The caller cannot distinguish between SSH_MSG_UNIMPLEMENTED and SSH_MSG_REQUEST_FAILURE. if (result instanceof GlobalRequestException) { if (debugEnabled) { log.debug("request({}) request={}, requestSeqNo={}: received={}", this, request, future.getSequenceNumber(), SshConstants.getCommandMessageName(((GlobalRequestException) result).getCode())); } return null; } } if (result instanceof Throwable) { throw new IOException("Exception on request " + request, (Throwable) result); } if (result instanceof Buffer) { return (Buffer) result; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: request File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
request
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
boolean updateConfigurationLocked(Configuration values, ActivityRecord starting, boolean initLocale) { // pass UserHandle.USER_NULL as userId because we don't persist configuration for any user return updateConfigurationLocked(values, starting, initLocale, false, UserHandle.USER_NULL); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateConfigurationLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
updateConfigurationLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private Builder setCreateTime(long createTime) { mCreateTime = createTime; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCreateTime 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
setCreateTime
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private void setPosition(ActivityImpl activity, Map<String, Object> activityInfo) { activityInfo.put("x", activity.getX()); activityInfo.put("y", activity.getY()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPosition File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java Repository: thinkgem/jeesite The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-34601
CRITICAL
9.8
thinkgem/jeesite
setPosition
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
0
Analyze the following code function for security vulnerabilities
private int bestDomainVerificationStatus(int status1, int status2) { if (status1 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) { return status2; } if (status2 == INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER) { return status1; } return (int) MathUtils.max(status1, status2); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bestDomainVerificationStatus 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
bestDomainVerificationStatus
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private void newSearchResult(@Nullable AjaxRequestTarget target, @Nullable List<QueryHit> hits) { Component content; if (hits != null) { content = new SearchResultPanel("content", this, hits) { @Override protected void onClose(AjaxRequestTarget target) { newSearchResult(target, null); resizeWindow(target); } }; if (target != null) { target.appendJavaScript("" + "$('.project-blob>.search-result').css('display', 'flex'); " + "$('.project-blob .search-result>.body').focus();"); } } else { content = new WebMarkupContainer("content").setOutputMarkupId(true); if (target != null) target.appendJavaScript("$('.project-blob>.search-result').hide();"); else searchResult.add(AttributeAppender.replace("style", "display: none;")); } if (target != null) { searchResult.replace(content); target.add(content); } else { searchResult.add(content); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newSearchResult 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
newSearchResult
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
private void applyVrModeIfNeededLocked(ActivityRecord r, boolean enable) { mHandler.sendMessage( mHandler.obtainMessage(VR_MODE_APPLY_IF_NEEDED_MSG, enable ? 1 : 0, 0, r)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyVrModeIfNeededLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
applyVrModeIfNeededLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
protected Object _deserializeWithExternalTypeId(JsonParser p, DeserializationContext ctxt, Object bean, ExternalTypeHandler ext) throws IOException { final Class<?> activeView = _needViewProcesing ? ctxt.getActiveView() : null; for (JsonToken t = p.currentToken(); t == JsonToken.FIELD_NAME; t = p.nextToken()) { String propName = p.currentName(); t = p.nextToken(); SettableBeanProperty prop = _beanProperties.find(propName); if (prop != null) { // normal case // [JACKSON-831]: may have property AND be used as external type id: if (t.isScalarValue()) { ext.handleTypePropertyValue(p, ctxt, propName, bean); } if (activeView != null && !prop.visibleInView(activeView)) { p.skipChildren(); continue; } try { prop.deserializeAndSet(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); } continue; } // ignorable things should be ignored if (IgnorePropertiesUtil.shouldIgnore(propName, _ignorableProps, _includableProps)) { handleIgnoredProperty(p, ctxt, bean, propName); continue; } // but others are likely to be part of external type id thingy... if (ext.handlePropertyValue(p, ctxt, propName, bean)) { continue; } // if not, the usual fallback handling: if (_anySetter != null) { try { _anySetter.deserializeAndSet(p, ctxt, bean, propName); } catch (Exception e) { wrapAndThrow(e, bean, propName, ctxt); } continue; } // Unknown: let's call handler method handleUnknownProperty(p, ctxt, bean, propName); } // and when we get this far, let's try finalizing the deal: return ext.complete(p, ctxt, bean); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _deserializeWithExternalTypeId File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-42004
HIGH
7.5
FasterXML/jackson-databind
_deserializeWithExternalTypeId
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
063183589218fec19a9293ed2f17ec53ea80ba88
0
Analyze the following code function for security vulnerabilities
void updateTopApp(ActivityRecord topResumedActivity) { final ActivityRecord top = topResumedActivity != null ? topResumedActivity // If there is no resumed activity, it will choose the pausing or focused activity. : mRootWindowContainer.getTopResumedActivity(); mTopApp = top != null ? top.app : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateTopApp 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
updateTopApp
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private byte[] readBinary(int length) throws TException { if (length == 0) { return new byte[0]; } byte[] buf = new byte[length]; trans_.readAll(buf, 0, length); return buf; }
Vulnerability Classification: - CWE: CWE-770 - CVE: CVE-2019-11938 - Severity: MEDIUM - CVSS Score: 5.0 Description: Java: Check the size of the remaining frame before deserializing a string Summary: In order to avoid over-allocating memory for malformed or truncated frame, we ensure that we have enough data in the current frame. This is a partial fix for CVE-2019-11938. Reviewed By: vitaut Differential Revision: D14505601 fbshipit-source-id: c90f248828b067a3a5debcc8df6a3f4e9da6d195 Function: readBinary File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift Fixed Code: private byte[] readBinary(int length) throws TException { if (length == 0) { return new byte[0]; } ensureContainerHasEnough(length, TType.BYTE); byte[] buf = new byte[length]; trans_.readAll(buf, 0, length); return buf; }
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
readBinary
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
1
Analyze the following code function for security vulnerabilities
boolean isPackageInstalledForUser(String packageName, int userHandle) { return mInjector.binderWithCleanCallingIdentity(() -> { try { PackageInfo pi = mInjector.getIPackageManager().getPackageInfo(packageName, 0, userHandle); return (pi != null) && (pi.applicationInfo.flags != 0); } catch (RemoteException re) { throw new RuntimeException("Package manager has died", re); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPackageInstalledForUser 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
isPackageInstalledForUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
void updateState(int newState) { synchronized (NfcService.this) { if (newState == mState) { return; } mState = newState; Intent intent = new Intent(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED); intent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); intent.putExtra(NfcAdapter.EXTRA_ADAPTER_STATE, mState); mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateState File: src/com/android/nfc/NfcService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3761
LOW
2.1
android
updateState
src/com/android/nfc/NfcService.java
9ea802b5456a36f1115549b645b65c791eff3c2c
0
Analyze the following code function for security vulnerabilities
@Override public void setWorkflowGroup(Context context, Collection collection, int step, Group group) throws SQLException { Workflow workflow = null; try { workflow = workflowFactory.getWorkflow(collection); } catch (WorkflowConfigurationException e) { log.error(LogHelper.getHeader(context, "setWorkflowGroup", "collection_id=" + collection.getID() + " " + e.getMessage()), e); } if (!StringUtils.equals(workflowFactory.getDefaultWorkflow().getID(), workflow.getID())) { throw new IllegalArgumentException( "setWorkflowGroup can be used only on collection with the default basic dspace workflow. " + "Instead, the collection: " + collection.getID() + " has the workflow: " + workflow.getID()); } String roleId; switch (step) { case 1: roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP1_NAME; break; case 2: roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP2_NAME; break; case 3: roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP3_NAME; break; default: throw new IllegalArgumentException("Illegal step count: " + step); } CollectionRole colRole = collectionRoleService.find(context, collection, roleId); if (colRole == null) { if (group != null) { colRole = collectionRoleService.create(context, collection, roleId, group); } } else { if (group != null) { colRole.setGroup(group); collectionRoleService.update(context, colRole); } else { collectionRoleService.delete(context, colRole); } } collection.setModified(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWorkflowGroup File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41189
HIGH
9
DSpace
setWorkflowGroup
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
0
Analyze the following code function for security vulnerabilities
public long totalMemory() { return Runtime.getRuntime().totalMemory(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: totalMemory 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
totalMemory
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 ActivityManager.RecentTaskInfo createRecentTaskInfoFromTaskRecord(TaskRecord tr) { // Update the task description to reflect any changes in the task stack tr.updateTaskDescription(); // Compose the recent task info ActivityManager.RecentTaskInfo rti = new ActivityManager.RecentTaskInfo(); rti.id = tr.getTopActivity() == null ? INVALID_TASK_ID : tr.taskId; rti.persistentId = tr.taskId; rti.baseIntent = new Intent(tr.getBaseIntent()); rti.origActivity = tr.origActivity; rti.realActivity = tr.realActivity; rti.description = tr.lastDescription; rti.stackId = tr.stack != null ? tr.stack.mStackId : -1; rti.userId = tr.userId; rti.taskDescription = new ActivityManager.TaskDescription(tr.lastTaskDescription); rti.firstActiveTime = tr.firstActiveTime; rti.lastActiveTime = tr.lastActiveTime; rti.affiliatedTaskId = tr.mAffiliatedTaskId; rti.affiliatedTaskColor = tr.mAffiliatedTaskColor; rti.numActivities = 0; if (tr.mBounds != null) { rti.bounds = new Rect(tr.mBounds); } rti.isDockable = tr.canGoInDockedStack(); rti.resizeMode = tr.mResizeMode; ActivityRecord base = null; ActivityRecord top = null; ActivityRecord tmp; for (int i = tr.mActivities.size() - 1; i >= 0; --i) { tmp = tr.mActivities.get(i); if (tmp.finishing) { continue; } base = tmp; if (top == null || (top.state == ActivityState.INITIALIZING)) { top = base; } rti.numActivities++; } rti.baseActivity = (base != null) ? base.intent.getComponent() : null; rti.topActivity = (top != null) ? top.intent.getComponent() : null; return rti; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createRecentTaskInfoFromTaskRecord File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
createRecentTaskInfoFromTaskRecord
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@Override public void onRttSessionRemotelyTerminated(String callId, Session.Info sessionInfo) throws RemoteException { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRttSessionRemotelyTerminated 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
onRttSessionRemotelyTerminated
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newCursor File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
newCursor
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public static int defaultRequestTimeoutInMs() { return Integer.getInteger(ASYNC_CLIENT + "requestTimeoutInMs", 60 * 1000); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: defaultRequestTimeoutInMs File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7398
MEDIUM
4.3
AsyncHttpClient/async-http-client
defaultRequestTimeoutInMs
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
a894583921c11c3b01f160ada36a8bb9d5158e96
0
Analyze the following code function for security vulnerabilities
protected boolean checkLocks( RequestContext requestContext, WebDavStore store, String path ) throws IOException, LockFailedException { List<Lock> losByPath = store.getLocksByPath(requestContext, path); for(Lock lo: losByPath) { if(!Lock.SCOPE_SHARED.equals(lo.getScope())) { // the resource is locked String[] lockTokens = getLockIdFromIfHeader(requestContext); String lockToken = null; if (lockTokens != null) lockToken = lockTokens[0]; else { return false; } if(lockToken != null) { if (!lockToken.equals(lo.getID())) { return false; } } } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkLocks 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
checkLocks
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
ce7a71db0bb34ecbcb0e822d40598e410a48b399
0
Analyze the following code function for security vulnerabilities
private static boolean isDeveloperMode(Context context) { return Global.getInt(context.getContentResolver(), Global.ADB_ENABLED, 0) > 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeveloperMode 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
isDeveloperMode
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private static String getRequestMethodAsString(RequestMethod method) { switch (method) { case GET: return "GET"; case POST: return "POST"; default: throw ErrorUtil.createCommandException("invalid request method:" + method); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestMethodAsString File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java Repository: ballerina-platform/ballerina-lang The code follows secure coding practices.
[ "CWE-306" ]
CVE-2021-32700
MEDIUM
5.8
ballerina-platform/ballerina-lang
getRequestMethodAsString
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
4609ffee1744ecd16aac09303b1783bf0a525816
0
Analyze the following code function for security vulnerabilities
private boolean isApplicationFlagSet(@NonNull String packageName, int userId, int flags) { final ApplicationInfo ai = injectApplicationInfoWithUninstalled(packageName, userId); return (ai != null) && ((ai.flags & flags) == flags); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isApplicationFlagSet 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
isApplicationFlagSet
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public XWikiDocument getTranslatedDocument(Locale locale, XWikiContext context) throws XWikiException { XWikiDocument tdoc = this; if (locale != null && !locale.equals(Locale.ROOT) && !locale.equals(getDefaultLocale())) { try { tdoc = context.getWiki().getDocument(new DocumentReference(getDocumentReference(), locale), context); if (!tdoc.isNew()) { return tdoc; } } catch (Exception e) { LOGGER.error("Error when loading document {} for locale {}", getDocumentReference(), locale, e); } tdoc = getTranslatedDocument(LocaleUtils.getParentLocale(locale), context); } return tdoc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTranslatedDocument 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
getTranslatedDocument
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
@Override protected void finalize() { if (DBG) log("CdmaServiceStateTracker finalized"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finalize File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
finalize
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
@ImplementationNote("Must be called from Swing UI thread") public static void foldUnfoldTree(@Nonnull final JTree tree, final boolean unfold) { final TreeModel model = tree.getModel(); if (model != null) { final Object root = model.getRoot(); if (root != null) { final TreePath thePath = new TreePath(root); setTreeState(tree, thePath, true, unfold); if (!unfold) { setTreeState(tree, thePath, false, true); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: foldUnfoldTree File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java Repository: raydac/netbeans-mmd-plugin The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000542
MEDIUM
6.8
raydac/netbeans-mmd-plugin
foldUnfoldTree
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
9fba652bf06e649186b8f9e612d60e9cc15097e9
0
Analyze the following code function for security vulnerabilities
@Override public boolean isInMemory() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInMemory File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java Repository: netty The code follows secure coding practices.
[ "CWE-378", "CWE-379" ]
CVE-2021-21290
LOW
1.9
netty
isInMemory
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
c735357bf29d07856ad171c6611a2e1a0e0000ec
0
Analyze the following code function for security vulnerabilities
private void closeSession(VaadinSession vaadinSession, WrappedSession session) { if (vaadinSession == null) { return; } if (session != null) { removeSession(session); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: closeSession 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
closeSession
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public HttpRequest setHostHeader() { String hostPort = this.host; if (port != Defaults.DEFAULT_PORT) { hostPort += StringPool.COLON + port; } headerOverwrite(HEADER_HOST, hostPort); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHostHeader File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
setHostHeader
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0