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 String getId() { return id; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getId File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
getId
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
public AttachmentRecycleBinStore getAttachmentRecycleBinStore() { return this.attachmentRecycleBinStore; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttachmentRecycleBinStore 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
getAttachmentRecycleBinStore
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 boolean canQueryAdminPolicy(CallerIdentity caller) { return hasCallingOrSelfPermission(permission.QUERY_ADMIN_POLICY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canQueryAdminPolicy 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
canQueryAdminPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
void updateReportedVisibilityLocked() { if (DEBUG_VISIBILITY) Slog.v(TAG, "Update reported visibility: " + this); final int count = mChildren.size(); mReportedVisibilityResults.reset(); for (int i = 0; i < count; i++) { final WindowState win = mChildren.get(i); win.updateReportedVisibility(mReportedVisibilityResults); } int numInteresting = mReportedVisibilityResults.numInteresting; int numVisible = mReportedVisibilityResults.numVisible; int numDrawn = mReportedVisibilityResults.numDrawn; boolean nowGone = mReportedVisibilityResults.nowGone; boolean nowDrawn = numInteresting > 0 && numDrawn >= numInteresting; boolean nowVisible = numInteresting > 0 && numVisible >= numInteresting && isVisible(); if (!nowGone) { // If the app is not yet gone, then it can only become visible/drawn. if (!nowDrawn) { nowDrawn = mReportedDrawn; } if (!nowVisible) { nowVisible = reportedVisible; } } if (DEBUG_VISIBILITY) Slog.v(TAG, "VIS " + this + ": interesting=" + numInteresting + " visible=" + numVisible); if (nowDrawn != mReportedDrawn) { if (nowDrawn) { onWindowsDrawn(SystemClock.elapsedRealtimeNanos()); } mReportedDrawn = nowDrawn; } if (nowVisible != reportedVisible) { if (DEBUG_VISIBILITY) Slog.v(TAG, "Visibility changed in " + this + ": vis=" + nowVisible); reportedVisible = nowVisible; if (nowVisible) { onWindowsVisible(); } else { onWindowsGone(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateReportedVisibilityLocked 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
updateReportedVisibilityLocked
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
private static String descriptorForSignature(String signature) { return signature.substring(signature.indexOf("(")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: descriptorForSignature File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
descriptorForSignature
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public int checkGrantUriPermission(int callingUid, String targetPkg, Uri uri, final int modeFlags, int userId) { enforceNotIsolatedCaller("checkGrantUriPermission"); synchronized(this) { return checkGrantUriPermissionLocked(callingUid, targetPkg, new GrantUri(userId, uri, false), modeFlags, -1); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkGrantUriPermission File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
checkGrantUriPermission
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public String getSpaceFilteredQuery(HttpServletRequest req, boolean isSpaceFiltered, String spaceFilter, String defaultQuery) { Profile authUser = getAuthUser(req); String currentSpace = getSpaceIdFromCookie(authUser, req); if (isSpaceFiltered) { return StringUtils.isBlank(spaceFilter) ? getSpaceFilter(authUser, currentSpace) : spaceFilter; } return canAccessSpace(authUser, currentSpace) ? defaultQuery : ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSpaceFilteredQuery File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getSpaceFilteredQuery
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@RequestMapping("redirect") public String contentRedirect(@RequestAttribute SysSite site, Long id, HttpServletRequest request) { CmsContentStatistics contentStatistics = statisticsComponent.contentClicks(site, id); if (null != contentStatistics && null != contentStatistics.getUrl() && site.getId().equals(contentStatistics.getSiteId())) { return UrlBasedViewResolver.REDIRECT_URL_PREFIX + contentStatistics.getUrl(); } else { return UrlBasedViewResolver.REDIRECT_URL_PREFIX + site.getDynamicPath(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: contentRedirect File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
contentRedirect
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override public void addHeader(String name, String value) { this.response.addHeader(name, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addHeader 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
addHeader
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 void setFeature(final String key, final boolean val) throws SAXNotRecognizedException { if (!getRecognizedFeatures().contains(key)) throw new SAXNotRecognizedException(key); features.put(key, val ? Boolean.TRUE : Boolean.FALSE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFeature File: src/java/org/orbeon/oxf/xml/xerces/XercesSAXParserFactoryImpl.java Repository: orbeon/orbeon-forms The code follows secure coding practices.
[ "CWE-264" ]
CVE-2010-3260
MEDIUM
6.4
orbeon/orbeon-forms
setFeature
src/java/org/orbeon/oxf/xml/xerces/XercesSAXParserFactoryImpl.java
aba6681660f65af7f1676434da68c10298c30200
0
Analyze the following code function for security vulnerabilities
public boolean isValidateSearchParameterExpressionsOnSave() { return myValidateSearchParameterExpressionsOnSave; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isValidateSearchParameterExpressionsOnSave File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isValidateSearchParameterExpressionsOnSave
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public void updateCharacterStream(String columnName, @Nullable Reader reader) throws SQLException { updateCharacterStream(findColumn(columnName), reader); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateCharacterStream File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
updateCharacterStream
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public @Nullable ComponentName getGlobalProxyAdmin() { if (mService != null) { try { return mService.getGlobalProxyAdmin(myUserId()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGlobalProxyAdmin 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
getGlobalProxyAdmin
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public String getCurrentAccessPoint() { ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = cm.getActiveNetworkInfo(); if (info == null) { return null; } String apName = info.getTypeName() + "_" + info.getSubtypeName(); if (info.getExtraInfo() != null) { apName += "_" + info.getExtraInfo(); } return apName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentAccessPoint File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getCurrentAccessPoint
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public HashMap getNamedDestination() { return getNamedDestination(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNamedDestination 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
getNamedDestination
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public static <T> T withPassword(AuthenticationRequestType type, Properties info, PasswordAction<char @Nullable [], T> action) throws PSQLException, IOException { char[] password = null; String authPluginClassName = PGProperty.AUTHENTICATION_PLUGIN_CLASS_NAME.get(info); if (authPluginClassName == null || authPluginClassName.equals("")) { // Default auth plugin simply pulls password directly from connection properties String passwordText = PGProperty.PASSWORD.get(info); if (passwordText != null) { password = passwordText.toCharArray(); } } else { AuthenticationPlugin authPlugin; try { authPlugin = (AuthenticationPlugin) ObjectFactory.instantiate(authPluginClassName, info, false, null); } catch (Exception ex) { LOGGER.log(Level.FINE, "Unable to load Authentication Plugin " + ex.toString()); throw new PSQLException(ex.getMessage(), PSQLState.UNEXPECTED_ERROR); } password = authPlugin.getPassword(type); } try { return action.apply(password); } finally { if (password != null) { java.util.Arrays.fill(password, (char) 0); } } }
Vulnerability Classification: - CWE: CWE-665 - CVE: CVE-2022-21724 - Severity: HIGH - CVSS Score: 7.5 Description: Merge pull request from GHSA-v7wg-cpwc-24m4 This ensures arbitrary classes can't be passed instead of AuthenticationPlugin, SocketFactory, SSLSocketFactory, CallbackHandler, HostnameVerifier Function: withPassword File: pgjdbc/src/main/java/org/postgresql/core/v3/AuthenticationPluginManager.java Repository: pgjdbc Fixed Code: public static <T> T withPassword(AuthenticationRequestType type, Properties info, PasswordAction<char @Nullable [], T> action) throws PSQLException, IOException { char[] password = null; String authPluginClassName = PGProperty.AUTHENTICATION_PLUGIN_CLASS_NAME.get(info); if (authPluginClassName == null || authPluginClassName.equals("")) { // Default auth plugin simply pulls password directly from connection properties String passwordText = PGProperty.PASSWORD.get(info); if (passwordText != null) { password = passwordText.toCharArray(); } } else { AuthenticationPlugin authPlugin; try { authPlugin = ObjectFactory.instantiate(AuthenticationPlugin.class, authPluginClassName, info, false, null); } catch (Exception ex) { String msg = GT.tr("Unable to load Authentication Plugin {0}", authPluginClassName); LOGGER.log(Level.FINE, msg, ex); throw new PSQLException(msg, PSQLState.INVALID_PARAMETER_VALUE, ex); } password = authPlugin.getPassword(type); } try { return action.apply(password); } finally { if (password != null) { java.util.Arrays.fill(password, (char) 0); } } }
[ "CWE-665" ]
CVE-2022-21724
HIGH
7.5
pgjdbc
withPassword
pgjdbc/src/main/java/org/postgresql/core/v3/AuthenticationPluginManager.java
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
1
Analyze the following code function for security vulnerabilities
public void removeToGcByIds(List<String> nodeIds) { ApiScenarioExampleWithOperation example = new ApiScenarioExampleWithOperation(); example.createCriteria().andApiScenarioModuleIdIn(nodeIds); example.setOperator(SessionUtils.getUserId()); example.setOperationTime(System.currentTimeMillis()); extApiScenarioMapper.removeToGcByExample(example); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeToGcByIds File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
removeToGcByIds
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Override public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { try { return super.onTransact(code, data, reply, flags); } catch (RuntimeException e) { // The window manager only throws security exceptions, so let's // log all others. if (!(e instanceof SecurityException)) { Slog.wtf(TAG, "Window Manager Crash", e); } throw e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTransact File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
onTransact
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public PopupInfo connectPendingPopup(final AwContents parentAwContents) throws Exception { TestAwContentsClient popupContentsClient; AwTestContainerView popupContainerView; final AwContents popupContents; popupContentsClient = new TestAwContentsClient(); popupContainerView = createAwTestContainerViewOnMainSync(popupContentsClient); popupContents = popupContainerView.getAwContents(); enableJavaScriptOnUiThread(popupContents); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { parentAwContents.supplyContentsForPopup(popupContents); } }); OnPageFinishedHelper onPageFinishedHelper = popupContentsClient.getOnPageFinishedHelper(); int callCount = onPageFinishedHelper.getCallCount(); onPageFinishedHelper.waitForCallback(callCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); return new PopupInfo(popupContentsClient, popupContainerView, popupContents); }
Vulnerability Classification: - CWE: CWE-254 - CVE: CVE-2016-5155 - Severity: MEDIUM - CVSS Score: 4.3 Description: binding: Moves the check for the first access to the initial document into BindingSecurity. Checks the access to the initial document and reports it not only at securityCheck() in V8Window.cpp but also at every call to BindingSecurity::shouldAllowAccessTo() because V8 only calls back securityCheck() on property lookups, and not for function invocation. BindingSecurity::shouldAllowAccessTo() is called with every possible cross-origin window, which means every possible new window. Thus, shouldAllowAccessTo() should be the right place to check the access to the initial document. BUG=630662 TBR=benwells@chromium.org Review-Url: https://codereview.chromium.org/2209303002 Cr-Commit-Position: refs/heads/master@{#412195} Function: connectPendingPopup File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium Fixed Code: public PopupInfo connectPendingPopup(final AwContents parentAwContents) throws Exception { TestAwContentsClient popupContentsClient; AwTestContainerView popupContainerView; final AwContents popupContents; popupContentsClient = new TestAwContentsClient(); popupContainerView = createAwTestContainerViewOnMainSync(popupContentsClient); popupContents = popupContainerView.getAwContents(); enableJavaScriptOnUiThread(popupContents); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { parentAwContents.supplyContentsForPopup(popupContents); } }); OnPageFinishedHelper onPageFinishedHelper = popupContentsClient.getOnPageFinishedHelper(); int finishCallCount = onPageFinishedHelper.getCallCount(); TestAwContentsClient.OnReceivedTitleHelper onReceivedTitleHelper = popupContentsClient.getOnReceivedTitleHelper(); int titleCallCount = onReceivedTitleHelper.getCallCount(); onPageFinishedHelper.waitForCallback(finishCallCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); onReceivedTitleHelper.waitForCallback(titleCallCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); return new PopupInfo(popupContentsClient, popupContainerView, popupContents); }
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
connectPendingPopup
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
1
Analyze the following code function for security vulnerabilities
@Subscribe(threadMode = ThreadMode.MAIN) public void onEventMainThread(SyncFailedEvent event) { Throwable exception = event.exception(); // If SSOException is wrapped inside another exception, we extract that SSOException if(exception.getCause() != null && exception.getCause() instanceof SSOException) { exception = exception.getCause(); } if(exception instanceof SSOException){ if(exception instanceof NextcloudHttpRequestFailedException && ((NextcloudHttpRequestFailedException) exception).getStatusCode() == 302) { ShowAlertDialog( getString(R.string.login_dialog_title_error), getString(R.string.login_dialog_text_news_app_not_installed_on_server, "https://github.com/nextcloud/news/blob/master/docs/install.md#installing-from-the-app-store"), this); } else if (exception instanceof TokenMismatchException) { Toast.makeText(NewsReaderListActivity.this, "Token out of sync. Please reauthenticate", Toast.LENGTH_LONG).show(); try { SingleAccountHelper.reauthenticateCurrentAccount(this); } catch (NextcloudFilesAppAccountNotFoundException | NoCurrentAccountSelectedException | NextcloudFilesAppNotSupportedException e) { UiExceptionManager.showDialogForException(this, e); } catch (NextcloudFilesAppAccountPermissionNotGrantedException e) { // Unable to reauthenticate account just like that.. startLoginActivity(); } //StartLoginFragment(this); } else { UiExceptionManager.showDialogForException(this, (SSOException) exception); //UiExceptionManager.showNotificationForException(this, (SSOException) exception); } } else { Toast.makeText(NewsReaderListActivity.this, exception.getLocalizedMessage(), Toast.LENGTH_LONG).show(); } updateButtonLayout(); syncFinishedHandler(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onEventMainThread File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
onEventMainThread
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@SuppressLint("ClickableViewAccessibility") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final GlifLayout layout = (GlifLayout) inflater.inflate( R.layout.choose_lock_pattern, container, false); layout.findViewById(R.id.lockPattern).setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { v.getParent().requestDisallowInterceptTouchEvent(true); } return false; }); updateActivityTitle(); layout.setHeaderText(getActivity().getTitle()); layout.getHeaderTextView().setAccessibilityLiveRegion(ACCESSIBILITY_LIVE_REGION_POLITE); if (getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) { View iconView = layout.findViewById(R.id.sud_layout_icon); if (iconView != null) { layout.getMixin(IconMixin.class).setVisibility(View.GONE); } } else { layout.setIcon(getActivity().getDrawable(R.drawable.ic_lock)); } final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class); mixin.setSecondaryButton( new FooterButton.Builder(getActivity()) .setText(R.string.lockpattern_tutorial_cancel_label) .setListener(this::onSkipOrClearButtonClick) .setButtonType(FooterButton.ButtonType.OTHER) .setTheme(R.style.SudGlifButton_Secondary) .build() ); mixin.setPrimaryButton( new FooterButton.Builder(getActivity()) .setText(R.string.lockpattern_tutorial_continue_label) .setListener(this::onNextButtonClick) .setButtonType(FooterButton.ButtonType.NEXT) .setTheme(R.style.SudGlifButton_Primary) .build() ); mSkipOrClearButton = mixin.getSecondaryButton(); mNextButton = mixin.getPrimaryButton(); return layout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCreateView 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
onCreateView
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
@Override public void writeShort(short value) throws JMSException { writePrimitive(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeShort File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
writeShort
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
private void addToDynamicTable(HttpString headerName, String val) { int pos = entryPositionCounter++; DynamicTableEntry d = new DynamicTableEntry(headerName, val, -pos); List<TableEntry> existing = dynamicTable.get(headerName); if (existing == null) { dynamicTable.put(headerName, existing = new ArrayList<>(1)); } existing.add(d); evictionQueue.add(d); currentTableSize += d.size; runEvictionIfRequired(); if (entryPositionCounter == Integer.MAX_VALUE) { //prevent rollover preventPositionRollover(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addToDynamicTable File: core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
addToDynamicTable
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
public ClientConfig getDefaultClientConfig() { ClientConfig clientConfig = new ClientConfig(); clientConfig.register(MultiPartFeature.class); clientConfig.register(json); clientConfig.register(JacksonFeature.class); clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); // turn off compliance validation to be able to send payloads with DELETE calls clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); if (debugging) { clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); // Set logger to ALL java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); } else { // suppress warnings for payloads with DELETE calls: java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); } return clientConfig; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultClientConfig File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getDefaultClientConfig
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void runPendingAccessTasks(VaadinSession session) { session.checkHasLock(); if (session.getPendingAccessQueue().isEmpty()) { return; } FutureAccess pendingAccess; // Dump all current instances, not only the ones dumped by setCurrent Map<Class<?>, CurrentInstance> oldInstances = CurrentInstance .getInstances(); CurrentInstance.setCurrent(session); try { while ((pendingAccess = session.getPendingAccessQueue() .poll()) != null) { if (!pendingAccess.isCancelled()) { pendingAccess.run(); try { pendingAccess.get(); } catch (Exception exception) { pendingAccess.handleError(exception); } } } } finally { CurrentInstance.clearAll(); CurrentInstance.restoreInstances(oldInstances); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: runPendingAccessTasks 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
runPendingAccessTasks
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public void init( boolean forEncryption, CipherParameters privParam, CipherParameters pubParam, CipherParameters params) { this.forEncryption = forEncryption; this.privParam = privParam; this.pubParam = pubParam; this.V = new byte[0]; extractParams(params); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
init
core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
public WifiEnterpriseConfig[] newArray(int size) { return new WifiEnterpriseConfig[size]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newArray File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3897
MEDIUM
4.3
android
newArray
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
81be4e3aac55305cbb5c9d523cf5c96c66604b39
0
Analyze the following code function for security vulnerabilities
public void validateStackOrder(Integer[] remoteStackIds) { // TODO: }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateStackOrder File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
validateStackOrder
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Override public List<ActivityManager.RunningServiceInfo> getServices(int maxNum, int flags) { enforceNotIsolatedCaller("getServices"); synchronized (this) { return mServices.getRunningServiceInfoLocked(maxNum, flags); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getServices File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
getServices
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public void setSiteId(short siteId) { this.siteId = siteId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSiteId File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
setSiteId
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
private String _getContactServiceProvider(final User user, final String command) { if (user == null) return ""; for (final Contact contact : user.getContacts()) { if (contact != null && contact.getType().equals(command)) { return contact.getServiceProvider().orElse(""); } } return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _getContactServiceProvider File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352" ]
CVE-2021-25931
MEDIUM
6.8
OpenNMS/opennms
_getContactServiceProvider
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
void setInheritShowWhenLocked(boolean inheritShowWhenLocked) { mInheritShownWhenLocked = inheritShowWhenLocked; mAtmService.mRootWindowContainer.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */, false /* preserveWindows */); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInheritShowWhenLocked 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
setInheritShowWhenLocked
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public void setQuotedArgumentsEnabled( boolean quotedArgumentsEnabled ) { this.quotedArgumentsEnabled = quotedArgumentsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setQuotedArgumentsEnabled File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
setQuotedArgumentsEnabled
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
public void addTask(int taskId, int stackId, boolean toTop) { synchronized (mWindowMap) { if (DEBUG_STACK) Slog.i(TAG, "addTask: adding taskId=" + taskId + " to " + (toTop ? "top" : "bottom")); Task task = mTaskIdToTask.get(taskId); if (task == null) { if (DEBUG_STACK) Slog.i(TAG, "addTask: could not find taskId=" + taskId); return; } TaskStack stack = mStackIdToStack.get(stackId); stack.addTask(task, toTop); final DisplayContent displayContent = stack.getDisplayContent(); displayContent.layoutNeeded = true; performLayoutAndPlaceSurfacesLocked(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addTask File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
addTask
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
boolean isDragResizeChanged() { return mDragResizing != computeDragResizing(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDragResizeChanged File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
isDragResizeChanged
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private String[][] cleanAttributes(String elementName, String[][] attributes) { String[][] allowedAttributes; if (this.htmlElementSanitizer == null || attributes == null) { allowedAttributes = attributes; } else { allowedAttributes = Arrays.stream(attributes) .map(entry -> { if (this.htmlElementSanitizer.isAttributeAllowed(elementName, entry[0], entry[1])) { return entry; } else { return new String[] { TRANSLATED_ATTRIBUTE_PREFIX + entry[0], entry[1] }; } }) .toArray(String[][]::new); } return allowedAttributes; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-37908 - Severity: CRITICAL - CVSS Score: 9.6 Description: XRENDERING-697: XHTMLWikiPrinter doesn't validate generated data attributes * Strip invalid characters and make sure the data attribute is allowed. * Add tests. Function: cleanAttributes File: xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java Repository: xwiki/xwiki-rendering Fixed Code: private String[][] cleanAttributes(String elementName, String[][] attributes) { String[][] allowedAttributes; if (this.htmlElementSanitizer == null || attributes == null) { allowedAttributes = attributes; } else { allowedAttributes = Arrays.stream(attributes) .map(entry -> { if (this.htmlElementSanitizer.isAttributeAllowed(elementName, entry[0], entry[1])) { return entry; } else { // Keep but clean invalid attributes with a prefix (removed during parsing) to avoid loosing // them through WYSIWYG editing. String translatedName = TRANSLATED_ATTRIBUTE_PREFIX + removeInvalidDataAttributeCharacters(entry[0]); if (this.htmlElementSanitizer.isAttributeAllowed(elementName, translatedName, entry[1])) { return new String[] { translatedName, entry[1] }; } else { return null; } } }) .filter(Objects::nonNull) .toArray(String[][]::new); } return allowedAttributes; }
[ "CWE-79" ]
CVE-2023-37908
CRITICAL
9.6
xwiki/xwiki-rendering
cleanAttributes
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
f4d5acac451dccaf276e69f0b49b72221eef5d2f
1
Analyze the following code function for security vulnerabilities
@Override public String getQueryString() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getQueryString File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getQueryString
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
private void fixateNewestUserKeyAuth(int userId) throws RemoteException { final IMountService mountService = getMountService(); final long callingId = Binder.clearCallingIdentity(); try { mountService.fixateNewestUserKeyAuth(userId); } finally { Binder.restoreCallingIdentity(callingId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fixateNewestUserKeyAuth 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
fixateNewestUserKeyAuth
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public boolean isUseNativeByteOrder() { return useNativeByteOrder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUseNativeByteOrder File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
isUseNativeByteOrder
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void close() { channelPool.destroy(); for (Channel channel : openChannels) { Object attribute = getDefaultAttribute(channel); if (attribute instanceof NettyResponseFuture<?>) { NettyResponseFuture<?> future = (NettyResponseFuture<?>) attribute; future.cancelTimeouts(); } } openChannels.close(); if (allowReleaseEventLoopGroup) eventLoopGroup.shutdownGracefully(); if (allowStopNettyTimer) nettyTimer.stop(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: close File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
close
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
@Override public void unregisterUidObserver(IUidObserver observer) { synchronized (this) { mUidObservers.unregister(observer); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unregisterUidObserver File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
unregisterUidObserver
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
int getMemcachedPort() { return memcached.getPort(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMemcachedPort File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
getMemcachedPort
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
69be66141eee7abb1c47d46f0a6b74b079709f4b
0
Analyze the following code function for security vulnerabilities
@UnstableApi public ServerBuilder unhandledExceptionsReportIntervalMillis(long unhandledExceptionsReportIntervalMillis) { checkArgument(unhandledExceptionsReportIntervalMillis >= 0, "unhandledExceptionsReportIntervalMillis: %s (expected: >= 0)", unhandledExceptionsReportIntervalMillis); this.unhandledExceptionsReportIntervalMillis = unhandledExceptionsReportIntervalMillis; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unhandledExceptionsReportIntervalMillis File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
unhandledExceptionsReportIntervalMillis
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
private static void initCaches() { if (m_cacheTemporary == null) { m_cacheTemporary = CmsMemoryMonitor.createLRUCacheMap(1024); m_cachePermanent = new ConcurrentHashMap<String, byte[]>(32); m_cacheContentDefinitions = CmsMemoryMonitor.createLRUCacheMap(CONTENT_DEFINITION_CACHE_SIZE); } if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) { if ((OpenCms.getMemoryMonitor() != null) && !OpenCms.getMemoryMonitor().isMonitoring(CmsXmlEntityResolver.class.getName() + ".cacheTemporary")) { // reinitialize the caches after the memory monitor is set up Map<String, byte[]> cacheTemporary = CmsMemoryMonitor.createLRUCacheMap(128); cacheTemporary.putAll(m_cacheTemporary); m_cacheTemporary = cacheTemporary; OpenCms.getMemoryMonitor().register( CmsXmlEntityResolver.class.getName() + ".cacheTemporary", cacheTemporary); Map<String, byte[]> cachePermanent = new ConcurrentHashMap<String, byte[]>(32); cachePermanent.putAll(m_cachePermanent); m_cachePermanent = cachePermanent; OpenCms.getMemoryMonitor().register( CmsXmlEntityResolver.class.getName() + ".cachePermanent", cachePermanent); Map<String, CmsXmlContentDefinition> cacheContentDefinitions = CmsMemoryMonitor.createLRUCacheMap( CONTENT_DEFINITION_CACHE_SIZE); cacheContentDefinitions.putAll(m_cacheContentDefinitions); m_cacheContentDefinitions = cacheContentDefinitions; OpenCms.getMemoryMonitor().register( CmsXmlEntityResolver.class.getName() + ".cacheContentDefinitions", cacheContentDefinitions); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initCaches File: src/org/opencms/xml/CmsXmlEntityResolver.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3312
MEDIUM
4
alkacon/opencms-core
initCaches
src/org/opencms/xml/CmsXmlEntityResolver.java
92e035423aa6967822d343e54392d4291648c0ee
0
Analyze the following code function for security vulnerabilities
public UIComponent createComponent(ValueExpression componentExpression, FacesContext context, String componentType, String rendererType) { notNull(COMPONENT_EXPRESSION, componentExpression); notNull(CONTEXT, context); notNull(COMPONENT_TYPE, componentType); return createComponentApplyAnnotations(context, componentExpression, componentType, rendererType, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createComponent File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
createComponent
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
public void onBrEdrDown() { Message m = mAdapterStateMachine.obtainMessage(AdapterState.USER_TURN_OFF); mAdapterStateMachine.sendMessage(m); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onBrEdrDown File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
onBrEdrDown
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "4.3M2") public String getLanguage() { return getLocale().toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLanguage File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getLanguage
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private void saveXWikiPropertyInternal(final PropertyInterface property, final XWikiContext context, final boolean runInOwnTransaction) throws XWikiException { // Clone runInOwnTransaction so the value passed is not altered. boolean bTransaction = runInOwnTransaction; try { if (bTransaction) { this.checkHibernate(context); bTransaction = this.beginTransaction(context); } try { final Session session = this.getSession(context); Query<String> query = session.createQuery( "select prop.classType from BaseProperty as prop where prop.id.id = :id and prop.id.name= :name", String.class); query.setParameter("id", property.getId()); query.setParameter("name", property.getName()); String oldClassType = query.uniqueResult(); String newClassType = ((BaseProperty) property).getClassType(); if (oldClassType == null) { session.save(property); } else if (oldClassType.equals(newClassType)) { session.update(property); } else { // The property type has changed. We cannot simply update its value because the new value and the // old // value are stored in different tables (we're using joined-subclass to map different property // types). // We must delete the old property value before saving the new one and for this we must load the old // property from the table that corresponds to the old property type (we cannot delete and save the // new // property or delete a clone of the new property; loading the old property from the BaseProperty // table // doesn't work either). Query propQuery = session.createQuery( "select prop from " + oldClassType + " as prop where prop.id.id = :id and prop.id.name= :name"); propQuery.setParameter("id", property.getId()); propQuery.setParameter("name", property.getName()); session.delete(propQuery.uniqueResult()); session.save(property); } ((BaseProperty) property).setValueDirty(false); if (bTransaction) { endTransaction(context, true); } } finally { if (bTransaction) { try { this.endTransaction(context, false); } catch (Exception ee) { // Not a lot we can do here if there was an exception committing and an exception rolling back. } } } } catch (Exception e) { // Something went wrong, collect some information. final BaseCollection obj = property.getObject(); final Object[] args = {(obj != null) ? obj.getName() : "unknown", property.getName()}; // Throw the exception. throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_LOADING_OBJECT, "Exception while saving property {1} of object {0}", e, args); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveXWikiPropertyInternal File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
saveXWikiPropertyInternal
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
protected FhirContext newContext(FhirVersionEnum version) { FhirContext retVal; retVal = new FhirContext(version); return retVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newContext File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-24301
MEDIUM
4.3
hapifhir/hapi-fhir
newContext
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
0
Analyze the following code function for security vulnerabilities
public InputStream postInputStream(Object resourceUri, Object restObject, Map<String, Object[]> queryParams, Object... elements) throws Exception { return executePost(resourceUri, restObject, queryParams, elements).getResponseBodyAsStream(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postInputStream 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
postInputStream
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
final void dumpGraphicsHardwareUsage(FileDescriptor fd, PrintWriter pw, String[] args) { ArrayList<ProcessRecord> procs = collectProcesses(pw, 0, false, args); if (procs == null) { pw.println("No process found for: " + args[0]); return; } long uptime = SystemClock.uptimeMillis(); long realtime = SystemClock.elapsedRealtime(); pw.println("Applications Graphics Acceleration Info:"); pw.println("Uptime: " + uptime + " Realtime: " + realtime); for (int i = procs.size() - 1 ; i >= 0 ; i--) { ProcessRecord r = procs.get(i); if (r.thread != null) { pw.println("\n** Graphics info for pid " + r.pid + " [" + r.processName + "] **"); pw.flush(); try { TransferPipe tp = new TransferPipe(); try { r.thread.dumpGfxInfo(tp.getWriteFd().getFileDescriptor(), args); tp.go(fd); } finally { tp.kill(); } } catch (IOException e) { pw.println("Failure while dumping the app: " + r); pw.flush(); } catch (RemoteException e) { pw.println("Got a RemoteException while dumping the app " + r); pw.flush(); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpGraphicsHardwareUsage File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
dumpGraphicsHardwareUsage
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
@Override public Runnable getDelegatedTask() { // Currently, we do not delegate SSL computation tasks // TODO: in the future, possibly create tasks to do encrypt / decrypt async return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDelegatedTask 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
getDelegatedTask
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
private boolean canReadMangeOwnCalls(String message) { try { mContext.enforceCallingOrSelfPermission(MANAGE_OWN_CALLS, message); return true; } catch (SecurityException e) { return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canReadMangeOwnCalls File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
canReadMangeOwnCalls
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public boolean initializeWiki(String wikiId, boolean wait, XWikiContext xcontext) throws XWikiException { Job wikiJob = this.initializedWikis.get(wikiId); // Create and start the job if it does not exist if (wikiJob == null) { try { wikiJob = initializeWiki(wikiId, xcontext); } catch (JobException e) { throw new XWikiException(XWikiException.MODULE_XWIKI, XWikiException.ERROR_XWIKI_INIT_FAILED, "Could not start [" + wikiId + "] wiki initialization", e); } } // Check if the job is done if (wikiJob.getStatus().getState() == State.FINISHED) { return true; } // Wait until the job is finished if asked to if (wait) { try { wikiJob.join(); } catch (InterruptedException e) { throw new XWikiException(XWikiException.MODULE_XWIKI, XWikiException.ERROR_XWIKI_INIT_FAILED, "Wiki [" + wikiId + "] initialization was interrupted unexpectedly", e); } if (wikiJob.getStatus().getError() != null) { throw new XWikiException(XWikiException.MODULE_XWIKI, XWikiException.ERROR_XWIKI_INIT_FAILED, "Wiki [" + wikiId + "] initialization failed", wikiJob.getStatus().getError()); } return true; } // Still initializing return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeWiki 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
initializeWiki
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 static String fromObject(Object value) { final String strVal = StringValueConverter.INSTANCE.convertObject(value); assert strVal != null : value + " converted to null."; return strVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromObject File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
fromObject
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
public static boolean contains(File dir, File file) { if (dir == null || file == null) return false; return contains(dir.getAbsolutePath(), file.getAbsolutePath()); }
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 gotoPage(String url) { getDriver().get(url); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gotoPage 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
gotoPage
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
@Nullable public URI getWebhookUrl() { return webhookUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWebhookUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
getWebhookUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/SlackNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public boolean isPastedText() { return mIsPastedText; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPastedText File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
isPastedText
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
private void cancelQsAnimation() { if (mQsExpansionAnimator != null) { mQsExpansionAnimator.cancel(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelQsAnimation 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
cancelQsAnimation
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public String removeHost( String name, String type, String hostname, String securePort) throws EBaseException { CMSEngine engine = CMS.getCMSEngine(); EngineConfig cs = engine.getConfig(); LDAPConfig ldapConfig = cs.getInternalDBConfig(); String baseDN = ldapConfig.getBaseDN(); String listName = type + "List"; String cn = hostname + ":" + securePort; String hostDN = "cn=" + cn + ",cn=" + listName + ",ou=Security Domain," + baseDN; logger.info("SecurityDomainProcessor: Removing host " + hostDN); String auditSubjectID = auditSubjectID(); String domainAuditParams = "host;;" + hostname + "+name;;" + name + "+sport;;" + securePort + "+type;;" + type + "+operation;;remove"; String status = removeEntry(hostDN); if (!status.equals(SUCCESS)) { signedAuditLogger.log(CMS.getLogMessage( AuditEvent.SECURITY_DOMAIN_UPDATE, auditSubjectID, ILogger.FAILURE, domainAuditParams)); return status; } String adminDN = "uid=" + type + "-" + hostname + "-" + securePort + ",ou=People," + baseDN; logger.info("SecurityDomainProcessor: Removing admin " + adminDN); String usersAuditParams = "Scope;;users+Operation;;OP_DELETE+source;;SecurityDomainProcessor" + "+resource;;" + adminDN; status = removeEntry(adminDN); if (!status.equals(SUCCESS)) { signedAuditLogger.log(new ConfigRoleEvent( auditSubjectID, ILogger.FAILURE, usersAuditParams)); signedAuditLogger.log(CMS.getLogMessage( AuditEvent.SECURITY_DOMAIN_UPDATE, auditSubjectID, ILogger.FAILURE, domainAuditParams)); return status; } signedAuditLogger.log(new ConfigRoleEvent( auditSubjectID, ILogger.SUCCESS, usersAuditParams)); String groupDN = "cn=Subsystem Group, ou=groups," + baseDN; logger.info("SecurityDomainProcessor: Removing admin from group " + groupDN); String groupsAuditParams = "Scope;;groups+Operation;;OP_DELETE_USER" + "+source;;SecurityDomainProcessor" + "+resource;;Subsystem Group+user;;" + adminDN; LDAPModification mod = new LDAPModification( LDAPModification.DELETE, new LDAPAttribute("uniqueMember", adminDN)); status = modifyEntry(groupDN, mod); if (!status.equals(SUCCESS)) { signedAuditLogger.log(new ConfigRoleEvent( auditSubjectID, ILogger.FAILURE, groupsAuditParams)); signedAuditLogger.log(CMS.getLogMessage( AuditEvent.SECURITY_DOMAIN_UPDATE, auditSubjectID, ILogger.FAILURE, domainAuditParams)); return status; } signedAuditLogger.log(new ConfigRoleEvent( auditSubjectID, ILogger.SUCCESS, groupsAuditParams)); signedAuditLogger.log(CMS.getLogMessage( AuditEvent.SECURITY_DOMAIN_UPDATE, auditSubjectID, ILogger.SUCCESS, domainAuditParams)); return SUCCESS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeHost File: base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
removeHost
base/server/src/main/java/com/netscape/cms/servlet/csadmin/SecurityDomainProcessor.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public String getRenderedContentRestricted(String text, String syntaxId) throws XWikiException { return getRenderedContent(text, syntaxId, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRenderedContentRestricted 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
getRenderedContentRestricted
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
private NegotiatedParameters mergeKexParameters(KexParameters client, KexParameters server) { NegotiatedParameters np = new NegotiatedParameters(); try { np.kex_algo = getFirstMatch(client.kex_algorithms, server.kex_algorithms); log.log(20, "kex_algo=" + np.kex_algo); np.server_host_key_algo = getFirstMatch(client.server_host_key_algorithms, server.server_host_key_algorithms); log.log(20, "server_host_key_algo=" + np.server_host_key_algo); np.enc_algo_client_to_server = getFirstMatch(client.encryption_algorithms_client_to_server, server.encryption_algorithms_client_to_server); np.enc_algo_server_to_client = getFirstMatch(client.encryption_algorithms_server_to_client, server.encryption_algorithms_server_to_client); log.log(20, "enc_algo_client_to_server=" + np.enc_algo_client_to_server); log.log(20, "enc_algo_server_to_client=" + np.enc_algo_server_to_client); np.mac_algo_client_to_server = getFirstMatch(client.mac_algorithms_client_to_server, server.mac_algorithms_client_to_server); np.mac_algo_server_to_client = getFirstMatch(client.mac_algorithms_server_to_client, server.mac_algorithms_server_to_client); log.log(20, "mac_algo_client_to_server=" + np.mac_algo_client_to_server); log.log(20, "mac_algo_server_to_client=" + np.mac_algo_server_to_client); np.comp_algo_client_to_server = getFirstMatch(client.compression_algorithms_client_to_server, server.compression_algorithms_client_to_server); np.comp_algo_server_to_client = getFirstMatch(client.compression_algorithms_server_to_client, server.compression_algorithms_server_to_client); log.log(20, "comp_algo_client_to_server=" + np.comp_algo_client_to_server); log.log(20, "comp_algo_server_to_client=" + np.comp_algo_server_to_client); } catch (NegotiateException e) { return null; } try { np.lang_client_to_server = getFirstMatch(client.languages_client_to_server, server.languages_client_to_server); } catch (NegotiateException e1) { np.lang_client_to_server = null; } try { np.lang_server_to_client = getFirstMatch(client.languages_server_to_client, server.languages_server_to_client); } catch (NegotiateException e2) { np.lang_server_to_client = null; } if (isGuessOK(client, server)) np.guessOK = true; return np; }
Vulnerability Classification: - CWE: CWE-354 - CVE: CVE-2023-48795 - Severity: MEDIUM - CVSS Score: 5.9 Description: Implement kex-strict from OpenSSH Implement's OpenSSH's mitigation for the Terrapin attack. Function: mergeKexParameters File: src/main/java/com/trilead/ssh2/transport/KexManager.java Repository: connectbot/sshlib Fixed Code: private NegotiatedParameters mergeKexParameters(KexParameters client, KexParameters server) { NegotiatedParameters np = new NegotiatedParameters(); try { np.kex_algo = getFirstMatch(client.kex_algorithms, server.kex_algorithms); np.isStrictKex = containsAlgo(server.kex_algorithms, KEX_STRICT_S_OPENSSH); log.log(20, "kex_algo=" + np.kex_algo); np.server_host_key_algo = getFirstMatch(client.server_host_key_algorithms, server.server_host_key_algorithms); log.log(20, "server_host_key_algo=" + np.server_host_key_algo); np.enc_algo_client_to_server = getFirstMatch(client.encryption_algorithms_client_to_server, server.encryption_algorithms_client_to_server); np.enc_algo_server_to_client = getFirstMatch(client.encryption_algorithms_server_to_client, server.encryption_algorithms_server_to_client); log.log(20, "enc_algo_client_to_server=" + np.enc_algo_client_to_server); log.log(20, "enc_algo_server_to_client=" + np.enc_algo_server_to_client); np.mac_algo_client_to_server = getFirstMatch(client.mac_algorithms_client_to_server, server.mac_algorithms_client_to_server); np.mac_algo_server_to_client = getFirstMatch(client.mac_algorithms_server_to_client, server.mac_algorithms_server_to_client); log.log(20, "mac_algo_client_to_server=" + np.mac_algo_client_to_server); log.log(20, "mac_algo_server_to_client=" + np.mac_algo_server_to_client); np.comp_algo_client_to_server = getFirstMatch(client.compression_algorithms_client_to_server, server.compression_algorithms_client_to_server); np.comp_algo_server_to_client = getFirstMatch(client.compression_algorithms_server_to_client, server.compression_algorithms_server_to_client); log.log(20, "comp_algo_client_to_server=" + np.comp_algo_client_to_server); log.log(20, "comp_algo_server_to_client=" + np.comp_algo_server_to_client); } catch (NegotiateException e) { return null; } try { np.lang_client_to_server = getFirstMatch(client.languages_client_to_server, server.languages_client_to_server); } catch (NegotiateException e1) { np.lang_client_to_server = null; } try { np.lang_server_to_client = getFirstMatch(client.languages_server_to_client, server.languages_server_to_client); } catch (NegotiateException e2) { np.lang_server_to_client = null; } if (isGuessOK(client, server)) np.guessOK = true; return np; }
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
mergeKexParameters
src/main/java/com/trilead/ssh2/transport/KexManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
1
Analyze the following code function for security vulnerabilities
private void appendHex(int n, int nDigits) { for (int i = 0, x = n; i < nDigits; ++i, x >>>= 4) { int dig = x & 0xf; sanitizedJson.append(dig + (dig < 10 ? '0' : (char) ('a' - 10))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendHex File: src/main/java/com/google/json/JsonSanitizer.java Repository: OWASP/json-sanitizer The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-13973
MEDIUM
4.3
OWASP/json-sanitizer
appendHex
src/main/java/com/google/json/JsonSanitizer.java
53ceaac3e0a10e86d512ce96a0056578f2d1978f
0
Analyze the following code function for security vulnerabilities
private void updatePreferenceText() { if (mForFingerprint) { setPreferenceTitle(ScreenLockType.PATTERN, R.string.fingerprint_unlock_set_unlock_pattern); setPreferenceTitle(ScreenLockType.PIN, R.string.fingerprint_unlock_set_unlock_pin); setPreferenceTitle(ScreenLockType.PASSWORD, R.string.fingerprint_unlock_set_unlock_password); } if (mManagedPasswordProvider.isSettingManagedPasswordSupported()) { setPreferenceTitle(ScreenLockType.MANAGED, mManagedPasswordProvider.getPickerOptionTitle(mForFingerprint)); } else { removePreference(ScreenLockType.MANAGED.preferenceKey); } if (!(mForFingerprint && mIsSetNewPassword)) { removePreference(KEY_SKIP_FINGERPRINT); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePreferenceText File: src/com/android/settings/password/ChooseLockGeneric.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
updatePreferenceText
src/com/android/settings/password/ChooseLockGeneric.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
public void setSecretToken(String secretToken) { this.secretToken = secretToken; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSecretToken File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java Repository: ratpack The code follows secure coding practices.
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
setSecretToken
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
60302fae7ef26897b9a0ec0def6281a9425344cf
0
Analyze the following code function for security vulnerabilities
@Override public VFSItemFilter getDefaultItemFilter() { return defaultFilter; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultItemFilter File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
getDefaultItemFilter
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
0
Analyze the following code function for security vulnerabilities
private static void fillType(String suffix, String baseUrl, List<Type> types) { for (Type type : types) { try { String tagUri = baseUrl + Constants.getArticleUri() + "sort/" + URLEncoder.encode(type.get("alias"), "UTF-8") + suffix; type.put("url", tagUri); } catch (UnsupportedEncodingException e) { LOGGER.error("", e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillType File: web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
fillType
web/src/main/java/com/zrlog/web/interceptor/TemplateHelper.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
public void reportFailedStrongAuthUnlockAttempt(int userId) { mFailedAttempts.put(userId, getFailedUnlockAttempts(userId) + 1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reportFailedStrongAuthUnlockAttempt 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
reportFailedStrongAuthUnlockAttempt
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
private String trimString(@Positive int columnIndex, String string) throws SQLException { // we need to trim if maxsize is set and the length is greater than maxsize and the // type of this column is a candidate for trimming if (maxFieldSize > 0 && string.length() > maxFieldSize && isColumnTrimmable(columnIndex)) { return string.substring(0, maxFieldSize); } else { return string; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: trimString File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
trimString
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
void cleanupSession(VaadinSession session) { if (isSessionActive(session)) { closeInactiveUIs(session); removeClosedUIs(session); } else { if (session.getState() == VaadinSessionState.OPEN) { closeSession(session); if (session.getSession() != null) { getLogger().debug("Closing inactive session {}", session.getSession().getId()); } } if (session.getSession() != null) { /* * If the VaadinSession has no WrappedSession then it has * already been removed from the HttpSession and we do not have * to do it again */ removeSession(session.getSession()); } /* * The session was destroyed during this request and therefore no * destroy event has yet been sent */ fireSessionDestroy(session); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cleanupSession 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
cleanupSession
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
boolean isLiked(UserReference source, EntityReference target) throws LikeException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLiked File: xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-94" ]
CVE-2023-35152
HIGH
8.8
xwiki/xwiki-platform
isLiked
xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
0993a7ab3c102f9ac37ffe361a83a3dc302c0e45
0
Analyze the following code function for security vulnerabilities
@Override public T clear() { Arrays.fill(entries, null); head.before = head.after = head; size = 0; return thisT(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clear File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
clear
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
private void updateInterruptionFilterLocked() { int interruptionFilter = mZenModeHelper.getZenModeListenerInterruptionFilter(); if (interruptionFilter == mInterruptionFilter) return; mInterruptionFilter = interruptionFilter; scheduleInterruptionFilterChanged(interruptionFilter); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateInterruptionFilterLocked File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
updateInterruptionFilterLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public Stage saveStage(Pipeline pipeline, Stage instance, int order) { instance.setOrderId(order); return stageDao.saveWithJobs(pipeline, instance); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveStage File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
saveStage
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
@SystemApi @RequiresPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL) @NonNull public MediaStyle setRemotePlaybackInfo(@NonNull CharSequence deviceName, @DrawableRes int iconResource, @Nullable PendingIntent chipIntent) { mDeviceName = deviceName; mDeviceIcon = iconResource; mDeviceIntent = chipIntent; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRemotePlaybackInfo File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setRemotePlaybackInfo
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void resetForwardingChangeState() { mForwardingChangeResults = new HashMap<Integer, AsyncResult>(); mExpectedChangeResultReasons = new HashSet<Integer>(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetForwardingChangeState File: src/com/android/phone/settings/VoicemailSettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
resetForwardingChangeState
src/com/android/phone/settings/VoicemailSettingsActivity.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
public static Document createDocument() { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dbFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); return doc; } catch (Exception e) { throw new RuntimeException(e); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2021-3869 - Severity: MEDIUM - CVSS Score: 5.0 Description: Attempt to prevent external document attacks by wrapping DocumentBuilderFactory with a bunch of attribute changes Function: createDocument File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP Fixed Code: public static Document createDocument() { try { DocumentBuilderFactory dbFactory = safeDocumentBuilderFactory(); DocumentBuilder docBuilder = dbFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); return doc; } catch (Exception e) { throw new RuntimeException(e); } }
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
createDocument
src/edu/stanford/nlp/util/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
1
Analyze the following code function for security vulnerabilities
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { final ArrayList<String> recips = buildEmailAddressList(getAddressesFromList(mView)); for (String recip : recips) { if (!mContent.containsKey(recip)) { mContent.put(recip, 1); } else { mContent.put(recip, (mContent.get(recip)) + 1); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beforeTextChanged File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
beforeTextChanged
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
private void setKexDone() { kexOngoing.set(false); kexInitSent.clear(); done.set(); }
Vulnerability Classification: - CWE: CWE-354 - CVE: CVE-2023-48795 - Severity: MEDIUM - CVSS Score: 5.9 Description: Implement OpenSSH strict key exchange extension Function: setKexDone File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java Repository: hierynomus/sshj Fixed Code: private void setKexDone() { kexOngoing.set(false); initialKex.set(false); if (strictKex.get()) { transport.getDecoder().resetSequenceNumber(); } kexInitSent.clear(); done.set(); }
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
setKexDone
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
1
Analyze the following code function for security vulnerabilities
private boolean isLocalBinder() { return Process.myPid() == Binder.getCallingPid(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLocalBinder File: core/java/android/appwidget/AppWidgetHost.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-1541
MEDIUM
4.3
android
isLocalBinder
core/java/android/appwidget/AppWidgetHost.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@Override public Response processEndTransaction(TransactionInfo info) throws Exception { // No need to do anything. This packet is just sent by the client // make sure he is synced with the server as commit command could // come from a different connection. return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processEndTransaction File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
processEndTransaction
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
private boolean contains(final String value, final String text, final Boolean ignoreCase) { if (value != null && text != null) { String val = value.trim(); String txt = text.trim(); if (ignoreCase != null && ignoreCase) { val = val.toLowerCase(); txt = text.toLowerCase(); } if (val.contains(txt)) { return true; } } return false; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000651 - Severity: HIGH - CVSS Score: 7.5 Description: gh-813 Turn on secure processing feature for XML parsers etc Function: contains File: stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java Repository: gchq/stroom Fixed Code: private boolean contains(final String value, final String text, final Boolean ignoreCase) { if (value != null && text != null) { String val = value.trim(); String txt = text.trim(); if (ignoreCase != null && ignoreCase) { val = val.toLowerCase(); txt = text.toLowerCase(); } return val.contains(txt); } return false; }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
contains
stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
public void setWeeklyVotes(Integer weeklyVotes) { this.weeklyVotes = weeklyVotes; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWeeklyVotes File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setWeeklyVotes
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public void onDestroy() { Log_OC.v(TAG, "Destroying service"); mBinder = null; mServiceHandler = null; mServiceLooper.quit(); mServiceLooper = null; if (mNotificationManager != null) { mNotificationManager.cancel(FOREGROUND_SERVICE_ID); } // remove AccountsUpdatedListener AccountManager am = AccountManager.get(getApplicationContext()); am.removeOnAccountsUpdatedListener(this); super.onDestroy(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onDestroy File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-39210
MEDIUM
5.5
nextcloud/android
onDestroy
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
cd3bd0845a97e1d43daa0607a122b66b0068c751
0
Analyze the following code function for security vulnerabilities
protected Message createMessage(Instance instance, String registeredTitle, String activitySubtitle, StandardEvaluationContext context) { List<Fact> facts = new ArrayList<>(); facts.add(new Fact(STATUS_KEY, instance.getStatusInfo().getStatus())); facts.add(new Fact(SERVICE_URL_KEY, instance.getRegistration().getServiceUrl())); facts.add(new Fact(HEALTH_URL_KEY, instance.getRegistration().getHealthUrl())); facts.add(new Fact(MANAGEMENT_URL_KEY, instance.getRegistration().getManagementUrl())); facts.add(new Fact(SOURCE_KEY, instance.getRegistration().getSource())); Section section = Section.builder().activityTitle(instance.getRegistration().getName()) .activitySubtitle(activitySubtitle).facts(facts).build(); return Message.builder().title(registeredTitle).summary(messageSummary) .themeColor(evaluateExpression(context, themeColor)).sections(singletonList(section)).build(); }
Vulnerability Classification: - CWE: CWE-94 - CVE: CVE-2022-46166 - Severity: CRITICAL - CVSS Score: 9.8 Description: feat: improve notifiers Function: createMessage File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java Repository: codecentric/spring-boot-admin Fixed Code: protected Message createMessage(Instance instance, String registeredTitle, String activitySubtitle, EvaluationContext context) { List<Fact> facts = new ArrayList<>(); facts.add(new Fact(STATUS_KEY, instance.getStatusInfo().getStatus())); facts.add(new Fact(SERVICE_URL_KEY, instance.getRegistration().getServiceUrl())); facts.add(new Fact(HEALTH_URL_KEY, instance.getRegistration().getHealthUrl())); facts.add(new Fact(MANAGEMENT_URL_KEY, instance.getRegistration().getManagementUrl())); facts.add(new Fact(SOURCE_KEY, instance.getRegistration().getSource())); Section section = Section.builder().activityTitle(instance.getRegistration().getName()) .activitySubtitle(activitySubtitle).facts(facts).build(); return Message.builder().title(registeredTitle).summary(messageSummary) .themeColor(evaluateExpression(context, themeColor)).sections(singletonList(section)).build(); }
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
createMessage
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
1
Analyze the following code function for security vulnerabilities
public boolean getPackageAskScreenCompat(String packageName) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(packageName); mRemote.transact(GET_PACKAGE_ASK_SCREEN_COMPAT_TRANSACTION, data, reply, 0); reply.readException(); boolean ask = reply.readInt() != 0; reply.recycle(); data.recycle(); return ask; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageAskScreenCompat File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getPackageAskScreenCompat
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private final int _decodeExplicitLength(int lowBits) throws IOException { // common case, indefinite length; relies on marker if (lowBits == 31) { return -1; } if (lowBits <= 23) { return lowBits; } switch (lowBits - 24) { case 0: return _decode8Bits(); case 1: return _decode16Bits(); case 2: return _decode32Bits(); case 3: long l = _decode64Bits(); if (l < 0 || l > MAX_INT_L) { throw _constructError("Illegal length for "+currentToken()+": "+l); } return (int) l; } throw _constructError("Invalid length for "+currentToken()+": 0x"+Integer.toHexString(lowBits)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _decodeExplicitLength File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_decodeExplicitLength
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
private ActionOnCreate getActionOnCreate(BaseObject templateProvider) { if (templateProvider != null) { String action = templateProvider.getStringValue("action"); ActionOnCreate actionOnCreate = ActionOnCreate.valueOfAction(action); if (actionOnCreate != null) { return actionOnCreate; } } // Default action when creating a page from a template. return ActionOnCreate.EDIT; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActionOnCreate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2022-23617
MEDIUM
4
xwiki/xwiki-platform
getActionOnCreate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
30c52b01559b8ef5ed1035dac7c34aaf805764d5
0
Analyze the following code function for security vulnerabilities
private void updateUserIdsLocked() { int num = 0; for (int i = 0; i < mUsers.size(); i++) { if (!mUsers.valueAt(i).partial) { num++; } } final int[] newUsers = new int[num]; int n = 0; for (int i = 0; i < mUsers.size(); i++) { if (!mUsers.valueAt(i).partial) { newUsers[n++] = mUsers.keyAt(i); } } mUserIds = newUsers; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUserIdsLocked 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
updateUserIdsLocked
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
private EnforcingAdmin enforceCanQueryAndGetEnforcingAdmin(@Nullable ComponentName admin, String permission, String callerPackageName, int targetUserId) { enforceCanQuery(permission, callerPackageName, targetUserId); return getEnforcingAdminForCaller(admin, callerPackageName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceCanQueryAndGetEnforcingAdmin 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
enforceCanQueryAndGetEnforcingAdmin
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Listen public void on(SystemStopping event) { taskScheduler.unschedule(taskId); synchronized(repositoryCache) { for (Repository repository: repositoryCache.values()) { repository.close(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: on File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
on
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
public static List<Triple<String, Element, String>> getTagElementTriplesFromFileNumBounded(File f, String tag, int num) { List<Triple<String, Element, String>> sents = Generics.newArrayList(); try { sents = getTagElementTriplesFromFileNumBoundedSAXException(f, tag, num); } catch (SAXException e) { log.warn(e); } return sents; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTagElementTriplesFromFileNumBounded File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
getTagElementTriplesFromFileNumBounded
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
public String getAmazonLoginURL() { return "https://www.amazon.com/ap/oa?response_type=code&client_id=" + CONF.amazonAppId() + "&scope=profile&state=" + getParaAppId() + "&redirect_uri=" + getParaEndpoint() + "/amazon_auth"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAmazonLoginURL File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getAmazonLoginURL
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public ConnectionFactory load(Properties properties) { ConnectionFactoryConfigurator.load(this, properties); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: load File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
load
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public String getWysiwygToolbars() { return this.xwiki.getWysiwygToolbars(getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWysiwygToolbars 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
getWysiwygToolbars
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
@RequestMapping(value = REPORT_URL + ".{format:\\w+}", method = RequestMethod.POST) public final void createReport( @PathVariable final String format, @RequestBody final String requestData, final HttpServletRequest createReportRequest, final HttpServletResponse createReportResponse) throws NoSuchAppException { setNoCache(createReportResponse); PJsonObject spec = parseJson(requestData, createReportResponse); if (spec == null) { return; } final String appId = spec.optString(JSON_APP, DEFAULT_CONFIGURATION_FILE_KEY); createReport(appId, format, requestData, createReportRequest, createReportResponse); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createReport File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java Repository: mapfish/mapfish-print The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-15231
MEDIUM
4.3
mapfish/mapfish-print
createReport
core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
89155f2506b9cee822e15ce60ccae390a1419d5e
0
Analyze the following code function for security vulnerabilities
private void showPullRequestLink(Output output, Project project, String branch) { output.writeLine(); output.writeLine("Create a pull request for '"+ branch +"' by visiting:"); output.writeLine(" " + project.getUrl() +"/pulls/new?target=" + project.getId() + ":" + project.getDefaultBranch() + "&source=" + project.getId() + ":" + branch); output.writeLine(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showPullRequestLink File: server-core/src/main/java/io/onedev/server/git/hookcallback/GitPostReceiveCallback.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
showPullRequestLink
server-core/src/main/java/io/onedev/server/git/hookcallback/GitPostReceiveCallback.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
public void handleApplicationStrictModeViolation( IBinder app, int violationMask, StrictMode.ViolationInfo info) { ProcessRecord r = findAppProcess(app, "StrictMode"); if (r == null) { return; } if ((violationMask & StrictMode.PENALTY_DROPBOX) != 0) { Integer stackFingerprint = info.hashCode(); boolean logIt = true; synchronized (mAlreadyLoggedViolatedStacks) { if (mAlreadyLoggedViolatedStacks.contains(stackFingerprint)) { logIt = false; // TODO: sub-sample into EventLog for these, with // the info.durationMillis? Then we'd get // the relative pain numbers, without logging all // the stack traces repeatedly. We'd want to do // likewise in the client code, which also does // dup suppression, before the Binder call. } else { if (mAlreadyLoggedViolatedStacks.size() >= MAX_DUP_SUPPRESSED_STACKS) { mAlreadyLoggedViolatedStacks.clear(); } mAlreadyLoggedViolatedStacks.add(stackFingerprint); } } if (logIt) { logStrictModeViolationToDropBox(r, info); } } if ((violationMask & StrictMode.PENALTY_DIALOG) != 0) { AppErrorResult result = new AppErrorResult(); synchronized (this) { final long origId = Binder.clearCallingIdentity(); Message msg = Message.obtain(); msg.what = SHOW_STRICT_MODE_VIOLATION_MSG; HashMap<String, Object> data = new HashMap<String, Object>(); data.put("result", result); data.put("app", r); data.put("violationMask", violationMask); data.put("info", info); msg.obj = data; mUiHandler.sendMessage(msg); Binder.restoreCallingIdentity(origId); } int res = result.get(); Slog.w(TAG, "handleApplicationStrictModeViolation; res=" + res); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleApplicationStrictModeViolation File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
handleApplicationStrictModeViolation
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
public boolean isOffloadedFilteringSupported() { AdapterService service = getService(); if (service == null) return false; int val = service.getNumOfOffloadedScanFilterSupported(); return (val >= MIN_OFFLOADED_FILTERS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isOffloadedFilteringSupported File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
isOffloadedFilteringSupported
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0